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

Method DecodeIds

data_utils/tokenization.py:771–775  ·  view source on GitHub ↗

converts ids to a text string

(self, Ids)

Source from the content-addressed store, hash-verified

769 return self.sp.PieceToId(token)
770
771 def DecodeIds(self, Ids):
772 """converts ids to a text string"""
773 if isinstance(Ids, Tokenization):
774 Ids = Ids.tokenization
775 return self.sp.DecodeIds(Ids)
776
777 def DecodeTokens(self, Tokens):
778 """converts sentencepiece tokens to a text string"""

Callers

nothing calls this directly

Calls 1

DecodeIdsMethod · 0.45

Tested by

no test coverage detected