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

sentence piece tokenizer support for TokenizerInfo #120

Merged
merged 9 commits into from
Dec 22, 2024

Conversation

zanderjiang
Copy link
Contributor

No description provided.

python/xgrammar/tokenizer_info.py Outdated Show resolved Hide resolved
python/xgrammar/tokenizer_info.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@Ubospica Ubospica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

Could you leave a benchmark result in comments of this pr:

  • The cpu you are using
  • The model used (three kinds: hf, tiktoken, sp)
  • TokenizerInfo Build time

We can merge it after addressing these issues.

python/xgrammar/tokenizer_info.py Outdated Show resolved Hide resolved
@zanderjiang
Copy link
Contributor Author

CPU: Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz

Build-time tests:
"meta-llama/Meta-Llama-3-8B-Instruct" (hf)
build_time: 0.5978555679321289

"microsoft/Phi-3.5-mini-instruct" (hf)
build_time: 0.10898065567016602

"Qwen/Qwen-7B-Chat" (tiktoken)
build_time: 0.08476638793945312

"THUDM/glm-4-9b-chat" (tiktoken)
build_time: 0.11713862419128418

"THUDM/chatglm3-6b" (sp)
build_time: 0.1258544921875

Copy link
Collaborator

@Ubospica Ubospica left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. Thanks @zanderjiang!

@Ubospica Ubospica merged commit 8bc7b1d into mlc-ai:main Dec 22, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants