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

Method decode

llama_cpp/llama_tokenizer.py:69–70  ·  view source on GitHub ↗
(self, tokens: List[int])

Source from the content-addressed store, hash-verified

67 )
68
69 def decode(self, tokens: List[int]) -> str:
70 return self.detokenize(tokens).decode("utf-8", errors="ignore")
71
72 @classmethod
73 def from_ggml_file(cls, path: str) -> "LlamaTokenizer":

Callers 2

tokenizeMethod · 0.45
detokenizeMethod · 0.45

Calls 1

detokenizeMethod · 0.95

Tested by

no test coverage detected