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

Why the tokenizer is slower than tiktoken? #1519

Open
BigBinnie opened this issue Apr 29, 2024 · 2 comments
Open

Why the tokenizer is slower than tiktoken? #1519

BigBinnie opened this issue Apr 29, 2024 · 2 comments
Labels

Comments

@BigBinnie
Copy link

Hi, I tried to use the GPT2 tokenizer of HF and TikToken, but I found TikToken is faster than HF. Could you explain why this might happen?

Screen Shot 2024-04-29 at 6 43 14 PM
@ArthurZucker
Copy link
Collaborator

Hey, could you share a reproducer?
Some things are related to the fact that we keep track of the offset and a lot of information, which tiktoken does not.
But we could only do this when ask and improve speed potentially.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants