Skip to content

Commit

Permalink
[DPO] self.accelerator._prepare_deepspeed return tuples (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
i4never authored Sep 8, 2023
1 parent 4f81e77 commit 22a9019
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trl/trainer/dpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def __init__(
else:
if self.is_deepspeed_enabled:
# Read more about the issue in https://github.com/huggingface/trl/pull/687
self.ref_model = self.accelerator._prepare_deepspeed(self.ref_model)
self.ref_model = self.accelerator._prepare_deepspeed(self.ref_model)[0]
self.ref_model.eval()
else:
self.ref_model = self.accelerator.prepare_model(self.ref_model, evaluation_mode=True)
Expand Down

0 comments on commit 22a9019

Please sign in to comment.