MCPcopy
hub / github.com/zai-org/CogView / decode

Method decode

data_utils/sp_tokenizer.py:110–115  ·  view source on GitHub ↗

tokens=[x1,x2,...]

(self, tokens)

Source from the content-addressed store, hash-verified

108 return self.sp.EncodeAsIds(text)
109
110 def decode(self, tokens):
111 """
112 tokens=[x1,x2,...]
113 """
114 text = [int(token) for token in tokens]
115 return self.sp.DecodeIds(text)
116
117 def tokenize(self, text):
118 return self.sp.EncodeAsPieces(text)

Callers

nothing calls this directly

Calls 1

DecodeIdsMethod · 0.45

Tested by

no test coverage detected