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
fix(trainer): import psutil to prevent NameError in _prepare_dataset (#3780)
Alkın Ünlü6180adda1bcd
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex 4ea36519d94..003a0e7f1b6 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -227,6 +227,7 @@ import numpy as npfrom contextlib import nullcontextfrom torch.nn import functional as Fimport inspect+import psutilfrom transformers import DataCollatorForSeq2Seq, DataCollatorForLanguageModeling as TransformersDataCollatorForLanguageModelingfrom transformers.training_args import ParallelModediff --git a/unsloth/tokenizer_utils.py b/unsloth/tokenizer_utils.pyindex 99651643a8e..0136e3498ed 100644--- a/unsloth/tokenizer_utils.py+++ b/unsloth/tokenizer_utils.py@@ -25,6 +25,7 @@ import collectionsimport numpy as npimport gcimport subprocess+import psutilfrom unsloth_zoo.tokenizer_utils import (mean_of_trained_tokens,diff --git a/unsloth/trainer.py b/unsloth/trainer.pyindex c0b2dd03b60..0d98cff3051 100644--- a/unsloth/trainer.py+++ b/unsloth/trainer.py@@ -14,6 +14,7 @@import loggingimport os+import psutilimport warningsfrom dataclasses import dataclass, fieldfrom typing import Optional