disable _is_vlm (#3265)
This commit is contained in:
parent
ffcfbe23ad
commit
cd71b1bb96
1 changed files with 7 additions and 0 deletions
|
|
@ -727,6 +727,13 @@ def _patch_trl_rl_trainers(trainer_file = "grpo_trainer"):
|
|||
new_text = 'self._signature_columns = ["input_ids", "attention_mask", "completion_mask","labels"]'
|
||||
RLTrainer_source = RLTrainer_source.replace(original_text, new_text)
|
||||
|
||||
# Temporary patch _is_vlm to False
|
||||
# as of 0.22 it only exists in sfttrainer
|
||||
oriignal_is_vlm_text = 'self._is_vlm = True'
|
||||
new_is_vlm_text = 'self._is_vlm = False'
|
||||
RLTrainer_source = RLTrainer_source.replace(oriignal_is_vlm_text, new_is_vlm_text)
|
||||
|
||||
|
||||
# Remove multiple doc strings
|
||||
if __RLConfig_doc__ != "" and RLTrainer_source.count(__RLTrainer_doc__) == 2:
|
||||
RLTrainer_source = RLTrainer_source.replace(__RLTrainer_doc__, "", 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue