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

Method mask_token_id

bert/tokenization_utils_base.py:861–865  ·  view source on GitHub ↗

Id of the mask token in the vocabulary. E.g. when training a model with masked-language modeling. Log an error if used while not having been set.

(self)

Source from the content-addressed store, hash-verified

859
860 @property
861 def mask_token_id(self):
862 """ Id of the mask token in the vocabulary. E.g. when training a model with masked-language modeling. Log an error if used while not having been set. """
863 if self._mask_token is None:
864 return None
865 return self.convert_tokens_to_ids(self.mask_token)
866
867 @property
868 def additional_special_tokens_ids(self):

Callers

nothing calls this directly

Calls 1

convert_tokens_to_idsMethod · 0.80

Tested by

no test coverage detected