Unverified Commit 83d3dc0f authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix warning for gradient_checkpointing (#13767)

parent 5e3b4a70
...@@ -332,7 +332,7 @@ class PretrainedConfig(PushToHubMixin): ...@@ -332,7 +332,7 @@ class PretrainedConfig(PushToHubMixin):
self.transformers_version = kwargs.pop("transformers_version", None) self.transformers_version = kwargs.pop("transformers_version", None)
# Deal with gradient checkpointing # Deal with gradient checkpointing
if kwargs.get("gradient_checkpointing", True): if kwargs.get("gradient_checkpointing", False):
warnings.warn( warnings.warn(
"Passing `gradient_checkpointing` to a config initialization is deprecated and will be removed in v5 " "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 " "Transformers. Using `model.gradient_checkpointing_enable()` instead, or if you are using the "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment