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

Method IdToToken

data_utils/tokenization.py:529–531  ·  view source on GitHub ↗

Convert an Id to Token. Reverse lookup of self.vocab

(self, Id)

Source from the content-addressed store, hash-verified

527 raise NotImplementedError('TextTokenizer EncodeAsTokens not implemented')
528
529 def IdToToken(self, Id):
530 """Convert an Id to Token. Reverse lookup of self.vocab"""
531 raise NotImplementedError('TextTokenizer IdToToken not implemented')
532
533 def TokenToId(self, token):
534 """Convert a Token to Id. Lookup of self.vocab"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected