From c91fe85b7826fbb169a59800b355ad6ca9c975ac Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Mon, 7 Oct 2024 12:32:20 -0400 Subject: [PATCH] Fix undefined default_config in configuration_utils.py (#33934) --- src/transformers/configuration_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transformers/configuration_utils.py b/src/transformers/configuration_utils.py index 8d8784be39117b..a25ac51cf20bfa 100755 --- a/src/transformers/configuration_utils.py +++ b/src/transformers/configuration_utils.py @@ -1036,6 +1036,7 @@ def _get_non_default_generation_parameters(self) -> Dict[str, Any]: if decoder_config is not self: default_config = decoder_config.__class__() else: + default_config = None decoder_config = None # If it is a composite model, we want to check the subconfig that will be used for generation