Getting 401 unaauthorized when trying to use google/gemma-3-27b-it
HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/google/gemma-3-27b-it/resolve/main/config.json
The above exception was the direct cause of the following exception:
GatedRepoError Traceback (most recent call last)
GatedRepoError: 401 Client Error. (Request ID: Root=1-6812bda5-3f9919350ec1c9730764bd02;298f606a-ac9a-490e-a5f7-d07569aafa5f)
Cannot access gated repo for url https://huggingface.co/google/gemma-3-27b-it/resolve/main/config.json.
Access to model google/gemma-3-27b-it is restricted. You must have access to it and be authenticated to access it. Please log in.
You must login to huggingface_hub by using your hf_token. You also need to be granted access to the model on your account for the token to work
Hi @Milinddurugkar ,
Follow the link provided below and complete the steps to gain access to the “Google Gemma models on HuggingFace”.
https://www.kaggle.com/models/google/gemma-2/license/consent
Click on “Verify via Hugging Face” and also click “continue with Hugging Face”.
By following above step then will get as
Click on "Authorize," which will redirect you to the Kaggle Gemma Consent Form page. Fill out the required fields, accept the terms, and you will receive access to the Google Gemma models on HuggingFace in less than a minute.
Kindly try and let me know if you have any concerns. Thank you.