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 Han-Chen3c790a668003
diff --git a/unsloth/models/llama.py b/unsloth/models/llama.pyindex 1dc69be0428..9e9c3cca5d0 100644--- a/unsloth/models/llama.py+++ b/unsloth/models/llama.py@@ -411,7 +411,7 @@ def LlamaModel_fast_forward((batch_size, seq_length),inputs_embeds,past_key_values_length,- sliding_window = None if not hasattr(self.config "sliding_window") else \+ sliding_window = None if not hasattr(self.config, "sliding_window") else \self.config.sliding_window,)pass@@ -821,7 +821,7 @@ class FastLlamaModel:layer.self_attn.apply_o = apply_lora_opasspass-+# Patch cross entropy loss labels# Fixes https://github.com/unslothai/unsloth/issues/10extra_ignored_labels = torch.full((max_seq_length, 1), -100, device = "cuda")