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 Han1c7a2bbe9957
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index 036936810de..4daac6c4b46 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -1188,9 +1188,11 @@ EMPTY_LOGITS = EmptyLogits()
functions = dir(torch.Tensor)
for function in functions:
if function.endswith("_") and len(function) > 2 and function[-2] != "_":
+ print()
try: exec(f"EMPTY_LOGITS.{function} = warn_logits_error", globals(), locals())
except: continue
else:
- try: exec(f"EMPTY_LOGITS.{function} = raise_logits_error", globals(), locals())
+ exec(f"def raise_{j}: print({function})", globals(), locals())
+ try: exec(f"EMPTY_LOGITS.{function} = raise_{j}", globals(), locals())
except: continue
pass