Skip to content

Commit

Permalink
rm this commit that wasn't the right branch
Browse files Browse the repository at this point in the history
  • Loading branch information
maxisawesome committed Feb 26, 2024
1 parent f1a8d41 commit a7708fb
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions composer/models/huggingface.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,8 @@ def eval_forward(self, batch, outputs: Optional[Any] = None):
# don't remove prefix space to sentencepiece models
if len(self.tokenizer(
' a', add_special_tokens=False)['input_ids']) == 1: # pyright: ignore[reportGeneralTypeIssues]
try:
return self.tokenizer.batch_decode(generation[:, batch['input_ids'].shape[1]:],
skip_special_tokens=True)
except:
log.info("failing!")
log.info(generation)
log.info(batch['input_ids'].shape)
log.info(batch['input_ids'])
return self.tokenizer.batch_decode(generation[:, batch['input_ids'].shape[1]:],
skip_special_tokens=True)
else:
return [
' ' + generation
Expand Down

0 comments on commit a7708fb

Please sign in to comment.