We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
expand_vocab里面的add_new_tokens,会把token加到tokens_trie, 仅适用于slow tokenizer,因为fast模式尽管添加了,但是在tokenize的时候直接调用encode_plus,会调用rust,这就会出问题。即如果下载了llama2-xxx-hf的情况下。 model=AutoTokenizer.from_pretrained("d:/models/Llama-2-7b-chat-hf") model.add_tokens("谁") print(model.tokenize("你是谁")) 会发现不生效
建议修改:任选其一
#66
The text was updated successfully, but these errors were encountered:
No branches or pull requests
expand_vocab里面的add_new_tokens,会把token加到tokens_trie, 仅适用于slow tokenizer,因为fast模式尽管添加了,但是在tokenize的时候直接调用encode_plus,会调用rust,这就会出问题。即如果下载了llama2-xxx-hf的情况下。
model=AutoTokenizer.from_pretrained("d:/models/Llama-2-7b-chat-hf")
model.add_tokens("谁")
print(model.tokenize("你是谁"))
会发现不生效
建议修改:任选其一
#66
The text was updated successfully, but these errors were encountered: