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 Han0f9b6390a6b3
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py
index 3b8582581fe..3c4d8f3b387 100644
--- a/unsloth/models/llama.py
+++ b/unsloth/models/llama.py
@@ -527,7 +527,6 @@ __DTYPE_MAP = {
}
# https://github.com/huggingface/transformers/blob/main/src/transformers/models/llama/modeling_llama.py#L825
-@torch._disable_dynamo
def LlamaModel_fast_forward(
self,
input_ids: torch.LongTensor,
@@ -1029,6 +1028,7 @@ def CausalLM_fast_forward(fast_forward_inference):
pass
+@torch._disable_dynamo
def PeftModelForCausalLM_fast_forward(
self,
input_ids=None,