Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kashif committed Jun 2, 2024
1 parent c8a3c3b commit cd6f554
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions trl/trainer/dpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,6 @@ def get_batch_logps(

return (per_token_logps * loss_mask).sum(-1), loss_mask.sum(-1)

# if average_log_prob:
# return (per_token_logps * loss_mask).sum(-1) / loss_mask.sum(-1)
# else:
# return (per_token_logps * loss_mask).sum(-1)

def concatenated_forward(
self, model: nn.Module, batch: Dict[str, Union[List, torch.LongTensor]]
) -> Tuple[torch.FloatTensor, torch.FloatTensor, torch.FloatTensor, torch.FloatTensor]:
Expand Down

0 comments on commit cd6f554

Please sign in to comment.