-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
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
Llama 2 tokenizer: apparition of the token id 29871 #26273
Comments
Hey, could you try this on |
Same (wrong) result with |
Okay, this is actually expected, |
Hello! Same issue here. @ArthurZucker, can you clarify your comment? What is
Do you mean >>> tkzr = AutoTokenizer.from_pretrained("./llama-2")
>>> tkzr.encode("\nhi")
[1, 29871, 13, 2918]
>>> tkzr.encode("\nhi", add_special_tokens=False)
[29871, 13, 2918]
>>> tkzr.decode([29871, 13, 2918])
'\nhi'
>>> tkzr.decode([13, 2918])
'\nhi'
>>> tkzr.decode([29871])
'' |
No the argument you might be looking for is |
Got it, I'm following this now. Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
System Info
transformers==4.31.0
meta-llama/Llama-2-7b-hf
Who can help?
@ArthurZucker
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Expected behavior
We hope that tokenizing each part of the prompt will lead to the same result as tokenizing the prompt. But not.
Why does token ID 29871 appear?
The text was updated successfully, but these errors were encountered: