-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
How to find the corresponding download models from Amazon? #2157
Comments
Hi, they are named as such because that's a clean way to make sure the model on the S3 is the same as the model in the cache. The name is created from the If you want to save it with a given name, you can save it as such: from transformers import BertModel
model = BertModel.from_pretrained("bert-base-cased")
model.save_pretrained("cased_L-12_H-768_A-12") |
@LysandreJik, following up the question above, and your answer, I ran this command first:
I guess, we expect config.json, vocab, and all the other necessary files to be saved in Then I ran:
and I am getting:
I checked the same issue with the XLNET:
What am I missing here? Why are all the files not downloaded properly? Thanks. |
You also have to save the tokenizer into the same directory: tokenizer.save_pretrained("./roberta-large-355M") Let me know if this solves your issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
OSError: Model name 'roberta-base' was not found in tokenizers model name list (roberta-base, roberta-large, roberta-large-mnli, distilroberta-base, roberta-base-openai-detector, roberta-large-openai-detector). We assumed 'roberta-base' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.json', 'merges.txt'] but couldn't find such vocabulary files at this path or url. |
the problem for me is , when i load the model turning wifi off or switch off internet connection it fail to run but when i turn internet connection it run again. how can i run it off line. result |
import os text = 'i am fine. what about you?' |
i have dig down into the sentence_transformers lib to see which folder contain the file after downloaded. And came up with this script to see where sentence_transformers keep its files. import os
torch_home = os.path.expanduser(
os.getenv("TORCH_HOME",
os.path.join(os.getenv("XDG_CACHE_HOME",
"~/.cache"), 'torch')))
print(torch_home) i hope it helps |
thanks. the code works on windows too |
❓ Questions & Help
As we know, the TRANSFORMER could easy auto-download models by the pretrain( ) function.
And the pre-trained BERT/RoBerta model are stored at the path of
./cach/.pytorch/.transformer/....
But, all the name of the download models are like this:
d9fc1956a01fe24af529f239031a439661e7634e6e931eaad2393db3ae1eff03.70bec105b4158ed9a1747fea67a43f5dee97855c64d62b6ec3742f4cfdb5feda.json
It's not readable and hard to distinguish which model is I wanted.
In another word, if I want to find the pretrained model of 'uncased_L-12_H-768_A-12', I can't finde which one is ?
Thanks for your answering.
The text was updated successfully, but these errors were encountered: