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 Han50c51e6ec18e
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 32610bbfda5..ff51b90b842 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -1068,7 +1068,14 @@ def _wrap_fast_inference(generate, device_type, dtype, model):# For newer HFkwargs["cache_implementation"] = "dynamic"- print(kwargs)+ # Remove token_type_ids+ kwargs.pop("token_type_ids", None)++ # Check pad_token+ kwargs["pad_token_id"] = kwargs.pop(+ "pad_token_id",+ getattr(model.config, "eos_token_id", None),+ )# Set pad token# old_pad_token_id = getattr(model.config, "pad_token_id", None)