Skip to content

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.

Always use SFTConfig

Erland36680206ec1eb89
diff --git a/unsloth/trainer.py b/unsloth/trainer.py
index 75fdd410e15..a3602054325 100644
--- a/unsloth/trainer.py
+++ b/unsloth/trainer.py
@@ -61,13 +61,9 @@ else:
pass
pass
-try:
- from trl import SFTConfig as TrainingArguments
-except:
- from transformers import TrainingArguments
-pass
+from trl import SFTConfig
@dataclass
-class UnslothTrainingArguments(TrainingArguments):
+class UnslothTrainingArguments(SFTConfig):
embedding_learning_rate : Optional[float] = field(
default = None,
metadata = {"help" : "Different learning rates for embeddings and lm_head."}