Skip to content

Commit

Permalink
Fix if else and *actually* enable superfast init (#32007)
Browse files Browse the repository at this point in the history
* Fix if else

* rm err raise
  • Loading branch information
muellerzr authored Jul 16, 2024
1 parent e391706 commit 6f40a21
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 @@ -349,7 +349,7 @@ def check_support_param_buffer_assignment(model_to_load, state_dict, start_prefi
return False

# Some models explicitly do not support param buffer assignment
if not getattr(model_to_load, "_supports_param_buffer_assignment", False):
if not getattr(model_to_load, "_supports_param_buffer_assignment", True):
logger.debug(
f"{model_to_load.__class__.__name__} does not support param buffer assignment, loading will be slower"
)
Expand Down

0 comments on commit 6f40a21

Please sign in to comment.