Gemma 2 2b not authorized

#27
by KareenaNS - opened

After running python gemma_summarizer.py in cmd as an administrator, I get this message:

Token is valid (permission: fineGrained).
Your token has been saved in your configured git credential helpers (manager).
Your token has been saved to C:\Users\Kareena.cache\huggingface\token
Login successful
Error loading model or tokenizer: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/google/gemma-2-2b.
403 Client Error. (Request ID: Root=1-66f6e0f6-180b57b0346c2ac74fc99f5b;85aa7201-b854-47bc-a1ef-3d32475b9c28)

Cannot access gated repo for url https://huggingface.co/google/gemma-2-2b/resolve/main/config.json.
Access to model google/gemma-2-2b is restricted and you are not in the authorized list. Visit https://huggingface.co/google/gemma-2-2b to ask for access.

Not sure why. Any explanations?

Google org

This is gated repo model's permission error which can be resolved by providing the repo access token. You can create your HF_token by clicking on Settings - Access Tokens(left pane) - Create Token in HF site and pass this token value in your notebook by using below code line or by putting as a secret key in you Colab notebook.

from huggingface_hub import notebook_login
notebook_login()

You can also refer to this similar issue which may helpful to you in this.

Sign up or log in to comment