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

Method is_fast

bert/tokenization_utils_base.py:162–167  ·  view source on GitHub ↗

Indicate if this BatchEncoding was generated from the result of a PreTrainedTokenizerFast Returns: True if generated from subclasses of PreTrainedTokenizerFast, else otherwise

(self)

Source from the content-addressed store, hash-verified

160
161 @property
162 def is_fast(self):
163 """
164 Indicate if this BatchEncoding was generated from the result of a PreTrainedTokenizerFast
165 Returns: True if generated from subclasses of PreTrainedTokenizerFast, else otherwise
166 """
167 return self._encodings is not None
168
169 def __getitem__(self, item: Union[int, str]) -> EncodingFast:
170 """ If the key is a string, get the value of the dict associated to `key` ('input_ids', 'attention_mask'...)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected