Update deserialize of added tokens#1891
Merged
ArthurZucker merged 36 commits intomainfrom Nov 27, 2025
Merged
Conversation
…on-and-add-token-metho
…token-metho' of github.com:ArthurZucker/tokenizers into codex/optimize-addedvocabulary-deserialization-and-add-token-metho
…dd tokens to the vocab man....
…ptimize-addedvocabulary-deserialization-and-add-token-metho
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
…ptimize-addedvocabulary-deserialization-and-add-token-metho
Collaborator
Author
|
@jannisborn ty for testing 😉 |
…on-and-add-token-metho
…token-metho' of github.com:huggingface/tokenizers into codex/optimize-addedvocabulary-deserialization-and-add-token-metho
|
Amazing @ArthurZucker, it's still lightspeed fast. Loading a tokenizer with 150K tokens, 140K of which are special tokens, takes 3.5sec |
Collaborator
Author
|
Damnnn amazing! 🤗 |
McPatate
approved these changes
Nov 28, 2025
| with: | ||
| command: audit | ||
| args: -D warnings -f ./tokenizers/Cargo.lock --ignore RUSTSEC-2024-0436 --ignore RUSTSEC-2025-0014 | ||
| args: -D warnings -f ./tokenizers/Cargo.lock --ignore RUSTSEC-2024-0436 --ignore RUSTSEC-2025-0014 --ignore RUSTSEC-2025-0119 |
Member
There was a problem hiding this comment.
Could be the opportunity to do some cleaning within our deps, but don't know the context that much.
Collaborator
Author
There was a problem hiding this comment.
yeah just unmaintained...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
8-9x speedup on special tokens and about 4x on non-special cases for deserialization
Fixes #1635 and superseeds #1782