From eb1f9b91f12a166cfbffc4e9ace36b01aa08bb4b Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 6 Feb 2025 01:08:31 -0800 Subject: [PATCH] Update rl.py --- unsloth/models/rl.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index cd0bb0b391..bc6fa0f7a7 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -275,6 +275,7 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"): spaces = __init__.find("def") __init__ = __init__.split("\n") __init__ = "\n".join(x[spaces:] for x in __init__) + __init__ = __init__.replace("def ", "def _unsloth_", 1) # Replace vLLM sections since we already have it done! vllm_part = re.findall(