From 7816f7e9ac5538350165b2f43b217786ed676b8d Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 12 Feb 2025 20:18:07 -0800 Subject: [PATCH] Update rl_replacements.py --- unsloth/models/rl_replacements.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unsloth/models/rl_replacements.py b/unsloth/models/rl_replacements.py index 781f5984d4..aaa5b72142 100644 --- a/unsloth/models/rl_replacements.py +++ b/unsloth/models/rl_replacements.py @@ -153,10 +153,10 @@ def grpo_trainer__get_per_token_logps(function_name, function): if function_name != "_get_per_token_logps": return function # Set attention_mask to boolean - function = function.replace( - "attention_mask=attention_mask", - "attention_mask=attention_mask.to(torch.bool)" - ) + # function = function.replace( + # "attention_mask=attention_mask", + # "attention_mask=attention_mask.to(torch.bool)" + # ) return function pass RL_FUNCTIONS["grpo_trainer"].append(grpo_trainer__get_per_token_logps)