Error of accessing "google/gemma-2b-it"

#31
by kehkok - opened

I saw the message of "Gated model You have been granted access to this model". I also generated access token from my setting page, and execute below in my own laptop jupyter notebook:

from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it", access_token='my_token')

However, it return error as below:

OSError: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/google/gemma-2b-it.
401 Client Error. (Request ID: Root=1-65f82134-062dd48c15237b043a2e1329;dbe75382-8097-4c51-a951-868060dfaf89)

Cannot access gated repo for url https://huggingface.co/google/gemma-2b-it/resolve/main/config.json.
Repo model google/gemma-2b-it is gated. You must be authenticated to access it.

What's wrong?

Hi @kehkok !

Make sure to have access to the repo with your account and login with your HF account by running huggingface-cli login or calling notebook_login() from huggingface_hub library in case you are running your code in a notebook

Thank you for your response. I had resolved the issue. As my mistake in typing the param name as, "access_token", and it should be "token". :-)

kehkok changed discussion status to closed

Sign up or log in to comment