Fix warning for gradient_checkpointing (#13767)
This commit is contained in:
parent
5e3b4a70d3
commit
83d3dc0f6f
|
@ -332,7 +332,7 @@ class PretrainedConfig(PushToHubMixin):
|
|||
self.transformers_version = kwargs.pop("transformers_version", None)
|
||||
|
||||
# Deal with gradient checkpointing
|
||||
if kwargs.get("gradient_checkpointing", True):
|
||||
if kwargs.get("gradient_checkpointing", False):
|
||||
warnings.warn(
|
||||
"Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 "
|
||||
"Transformers. Using `model.gradient_checkpointing_enable()` instead, or if you are using the "
|
||||
|
|
Loading…
Reference in New Issue