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 Han5a4c03fc6053
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index 52b4dc2c9fe..3dacf5cdd54 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -409,12 +409,12 @@ def LlamaAttention_fast_forward(
else:
cos, sin = rotary_emb(V, seq_len = kv_seq_len)
- Q, K = (
- fast_rope_embedding(Q, K, cos, sin)
- if position_ids is None
- else inplace_rope_embedding(Q, K, cos, sin, position_ids)
- )
- # Q, K = fast_rope_embedding(Q, K, cos, sin)
+ # Q, K = (
+ # fast_rope_embedding(Q, K, cos, sin)
+ # if position_ids is None
+ # else inplace_rope_embedding(Q, K, cos, sin, position_ids)
+ # )
+ Q, K = fast_rope_embedding(Q, K, cos, sin)
if past_key_value is not None:
K = torch.cat([past_key_value[0], K], dim = 2)