Skip to content

Commit

Permalink
small typo (#28229)
Browse files Browse the repository at this point in the history
Update modeling_utils.py
  • Loading branch information
stas00 authored Dec 26, 2023
1 parent 3b7675b commit 3cefac1
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 @@ -2061,7 +2061,7 @@ def gradient_checkpointing_enable(self, gradient_checkpointing_kwargs=None):
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` methid
# we will fall back to the overwritten `_set_gradient_checkpointing` method
_is_using_old_format = "value" in inspect.signature(self._set_gradient_checkpointing).parameters

if not _is_using_old_format:
Expand Down

0 comments on commit 3cefac1

Please sign in to comment.