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 trainer.py
Daniel Han0cdda6b3a310
diff --git a/unsloth/trainer.py b/unsloth/trainer.pyindex 14fd1631dfd..012be4b0cbd 100644--- a/unsloth/trainer.py+++ b/unsloth/trainer.py@@ -21,7 +21,12 @@ import trlimport inspectfrom trl import SFTTrainerfrom . import is_bfloat16_supported-from unsloth_zoo.training_utils import unsloth_train as _unsloth_train+from unsloth_zoo.training_utils import (+ unsloth_train as _unsloth_train,+)+from unsloth_zoo.vision_utils import (+ UnslothVisionDataCollator,+)from packaging.version import Versionimport dataclasses@@ -30,6 +35,7 @@ __all__ = ["UnslothTrainer","unsloth_train","_patch_trl_trainer",+ "UnslothVisionDataCollator",]# Unsloth gradient accumulation fix: