llama-cpp-python
llama-cpp-python copied to clipboard
Enable detokenizing special tokens
I noticed that it was not possible to detokenize special tokens, such as the EOS token, when using Phi-3(.1). This PR makes sure that the special
flag can be passed to the detokenize()
method of both the LlamaTokenizer
and the LlamaHFTokenizer
I also noticed that prev_tokens
was not being used in the detokenize method of LlamaTokenizer
, so this PR also adds that functionality based on LlamaHFTokenizer