MCPcopy Create free account
hub / github.com/THUDM/GLM / __len__

Method __len__

data_utils/tokenization.py:273–275  ·  view source on GitHub ↗

total number of tokens

(self)

Source from the content-addressed store, hash-verified

271 return self.EncodeAsIds(text, process_fn=process_fn)
272
273 def __len__(self):
274 """total number of tokens"""
275 return self.num_tokens
276
277 def get_command(self, name):
278 """get command token corresponding to `name`"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected