Failed to Download GPT2-large Model from Hub
daskol opened this issue · 3 comments
System Info
py312, transformers 4.40.2, huggingface-hub 0.23.0.
Who can help?
@ArthurZucker and @younesbelkada
Information
- The official example scripts
- My own modified scripts
Tasks
- An officially supported task in the
examples
folder (such as GLUE/SQuAD, ...) - My own task or dataset (give details below)
Reproduction
>>> from transformers import AutoModelForCausalLM
>>> model = AutoModelForCausalLM.from_pretrained('gpt2-large')
...
OSError: gpt2-large does not appear to have a file named config.json. Checkout 'https://huggingface.co/gpt2-large/tree/None' for available files.
It seems that tranformers
failed to resolve branch and tried to find config.json
in non-existing branch None
.
Expected behavior
The script above has to download and load model.
Hi @daskol
Thanks for the issue ! Can you try with openai-community/gpt2-large
instead ? We recently migrated the canonical models into dedicated organisations. It is surprising as automatic redirection should work, I just ran your snippet in my local env and it worked fine
Yes, openai-community/gpt2-large
works for me as well. I have noticed that gpt2*
repos were moved and populate them manually from openai-community/gpt2*
. I think the issue exists in case if there is nothing cached.