Skip to content

Commit

Permalink
Update dpo_trainer.py (#941)
Browse files Browse the repository at this point in the history
  • Loading branch information
younesbelkada authored Nov 2, 2023
1 parent 5b32372 commit a64a522
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 @@ -556,7 +556,7 @@ def get_batch_samples(self, model, batch: Dict[str, torch.LongTensor]) -> Tuple[
"""Generate samples from the model and reference model for the given batch of inputs."""

policy_output = model.generate(
batch["prompt_input_ids"],
input_ids=batch["prompt_input_ids"],
attention_mask=batch["prompt_attention_mask"],
max_length=self.max_length,
do_sample=True,
Expand Down

0 comments on commit a64a522

Please sign in to comment.