MCPcopy
hub / github.com/policy-gradient/GRPO-Zero / tokenize

Method tokenize

tokenizer.py:34–35  ·  view source on GitHub ↗
(self, text: str)

Source from the content-addressed store, hash-verified

32 return self.encode_chat(messages) + prompt
33
34 def tokenize(self, text: str) -> Encoding:
35 return self.tokenizer.encode(text)
36
37 def detokenize(self, token_ids: List[int]) -> str:
38 return self.tokenizer.decode(token_ids, skip_special_tokens=False)

Callers 1

encode_prefixMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected