problem when loading local model
Author: YuzheMao
Pull request: no

I have problem when I use

`PRE_TRAINED_MODEL_NAME = './chinese-roberta-wwm-ext'
tokenizer = BertTokenizer.from_pretrained(PRE_TRAINED_MODEL_NAME)`

and put the model on "'./chinese-roberta-wwm-ext" directory, it still download another new model in "/.cache" but not my local model. And every time I run it I have to wait for a long time.
 info shows

> 09/29/2021 18:36:00 - INFO - filelock -   Lock 140057189920976 acquired on /home/maoyuzhe/.cache/huggingface/transformers/92a56e79ec6564fd501527ed88ca336637eb4bfeb28d10580c3bbdfb7889a032.accd894ff58c6ff7bd4f3072890776c14f4ea34fcc08e79cd88c2d157756dceb.lock
Downloading: 100%|████████████████████████████| 107k/107k [00:00<00:00, 223kB/s]
09/29/2021 18:44:45 - INFO - filelock -   Lock 140057189920976 released on /home/maoyuzhe/.cache/huggingface/transformers/92a56e79ec6564fd501527ed88ca336637eb4bfeb28d10580c3bbdfb7889a032.accd894ff58c6ff7bd4f3072890776c14f4ea34fcc08e79cd88c2d157756dceb.lock
09/29/2021 18:45:26 - INFO - filelock -   Lock 140057049130192 acquired on /home/maoyuzhe/.cache/huggingface/transformers/87c7eedd995b4bae2c34df3baf2cbd5df5496bed675126427849c72e590f5574.5cc6e825eb228a7a5cfd27cb4d7151e97a79fb962b31aaf1813aa102e746584b.lock

sometimes it shows

> Traceback (most recent call last):
  File "/tmp/pycharm_project_711/main.py", line 230, in <module>
    tokenizer = BertTokenizer.from_pretrained(PRE_TRAINED_MODEL_NAME)
  File "/home/maoyuzhe/.conda/envs/BDCI/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 1655, in from_pretrained
    local_files_only=local_files_only,
  File "/home/maoyuzhe/.conda/envs/BDCI/lib/python3.7/site-packages/transformers/tokenization_utils_base.py", line 3460, in get_fast_tokenizer_file
    path_or_repo, revision=revision, use_auth_token=use_auth_token, local_files_only=local_files_only
  File "/home/maoyuzhe/.conda/envs/BDCI/lib/python3.7/site-packages/transformers/file_utils.py", line 1730, in get_list_of_files
    path_or_repo, revision=revision, token=token
  File "/home/maoyuzhe/.conda/envs/BDCI/lib/python3.7/site-packages/huggingface_hub/hf_api.py", line 503, in model_info
    r.raise_for_status()
  File "/home/maoyuzhe/.conda/envs/BDCI/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://huggingface.co/api/models/chinese-roberta-wwm-ext

Process finished with exit code 1


emo :(

Comments:
Hello! Could you show the full code that yields this error? Thanks!

> Hello! Could you show the full code that yields this error? Thanks!

https://github.com/YuzheMao/ChallengeHub-Baselines/blob/main/aiqiyi-baseline.ipynb
here is the code, error occurs in 4.1

I don't see the error in the notebook!

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/master/CONTRIBUTING.md) are likely to be ignored.