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
Cant load tokenizer locally after downloading it #11243
Comments
Hi, that's because the tokenizer first looks to see if the path specified is a local path. Since you're saving your model on a path with the same identifier as the hub checkpoint, when you're re-running the script both the model and tokenizer will look into that folder. The tokenizer doesn't find anything in there, as you've only saved the model, not the tokenizer. You should either save the tokenier as well, or change the path so that it isn't mistaken for a local path when it should be the hub. |
How could I also save the tokenizer? Im newbie with transformer library and I took that code from the webpage. |
You can add |
i love you Lysanderjik |
Hi!
I'm following the tutorial for this pretrained model https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment. It works the first time I run it (and download the tokenizer) but after that it will complain that I don't have any tokenizer on the path specified.
The code is the following
And fails on
tokenizer = AutoTokenizer.from_pretrained(MODEL)
with output:After running the script
train.py
the tokenizer is downloaded to the path the script is on. The path structrue is like this:I have transformers version 4.5.1
The text was updated successfully, but these errors were encountered: