MCPcopy Create free account
hub / github.com/Tele-AI/Telechat / _tokenize

Method _tokenize

models/12B/tokenization_telechat.py:82–84  ·  view source on GitHub ↗

Returns a tokenized string.

(self, text)

Source from the content-addressed store, hash-verified

80 return vocab
81
82 def _tokenize(self, text):
83 """Returns a tokenized string."""
84 return self.sp_model.encode(text, out_type=str)
85
86 def _convert_token_to_id(self, token):
87 """Converts a token (str) in an id using the vocab."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected