-
Notifications
You must be signed in to change notification settings - Fork 27.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PEFT
] Pass token when calling find_adapter_config
#26488
[PEFT
] Pass token when calling find_adapter_config
#26488
Conversation
The documentation is not available anymore as the PR was closed or merged. |
This seems to fix the issue for me. Shall we merge it? Or figure out the actual cause? |
find_adapter_config
PEFT
] Pass token when calling find_adapter_config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@younesbelkada For reference, I was running
|
Nice catch! Will open a PR soon to fix that |
…6488) * try * nit * nits
…6488) * try * nit * nits
What does this PR do?
This PR fixes an issue that was reported on Spaces. I was not able to reproduce the issue locally though.
When loading a model with
token=True
(i.e. on a gated or private repository),find_adapter_config
will try to look for an adapter file inside a private repository without the token, leading to an authentication error.The fix is to pass the token to
adapter_kwargs
and remove the duplication here: https://github.com/huggingface/transformers/blob/main/src/transformers/modeling_utils.py#L2529cc @LysandreJik