Update rl_replacements.py
This commit is contained in:
parent
956df63b9e
commit
b2e003b541
1 changed files with 1 additions and 1 deletions
|
|
@ -248,7 +248,7 @@ RL_FUNCTIONS["grpo_trainer"].append(grpo_trainer_compute_loss)
|
|||
# https://github.com/huggingface/trl/blob/main/trl/trainer/grpo_trainer.py#L356
|
||||
# TRL warns if batch size is not a multiple of num_generations -> fix this.
|
||||
def grpo_trainer_fix_batch_size(RLTrainer_source, RLConfig_source):
|
||||
if "multiple of num_generations" not in RLTrainer_source: return ""
|
||||
if "divisible by the number of generations" not in RLTrainer_source: return ""
|
||||
if "num_generations" not in RLConfig_source: return ""
|
||||
|
||||
check_batch_size = \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue