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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Update llama.py
Daniel Han397a0e49d5b7
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 9403b50e447..378431ec526 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -700,6 +700,7 @@ def LlamaModel_fast_forward(elif inputs_requires_grad:inputs_embeds.requires_grad_(False)pass+ attention_mask = attention_mask[:,:self.max_seq_length] # Must resize!inputs_embeds *= attention_mask.unsqueeze(0).transpose(0, 1).transpose(1, 2)if inputs_requires_grad: inputs_embeds.requires_grad_(True)pass