MCPcopy Create free account
hub / github.com/SooLab/CGFormer / bos_token_id

Method bos_token_id

bert/tokenization_utils_base.py:814–818  ·  view source on GitHub ↗

Id of the beginning of sentence token in the vocabulary. Log an error if used while not having been set.

(self)

Source from the content-addressed store, hash-verified

812
813 @property
814 def bos_token_id(self):
815 """ Id of the beginning of sentence token in the vocabulary. Log an error if used while not having been set. """
816 if self._bos_token is None:
817 return None
818 return self.convert_tokens_to_ids(self.bos_token)
819
820 @property
821 def eos_token_id(self):

Callers

nothing calls this directly

Calls 1

convert_tokens_to_idsMethod · 0.80

Tested by

no test coverage detected