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 _utils.py

Daniel Hanb80f110a440b
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index e713c8efff6..6379fb15052 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -356,7 +356,8 @@ class _RaiseUninitialized(logging.Handler):
("score.weight" not in record_lower) and \
("classifier.weight" not in record_lower) and \
("cls.predictions" not in record_lower) and \
- ("predictions.decoder" not in record_lower):
+ ("predictions.decoder" not in record_lower) and \
+ (os.environ.get("UNSLOTH_WARN_UNINITIALIZED", "1") == "1"):
raise Exception(
f"Unsloth: Critical error since some weights are not initialized.\n"\
f"Please try updating Unsloth, transformers and timm via:\n"\