From 1f831fb61faadeb02a8a618fd52c16420bca060a Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 6 Feb 2025 02:24:13 -0800 Subject: [PATCH] Update rl.py --- unsloth/models/rl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/rl.py b/unsloth/models/rl.py index fe1587f56b..c785870306 100644 --- a/unsloth/models/rl.py +++ b/unsloth/models/rl.py @@ -308,7 +308,7 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"): sampling_params = sampling_params[0] # Replace with our vLLM engine sampling_params = \ - " "*8 + "self.llm = model.vllm_engine; " + \ + " "*8 + "self.llm = model.vllm_engine; self._last_loaded_step = 0; " + \ sampling_params # Add spaces new_vllm_part = f"\n if {args}.use_vllm:\n{sampling_params}\n else:\n" __init__ = __init__.replace(vllm_part, new_vllm_part)