-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
AutoTokenizer
not enforcing use_fast=True
#20817
Comments
The name has been around for so long that we won't change it. It's not ideal but it is what is 🤷♂️ We can definitely improve the documentation however! Unrelated: why does OPT not create the fast tokenizer on the fly from the slow one @ArthurZucker ? This seems like abug. |
It is indeed a bug and people seem to be confused. IMO we should add a warning when |
If you have to use a warnings in this situation it's a sign that API needs to be improved. Warnings rarely work as there are dozens/hundreds of them emitted by most applications and a user is unlikely to notice it. That's just my experience-based opinion, of course. If the old name can't be deprecated, I'd leave it alone and update the doc as a I suggested in the OP and add a new arg
some of the OPT models do and some don't, you can see in the OP both examples are OPT models. |
Agreed, the problem is now the inconsistency between two models. If it is only |
It is indeed a bug, the |
so where are we with this Issue, @ArthurZucker? Thank you! As it will get closed by the stale bot. |
I think the doc has been updated and the OPT model where there was a problem has been fixed, so the issue is ready to be closed no? |
Yes, I re-opened it because I thought we should probably raise and error if the tokenizer is not fast, but feel free to close. |
As was said before here, either raising an error or renaming the argument would be too much of a breaking change for something that has been around for three years. |
This issue is about
AutoTokenizer
not enforcinguse_fast=True
.This works:
now the same code, but a different model 'facebook/opt-1.3b' that doesn't have a fast optimizer:
now the doc says:
so it sort of hints with "try to load" that it won't enforce it. But would you be open to a less ambiguous definition? something like:
I think the
use_fast
arg name is ambiguous - I'd have renamed it totry_to_use_fast
since currently if one must use the fast tokenizer one has to additionally check that thatAutoTokenizer.from_pretrained
returned the slow version.not sure, open to suggestions.
context: in m4 the codebase currently requires a fast tokenizer.
Thank you!
cc: @ArthurZucker
The text was updated successfully, but these errors were encountered: