From 31df063c282c2f241ef20a8ca99bbe3151db367e Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 17 Jul 2025 06:24:33 -0700 Subject: [PATCH] Update rl_replacements.py --- unsloth/models/rl_replacements.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.py index a41ddc8f07..eca236cac9 100644 --- a/unsloth/models/rl_replacements.py +++ b/unsloth/models/rl_replacements.py @@ -237,7 +237,7 @@ RL_FUNCTIONS["grpo_trainer"].append(grpo_trainer__prepare_inputs) # Fix incorrect special tokens handling and truncation in older TRL versions def grpo_trainer__generate_and_score_completions(function_name, function): - if function_name != "_prepare_inputs": return function + if function_name != "_generate_and_score_completions": return function # TRL 0.19.0 did skip_special_tokens = True which should be False function = function.replace(