diff --git a/src/transformers/modeling_utils.py b/src/transformers/modeling_utils.py index 6cb1c9f16f5016..05d74d65425216 100644 --- a/src/transformers/modeling_utils.py +++ b/src/transformers/modeling_utils.py @@ -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: