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 Han55bf35be5d07
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 64bc6f84f07..7221a19a2af 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -1037,9 +1037,9 @@ def _wrap_fast_inference(generate, device_type, dtype, model):kwargs["cache_implementation"] = "dynamic"# Set pad token- old_pad_token_id = getattr(model.config, "pad_token_id", None)- old_eos_token_id = getattr(model.config, "eos_token_id", None)- model.config.pad_token_id = old_eos_token_id+ # old_pad_token_id = getattr(model.config, "pad_token_id", None)+ # old_eos_token_id = getattr(model.config, "eos_token_id", None)+ # model.config.pad_token_id = old_eos_token_id# Autocastedwith torch.autocast(device_type = device_type, dtype = dtype):@@ -1047,7 +1047,7 @@ def _wrap_fast_inference(generate, device_type, dtype, model):pass# Revert- model.config.pad_token_id = old_pad_token_id+ # model.config.pad_token_id = old_pad_token_id# Unset a flag for generation!internal_model = model