Error 403! What to do about it?

This helped me. Thank you!

1 Like

Wow, this worked immediately. Use write token

I changed it to write token, but I am still getting the same error. Kindly help.

3 Likes

I tried with a ‘write’ token and deleted the commite message and it still not working!!! any solutions?

Great, generating a write mode token in huggingface works immediately

Thanks lot

_____thank yo _________

I am using the token with write permission still stucked with same issue, please help me.
In my case i am getting the 403 error and the error message is:
“Access to model meta-llama/Llama-2-7b-chat-hf is restricted and you are not in the authorized list. Visit meta-llama/Llama-2-7b-chat-hf · Hugging Face to ask for access.”

Same issue using colab and have tried several different write tokens. This is a ridiculous problem and is infuriating after a 30 min epoch to have it fail. I’ve tried 20 different ways to get this to work. Please explain a way to debug this more precisely.

1 Like

Yes, I have the same issue. Different write tokens used, logged in as correct user etc. Any ideas?

The only way I found around it in Colab was to

(I) disable Notebook Access for any and all keys (the key shaped menu item on the left side of the Colab UI)
(Ii) Go to Runtime > Disconnect and delete runtime
(Iii) Reconnect to a new runtime
(Iv) Replace any huggingfae-cli logins with :

from huggingface_hub import notebook_login
notebook_login()

(v) Enter your ‘write’ token when prompted

Basically, colab seems to cache any prior “read” tokens in a very persistent way that doesn’t get overwritten or replaced when you load a separate write token later in your notebook.

Hopefully this helps someone. Cost me like 5 hours I’m not getting back.

3 Likes

I had the same issue, you can navigate to meta-llama/Llama-2-7b-chat-hf · Hugging Face, and you need to sign the license agreement to gain access.

I had the same problem and I solved it:
setting in environment variables HF_TOKEN and HUGGING_FACE_HUB_TOKEN to the same “write” token
huggingface-cli login
huggingface-cli download

1 Like

Thanks Milyyiyo, Your Answer is helped me

Same here with google colab – I have a “write” access to token that apparently can’t “write”.

Thanks you so so much I can resolve similar issue :grinning: