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

Method TokenToId

data_utils/tokenization.py:533–535  ·  view source on GitHub ↗

Convert a Token to Id. Lookup of self.vocab

(self, token)

Source from the content-addressed store, hash-verified

531 raise NotImplementedError('TextTokenizer IdToToken not implemented')
532
533 def TokenToId(self, token):
534 """Convert a Token to Id. Lookup of self.vocab"""
535 raise NotImplementedError('TextTokenizer TokenToId not implemented')
536
537 def DecodeIds(self, Ids):
538 """Convert a list or tokenization object of Ids to a text string"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected