The `use_auth_token` argument is deprecated and will be removed in v5 of Transformers

Hi there,
I am using the use_auth_token to download weights of my private models. I saw that it will be deprecated and I would like to know how I will be able to authenticate without using huggingface-cli. I want to have everything in a python script.

Thank you

2 Likes

Yes, I subscribe to this. use_auth_token will be deprecated. But how to authenticate instead?

1 Like

Hi @LetiP and @BenTouss,

The deprecation simply renames the argument use_auth_token to token

Read more here

cc @Wauplin, maybe we could improve the docs and state deprecated thus do this instead example?

2 Likes

Thank you very much! This works. :+1:

1 Like

Thanks for the ping @radames. I opened a PR in transformers to make the warning message more explicit: Provide alternative when warning on use_auth_token by Wauplin · Pull Request #27105 · huggingface/transformers · GitHub

1 Like