Skip to content

Commit

Permalink
Merge pull request #14 from bigscience-workshop/fix-gpt-j
Browse files Browse the repository at this point in the history
Add `eot_token` property to gpt-j
  • Loading branch information
jon-tow authored Apr 28, 2022
2 parents f65e196 + 32d0658 commit efd319b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lm_eval/models/gptj.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def __init__(
# if gpus > 1:
# self.gptj = nn.DataParallel(self.gptj)

@property
def eot_token(self):
return self.tokenizer.eos_token

@property
def eot_token_id(self):
# we use EOT because end of *text* is more accurate for what we're doing than end of *sentence*
Expand Down

0 comments on commit efd319b

Please sign in to comment.