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 Hanfa5e37de2d65
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 40ea448e80b..15eb808fcc1 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -1534,11 +1534,11 @@ class LongRopeRotaryEmbedding(torch.nn.Module):pass-def _wrap_fast_inference(generate):+def _wrap_fast_inference(generate_function):# Wraps inference with bfloat16 / float16@torch.inference_modedef _fast_generate(self, *args, **kwargs):- f"""{getattr(generate, '__doc__', 'Unsloth fast generation')}"""+ f"""{getattr(generate_function, '__doc__', 'Unsloth fast generation')}"""FastLlamaModel.for_inference(self)@@ -1576,7 +1576,7 @@ def _wrap_fast_inference(generate):# Mixed precision autocastwith torch.autocast(device_type = "cuda", dtype = dtype):- output = generate(*args, **kwargs)+ output = generate_function(self, *args, **kwargs)pass# Return accelerate back