Transformers: Easier way to download pretrained model files to local

Created on 6 Jul 2020  ยท  1Comment  ยท  Source: huggingface/transformers

โ“ Questions & Help

Details


Is there any why we can save vocab and models files to local without having to run the following code with cache_dir parameter. What i am asking is some utility or some endpoint from where we could get a tar of all model files.

from transformers import BartTokenizer, BartForSequenceClassification
tokenizer = BartTokenizer.from_pretrained('facebook/bart-large',cache_dir='path/to/local_dir')
model = BartForSequenceClassification.from_pretrained('facebook/bart-large',cache_dir='path/to/local_dir')

The reason for such a requirement is, we run our code in VMs where there is no internet access, so we have to run the code in our local for every model and save files. It would be helpful if there is a easier way to download all the files for pretrained models as a tar or zip file.

wontfix

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings