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

Method DecodeTokens

data_utils/tokenization.py:777–781  ·  view source on GitHub ↗

converts sentencepiece tokens to a text string

(self, Tokens)

Source from the content-addressed store, hash-verified

775 return self.sp.DecodeIds(Ids)
776
777 def DecodeTokens(self, Tokens):
778 """converts sentencepiece tokens to a text string"""
779 if isinstance(Tokens, Tokenization):
780 Tokens = Tokens.tokenization
781 return self.sp.DecodeTokens(Tokens)
782
783
784class BertWordPieceTokenizer(Tokenizer):

Callers

nothing calls this directly

Calls 1

DecodeTokensMethod · 0.45

Tested by

no test coverage detected