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.

Update rl.py

Daniel Han5a9f9b7f241d
diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py
index fb144603768..1ac511e8334 100644
--- a/unsloth/models/rl.py
+++ b/unsloth/models/rl.py
@@ -416,8 +416,8 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):
__RLConfig_doc__ = eval(f"trl.trainer.{RLConfig_name}") .__doc__
# Get all pre-modules
- if RLTrainer_name in RL_PRE_ITEMS:
- RL_pre = "\n".join(RL_PRE_ITEMS[RLTrainer_name])
+ if trainer_file in RL_PRE_ITEMS:
+ RL_pre = "\n".join(RL_PRE_ITEMS[trainer_file])
else:
RL_pre = ""
pass