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

[Feature] support Assign token to update the content of a token #1570

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from

Conversation

ArthurZucker
Copy link
Collaborator

@ArthurZucker ArthurZucker commented Jul 12, 2024

Very draft for now:

  • handle potential collisions

fixes #1473

@HuggingFaceDocBuilderDev

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.

@pritam-dey3
Copy link

We really need this feature! Is it tracked anywhere else?

@ArthurZucker ArthurZucker reopened this Aug 29, 2024
@ArthurZucker
Copy link
Collaborator Author

oups sorry, yeah here is the good place will come back in a bit!

@ArthurZucker
Copy link
Collaborator Author

Okay, so this PR works for assigning, but the issue is that for Unigram based models if the world is not removed from the internal lattice, it can still be "encoded". Might be an issue.
We are also updating the added_tokens layer on top of vocab

@ArthurZucker
Copy link
Collaborator Author

Related to #1437 that does not work for unigram as if the token is in the vocabulary, even if it is special, it's still added to the unigram algorithm!

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

Successfully merging this pull request may close these issues.

Assign <unusedXX> tokens with special_tokens without growing vocab size
3 participants