Skip to content

Commit

Permalink
[PEFT] Protect adapter_kwargs check (#26537)
Browse files Browse the repository at this point in the history
Update modeling_utils.py
  • Loading branch information
younesbelkada authored Oct 2, 2023
1 parent 63864e0 commit 1b8decb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2480,7 +2480,7 @@ def from_pretrained(
)
token = use_auth_token

if token is not None and "token" not in adapter_kwargs:
if token is not None and adapter_kwargs is not None and "token" not in adapter_kwargs:
adapter_kwargs["token"] = token

if use_safetensors is None and not is_safetensors_available():
Expand Down

0 comments on commit 1b8decb

Please sign in to comment.