We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
PretrainedFromHF
1 parent 09a35f5 commit b2fc665Copy full SHA for b2fc665
1 file changed
megatron/tokenizer/tokenizer.py
@@ -388,6 +388,18 @@ def eos(self):
388
candidate = self.tokenizer.eos_token_id
389
return self._check_token_candidate(candidate)
390
391
+ @property
392
+ def bos_token_id(self):
393
+ """Id of the beginning of sentence token in the vocabulary."""
394
+ candidate = self.tokenizer.bos_token_id
395
+ return self._check_token_candidate(candidate)
396
+
397
398
+ def eos_token_id(self):
399
+ """Id of the end of sentence token in the vocabulary."""
400
+ candidate = self.tokenizer.eos_token_id
401
402
403
@property
404
def additional_special_tokens_ids(self):
405
""" All the additional special tokens you may want to use (list of strings)."""
0 commit comments