I face "FileNotFoundError: [Errno 2] No such file or directory" error

Hello, guys.
I am not accustomed to using pretrained large models provided by huggingface and need some helps.

When downloading pretranied models from huggingface_hub, for example, DialoGPT, I face the “FileNotFoundError: [Errno 2] No such file or directory” error !

Specifically, the directory where the pretrained models are downloaded is “/.cache/huggingface/hub/models–microsoft–DialoGPT-small/refs/main”, but the directory just ends up with “/.cache/huggingface/hub/models–microsoft–DialoGPT-small”.

And, FileNotFoundError pops up displaying “[Errno 2] No such file or directory: ‘/.cache/huggingface/hub/models–microsoft–DialoGPT-small/refs/main’” message.

What do I have to do with this error? Please help me.

Hi, did you find a solution to this?

Have you tried saving it somewhere else more explicitly?

When I try run some demo, it appears xxx_model.bin not found.I download the file manually and modify the error code.It seems it’s huggingface problem because the other demo is success.

Hi, I am facing the same issue after huggingface login using interpreter_login(), wherein after entering the access key (write) from huggingface access tokens, I end up getting “FileNotFoundError: [WinError 2] The system cannot find the file specified”. Could anyone provide some help on this

Okay, installing GIT and adding it to your system variables/user variables resolved the issue.

1 Like