MCPcopy
hub / github.com/THUDM/LongWriter / get_prefix_tokens

Method get_prefix_tokens

train/patch/tokenization_chatglm.py:152–154  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 return (vocab_file,)
151
152 def get_prefix_tokens(self):
153 prefix_tokens = [self.get_command("[gMASK]"), self.get_command("<sop>")]
154 return prefix_tokens
155
156 def build_single_message(self, role, metadata, message):
157 assert role in ["system", "user", "assistant", "observation"], role

Callers 1

Calls 1

get_commandMethod · 0.95

Tested by

no test coverage detected