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.py
Daniel Han6386de4cced6
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.pyindex f8d4d5412c7..40979ec76f4 100644--- a/unsloth/models/rl.py+++ b/unsloth/models/rl.py@@ -151,15 +151,16 @@ def _PatchRLStatistics(metrics):pass-def PatchRLStatistics(algorithm = "grpo"):- if algorithm == "grpo":+def PatchRLStatistics(algorithm = "GRPO"):+ algorithm = algorithm.upper()+ if algorithm == "GRPO":metrics = ["completion_length","reward","reward_std","kl",]- elif algorithm == "dpo" or algorithm == "kto":+ elif algorithm == "DPO" or algorithm == "KTO":metrics = ["rewards/chosen","rewards/rejected",