Skip to content

fix(BucketVocabStore): Explicit duplicate handling - #2467

Open
SBrandeis wants to merge 2 commits into
mainfrom
fix/vocab-store-duplicates
Open

SBrandeis wants to merge 2 commits into
mainfrom
fix/vocab-store-duplicates

Conversation

@SBrandeis

Copy link
Copy Markdown
Collaborator

Prompted by #2447

TL;DR

BucketVocabStore::build is now fallible
It can fail to build if there is a hash collision between two token bytes

Also use the warn! macro instead of println! when a token is present twice (or more) in the vocabulary, and avoid printing the whole vocab in the stdout

@SBrandeis
SBrandeis requested review from ArthurZucker and McPatate and removed request for ArthurZucker September 28, 2026 16:08
@SBrandeis SBrandeis changed the title Fix/vocab store duplicates fix(BucketVocabStore): Explicit duplicate handling Sep 28, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

This branch has not been deployed

No deployments
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