Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
6f40a213
Unverified
Commit
6f40a213
authored
Jul 16, 2024
by
Zach Mueller
Committed by
GitHub
Jul 16, 2024
Browse files
Fix if else and *actually* enable superfast init (#32007)
* Fix if else * rm err raise
parent
e3917064
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+1
-1
No files found.
src/transformers/modeling_utils.py
View file @
6f40a213
...
@@ -349,7 +349,7 @@ def check_support_param_buffer_assignment(model_to_load, state_dict, start_prefi
...
@@ -349,7 +349,7 @@ def check_support_param_buffer_assignment(model_to_load, state_dict, start_prefi
return
False
return
False
# Some models explicitly do not support param buffer assignment
# Some models explicitly do not support param buffer assignment
if
not
getattr
(
model_to_load
,
"_supports_param_buffer_assignment"
,
Fals
e
):
if
not
getattr
(
model_to_load
,
"_supports_param_buffer_assignment"
,
Tru
e
):
logger
.
debug
(
logger
.
debug
(
f
"
{
model_to_load
.
__class__
.
__name__
}
does not support param buffer assignment, loading will be slower"
f
"
{
model_to_load
.
__class__
.
__name__
}
does not support param buffer assignment, loading will be slower"
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment