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 _utils.py
Daniel Han03c889dc2117
diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.pyindex 1a8b20365d7..c9ca3eb1e5d 100644--- a/unsloth/models/_utils.py+++ b/unsloth/models/_utils.py@@ -1126,6 +1126,7 @@ def patch_gradient_accumulation_fix(Trainer):r"(.+?)return loss\.detach\(\) \/ self\.args\.gradient_accumulation_steps","else:\n"\+ "\1print(self.args.gradient_accumulation_steps)\n""\2if num_items_in_batch is None:\n"\"\3loss = loss / self.args.gradient_accumulation_steps\n"\"\1self.accelerator.backward(loss, **kwargs)",