huggingface / transformers

🤗 Transformers: State-of-the-art Machine Learning for Pytorch, TensorFlow, and JAX.
https://huggingface.co/transformers
Apache License 2.0
131.32k stars 26.11k forks source link

cannot find model in model name list #2841

Closed zxr19980213 closed 4 years ago

zxr19980213 commented 4 years ago

Hi , thank you for developing well-made pytorch version of BERT !

I am new to NLP area and have problem while coding like this:

tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')

The error discription is below:

INFO:pytorch_pretrained_bert.file_utils:https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt not found in cache, downloading to C:\Users\zxr\AppData\Local\Temp\tmpb3lgzjlo
ERROR:pytorch_pretrained_bert.tokenization:Model name 'bert-base-uncased' was not found in model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese). We assumed 'https://s3.amazonaws.com/models.huggingface.co/bert/bert-base-uncased-vocab.txt' was a path or url but couldn't find any file associated to this path or url.

I searched it and thought it might be poor internet connect.

I downloaded the model i want but donot know how to load it with code.

Thank you very much for your attention!

LysandreJik commented 4 years ago

Hi, could you please provide all the information required in the template so that we may help you? Namely which version of transformers, python and PyTorch are you using?

You seem to be using pytorch-pretrained-BERT, which is a very old version of this repository. Have you tried using the newer transformers, which has much more functionalities and is more robust than pytorch-pretrained-BERT?

zxr19980213 commented 4 years ago

I am using Python 3.6.9 , torch 1.3.1 and pytorch-pretrained-bert 0.6.2 .

I am following the tutorial on https://pypi.org/project/pytorch-pretrained-bert/ and meet with this problem.

zxr19980213 commented 4 years ago

I changed to a better Internet and this problem solved . Sorry for your time and thank you for your attention !

1029694141 commented 2 years ago

can u tell me how to change a better internet? i met thie question too

1029694141 commented 2 years ago

@zxr19980213