Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
ShashankMosaicML committed Jan 17, 2024
1 parent ed667db commit 092539f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llmfoundry/models/mpt/modeling_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ def get_targets(self, batch: Mapping) -> torch.Tensor:
if self.tokenizer is not None and hasattr(self.tokenizer,
'eos_token_id'):
targets = torch.where(
batch['input_ids'] == self.tokenizer.eos_token_id, -100,
batch['labels'] == self.tokenizer.eos_token_id, -100,
targets)
return targets

Expand Down

0 comments on commit 092539f

Please sign in to comment.