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
3cefac1d
Unverified
Commit
3cefac1d
authored
Dec 26, 2023
by
Stas Bekman
Committed by
GitHub
Dec 26, 2023
Browse files
small typo (#28229)
Update modeling_utils.py
parent
3b7675b2
Changes
1
Show 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 @
3cefac1d
...
...
@@ -2061,7 +2061,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, GenerationMixin, PushToHubMix
gradient_checkpointing_func
=
functools
.
partial
(
checkpoint
,
**
gradient_checkpointing_kwargs
)
# For old GC format (transformers < 4.35.0) for models that live on the Hub
# we will fall back to the overwritten `_set_gradient_checkpointing` meth
i
d
# we will fall back to the overwritten `_set_gradient_checkpointing` meth
o
d
_is_using_old_format
=
"value"
in
inspect
.
signature
(
self
.
_set_gradient_checkpointing
).
parameters
if
not
_is_using_old_format
:
...
...
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