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 Han4d1de7af9e53
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 811e6ccd181..1eae97ff1cd 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -449,7 +449,6 @@ def LlamaAttention_fast_forward(else:# Grouped query attentionif SDPA_HAS_GQA:- print("##")# Needs (batch_size, n_heads, seq_len, head_dim)# is_casual and attention_mask must not be both set!A = scaled_dot_product_attention(Q, K, V, attn_mask = attention_mask, is_causal = False, enable_gqa = n_groups != 1)@@ -708,8 +707,8 @@ def LlamaModel_fast_forward(# Ignore attention_maskif attention_mask is None:padding_mask = None- # elif self.training:- elif attention_mask is None:+ elif self.training:+ # elif attention_mask is None:attention_mask = Nonepadding_mask = Noneelse: