Skip to content

Commit 23c89a6

Browse files
authored
[Attention] Small fix on output attentions (#38948)
small fix
1 parent 4f65004 commit 23c89a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/transformers/configuration_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def output_attentions(self):
338338

339339
@output_attentions.setter
340340
def output_attentions(self, value):
341-
if self._attn_implementation != "eager":
341+
if value is True and self._attn_implementation != "eager":
342342
raise ValueError(
343343
"The `output_attentions` attribute is not supported when using the `attn_implementation` set to "
344344
f"{self._attn_implementation}. Please set it to 'eager' instead."

0 commit comments

Comments
 (0)