Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Update __init__.py

Daniel Han-Chen38a6b4e84def
diff --git a/unsloth/__init__.py b/unsloth/__init__.py
index 63689802d92..baf39195907 100644
--- a/unsloth/__init__.py
+++ b/unsloth/__init__.py
@@ -52,4 +52,11 @@ if reload_package:
importlib.reload(torch)
pass
+# Try loading bitsandbytes
+import bitsandbytes as bnb
+try:
+ cdequantize_blockwise_fp32 = bnb.functional.lib.cdequantize_blockwise_fp32
+except:
+ raise ImportError("CUDA is not linked properly. Try running `ldconfig /usr/lib64-nvidia` first.")
+
from .models import *