Skip to content
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

Chinese characters #19

Closed
jiangyklala opened this issue Apr 24, 2023 · 2 comments
Closed

Chinese characters #19

jiangyklala opened this issue Apr 24, 2023 · 2 comments

Comments

@jiangyklala
Copy link

Hello, it seems that there is a slight difference in the calculation of Chinese characters between this project and the Tokenizer on the official website.
The model I use is gpt-3.5-turbo, and the following are two comparison pictures:

@tox-p
Copy link
Contributor

tox-p commented Apr 24, 2023

Do you mean this tokenizer: https://platform.openai.com/tokenizer ?

The above linked tokenizer uses r50k_base as encoding, while gpt-3.5-turbo uses cl100k_base as encoding.

Try this one, mentioned in this tiktoken FAQ, for your comparison: https://tiktokenizer.vercel.app/ (make sure to use the textbox input and not the message input if comparing the encoding of a raw string like in your screen)

@jiangyklala
Copy link
Author

Solved !
Thanks for answering and contributing such a good library !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants