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-Chenbcfb13f0fe7f
diff --git a/unsloth/__init__.py b/unsloth/__init__.py
index 8ed9c64e11c..c798bea2ff1 100644
--- a/unsloth/__init__.py
+++ b/unsloth/__init__.py
@@ -64,7 +64,10 @@ try:
cdequantize_blockwise_fp32 = bnb.functional.lib.cdequantize_blockwise_fp32
libcuda_dirs()
except:
- warnings.warn("CUDA is not linked properly. We shall run `ldconfig /usr/lib64-nvidia` to try to fix it.")
+ warnings.warn(
+ "CUDA is not linked properly.\n"\
+ "We shall run `ldconfig /usr/lib64-nvidia` to try to fix it."
+ )
os.system("ldconfig /usr/lib64-nvidia")
importlib.reload(bnb)
importlib.reload(triton)
@@ -74,7 +77,8 @@ except:
cdequantize_blockwise_fp32 = bnb.functional.lib.cdequantize_blockwise_fp32
libcuda_dirs()
except:
- raise ImportError("CUDA is not linked properly. We tried running `ldconfig /usr/lib64-nvidia` ourselves, but it didn't work.\n"\
+ raise ImportError("CUDA is not linked properly.\n"\
+ "We tried running `ldconfig /usr/lib64-nvidia` ourselves, but it didn't work.\n"\
"You need to run in your terminal `ldconfig /usr/lib64-nvidia` yourself, then import Unsloth.")
pass