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
ac43a40e
Unverified
Commit
ac43a40e
authored
Apr 13, 2022
by
Stas Bekman
Committed by
GitHub
Apr 13, 2022
Browse files
[modeling_utils] better explanation of ignore keys (#16741)
parent
0235bc57
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
src/transformers/modeling_utils.py
src/transformers/modeling_utils.py
+7
-6
No files found.
src/transformers/modeling_utils.py
View file @
ac43a40e
...
...
@@ -704,14 +704,15 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
main_input_name
=
"input_ids"
_auto_class
=
None
# a list of re pattern of
tensor names to ignore from the model when loading the model weights
#
(
and avoid unnecessary warnings
)
.
# a list of
`
re
`
pattern
s
of
`state_dict` keys that should be removed from the list of missing
#
keys we find (keys inside the model but not in the checkpoint)
and avoid unnecessary warnings.
_keys_to_ignore_on_load_missing
=
None
# a list of re pattern of tensor names to ignore from the weights when loading the model weights
# (and avoid unnecessary warnings).
# a list of `re` patterns of `state_dict` keys that should be removed from the list of
# unexpected keys we find (keys inside the checkpoint but not the model) and avoid unnecessary
# warnings.
_keys_to_ignore_on_load_unexpected
=
None
# a list of
of tensor name
s to ignore when saving the model (useful for keys that aren't
# trained, but which are deterministic
,
or tied variables)
# a list of
`state_dict` key
s to ignore when saving the model (useful for keys that aren't
# trained, but which are
either
deterministic or tied variables)
_keys_to_ignore_on_save
=
None
is_parallelizable
=
False
...
...
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