diff --git a/src/transformers/configuration_utils.py b/src/transformers/configuration_utils.py index 46f1b14414f9..155491d6d579 100755 --- a/src/transformers/configuration_utils.py +++ b/src/transformers/configuration_utils.py @@ -338,7 +338,7 @@ def output_attentions(self): @output_attentions.setter def output_attentions(self, value): - if self._attn_implementation != "eager": + if value is True and self._attn_implementation != "eager": raise ValueError( "The `output_attentions` attribute is not supported when using the `attn_implementation` set to " f"{self._attn_implementation}. Please set it to 'eager' instead."