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

Method DecodeTokens

data_utils/tokenization.py:607–611  ·  view source on GitHub ↗

just concatenates ascii tokens into text

(self, Tokens)

Source from the content-addressed store, hash-verified

605 return ''.join([self.IdToToken(tok) for tok in Ids])
606
607 def DecodeTokens(self, Tokens):
608 """just concatenates ascii tokens into text"""
609 if isinstance(Tokens, Tokenization):
610 Tokens = Tokens.tokenization
611 return ''.join(Tokens)
612
613
614MAX_SENTENCEPIECE_SENTENCES = 100000000

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected