This commit is contained in:
hiyouga 2024-07-02 23:06:13 +08:00
parent 821bb6660e
commit 71cdf8956e
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ class CustomPPOTrainer(PPOTrainer, Trainer):
else:
reward_model = self.reward_model
with unwrap_model_for_generation(reward_model, self.accelerator), self.amp_context: # support bf16
with self.amp_context: # support bf16
_, _, values = reward_model(**batch, return_dict=True, use_cache=False)
if self.finetuning_args.reward_model_type == "lora":