OSError: Unable to load weights from pytorch checkpoint file.
See original GitHub issueHello,
When I am trying to load the Roberta-large
pre-trained model, I get the following error:
model_RobertaForMultipleChoice = RobertaForMultipleChoice.from_pretrained('roberta-large', output_hidden_states = True)
OUT:
OSError: Unable to load weights from pytorch checkpoint file. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
How can I solve this issue? Thank you,
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Unable to load weights from pytorch checkpoint file #4336
You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load...
Read more >OSError: Unable to load weights from pytorch checkpoint file
Hi, everyone. I need some help. I have been developing the Flask website that has embedded one of Transformer's fine-tuned models within it....
Read more >Unable to load weights from pytorch checkpoint after splitting ...
bin of a pretrained deeppavlov ruBERT model but I have a file size limit. So I split it into chunks using python, transferred...
Read more >Help Set tf=True? - PyTorch Forums
OSError : Unable to load weights from pytorch checkpoint file for 'EleutherAI/gpt-neo-2.7B' at 'C:\Users\USER7/.cache\huggingface\transformers\ ...
Read more >First run fails : r/StableDiffusion - Reddit
Looks like it can't find this path: "Error: Unable to load weights from pytorch checkpoint file for 'C:\Users\zirni/.cache\huggingface\ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same as https://github.com/huggingface/transformers/issues/6620, i guess it is because the checkpoint file is not a true checkpoint file: such as a git lfs file.
Please open a new issue with your specific problem, alongside all the information related to your environment as asked in the template. Thank you.