MCPcopy Create free account
hub / github.com/abetlen/llama-cpp-python / tokenize

Method tokenize

llama_cpp/llama_tokenizer.py:49–52  ·  view source on GitHub ↗
(
        self, text: bytes, add_bos: bool = True, special: bool = True
    )

Source from the content-addressed store, hash-verified

47 self._model = llama._model # type: ignore
48
49 def tokenize(
50 self, text: bytes, add_bos: bool = True, special: bool = True
51 ) -> List[int]:
52 return self._model.tokenize(text, add_bos=add_bos, special=special)
53
54 def detokenize(
55 self,

Callers 1

encodeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected