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 rl_replacements.py
Daniel Han1013ab5891ec
diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.pyindex 5da57c44bfc..4d7a4dbe09a 100644--- a/unsloth/models/rl_replacements.py+++ b/unsloth/models/rl_replacements.py@@ -116,6 +116,8 @@ def sft_trainer_compute_loss(function_name, function):function = inspect.getsource(_sft_trainer_compute_loss)function = function.replace("def _sft_trainer_compute_loss", "def compute_loss")+ function = function.split("\n")+ function = "\n".join(" "*4+x for x in function)return functionpassRL_FUNCTIONS["sft_trainer"].append(sft_trainer_compute_loss)