-
Notifications
You must be signed in to change notification settings - Fork 11.7k
[llama] Add resegment post processing of tokenizer #2072
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
base: master
Are you sure you want to change the base?
Conversation
I would suggest comparing the output with what sentepiecepiece produces. I don't know anything beyond what @vjeux commented. |
I read through the code. One thing which concerns me is this line in convert.py: when we replace "\u2581" with space, we lose some information. give the original example in the related issue:
in llama.cpp, token 785 is " ▁–" (there is a leading space). So llama cannot recognize this string is token 785. It will divide this into three chars as many other unicode chars are handling. Need some insights from @ggerganov why we decide to do the replacement? |
@howard0su FYI FIx parsing single-byte UTF-8 tokens by manually parsing the protobuf TL;DR |
Sorry, I cannot find a test case that can hit the new segment code I added. |
I have only brief understanding of how the tokenizer works, so won't be able to help much. Maybe we can add even more test cases to the |
Try to adress #2023