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

Daniel Han35bad803b5e8
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index e04c573c6c6..fbc6d53afba 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -706,9 +706,10 @@ def LlamaModel_fast_forward(
pass
# Ignore attention_mask
+ print(attention_mask, attention_mask.shape, attention_mask.dtype)
if attention_mask is None:
padding_mask = None
- elif self.training:
+ elif attention_mask is None and self.training:
# attention_mask = None
padding_mask = None
else: