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 Hanb7a53c37bd43
diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.pyindex decaf32096a..5fa4ec5a4f7 100644--- a/unsloth/models/rl_replacements.py+++ b/unsloth/models/rl_replacements.py@@ -234,9 +234,9 @@ def grpo_trainer_compute_loss(function_name, function):# per_token_loss = -(per_token_loss - self.beta * per_token_kl)# loss = ((per_token_loss * completion_mask).sum(dim=1) / completion_mask.sum(dim=1)).mean()input_ids = input_ids[:, -logits_to_keep:]- if per_token_logps is not None:+ if False:#per_token_logps is not None:loss, completion_length, mean_kl = grpo_compute_loss(- ref_per_token_logps, per_token_logps, input_ids, completion_mask, self.beta, advantages, bsz,+ ref_per_token_logps, per_token_logps, input_ids, completion_mask, self.beta, advantages,)else:loss, completion_length, mean_kl = grpo_accumulated_loss(