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.

error

Daniel Han307fd67a83e6
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py
index 242e30675f9..531adad3172 100644
--- a/unsloth/models/_utils.py
+++ b/unsloth/models/_utils.py
@@ -1175,7 +1175,7 @@ LOGITS_ERROR_STRING = \
"os.environ['UNSLOTH_RETURN_LOGITS'] = '1'\n"\
"... trainer.train() ..."
-def raise_logits_error(*args, **kwargs): raise NotImplementedError(LOGITS_ERROR_STRING)
+def raise_logits_error(*args, **kwargs): print(LOGITS_ERROR_STRING)
class EmptyLogits:
def __init__(self): return
__getitem__ = raise_logits_error
@@ -1185,7 +1185,7 @@ class EmptyLogits:
pass
EMPTY_LOGITS = EmptyLogits()
functions = dir(torch.Tensor)
-# for function in functions:
-# try: exec(f"EMPTY_LOGITS.{function} = raise_logits_error", globals(), locals())
-# except: continue
-# pass
+for function in functions:
+ try: exec(f"EMPTY_LOGITS.{function} = raise_logits_error", globals(), locals())
+ except: continue
+pass
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index e2ce925f4b8..c0242825d3a 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -1001,8 +1001,6 @@ def CausalLM_fast_forward(fast_forward_inference):
hidden_states=outputs.hidden_states,
attentions=outputs.attentions,
)
- print(output)
- print(output)
return output
pass
logits = self.lm_head(hidden_states.to(lm_head.dtype))