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

Method encode

data_utils/sp_tokenizer.py:103–107  ·  view source on GitHub ↗

text="...."

(self, text)

Source from the content-addressed store, hash-verified

101 self.sp.Load(model_path)
102
103 def encode(self, text):
104 """
105 text="...."
106 """
107 return self.sp.EncodeAsIds(text)
108
109 def decode(self, tokens):
110 """

Callers

nothing calls this directly

Calls 1

EncodeAsIdsMethod · 0.45

Tested by

no test coverage detected