Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
08ae37c8
Unverified
Commit
08ae37c8
authored
Jun 12, 2023
by
Marc Sun
Committed by
GitHub
Jun 12, 2023
Browse files
Fix `_load_pretrained_model` (#24200)
Fix test
parent
ebd94b0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
1 deletion
+0
-1
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+0
-1
No files found.
src/transformers/modeling_utils.py
View file @
08ae37c8
...
...
@@ -3026,7 +3026,6 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
unexpected_keys
=
list
(
set
(
loaded_keys
)
-
set
(
expected_keys
))
if
find_tied_parameters
is
not
None
:
model
.
tie_weights
()
tied_params
=
find_tied_parameters
(
model
)
else
:
tied_params
=
[]
...
...
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