I have access to the gated PaliGemma-3b-mix-224 model from Google, however, when trying to access it through HF, I get the following error:
I’ve logged in to HF, created a new access token, used it in the Colab notebook, but it doesn’t work. This used to work before the recent issues with HF access tokens. Any help is appreciated.
from huggingface_hub import notebook_login
notebook_login()
The strategy regarding tokens recently changed. Basically when going to Hugging Face – The AI community building the future., you can refresh and obtain a new token, but unlike before, you can no longer access this token when you close that page and come back to it later. Hence it’s advised to keep its value somewhere in a safe space (like a password manager), and use it anywhere you’d like to use it (like setting it as a HF_TOKEN environment variable or as a Google Colab secret).
So my assumption is that you’re probably still using an older token.
The access to gated models happens through your account. Tokens are just meant as a way to authenticate with the account. You can authenticate with your token by creating one and copying it from Hugging Face – The AI community building the future.. You can create multiple tokens, all of which allow you to authenticate with your account.