mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
parent
4f650040a6
commit
23c89a6732
@ -338,7 +338,7 @@ class PretrainedConfig(PushToHubMixin):
|
|||||||
|
|
||||||
@output_attentions.setter
|
@output_attentions.setter
|
||||||
def output_attentions(self, value):
|
def output_attentions(self, value):
|
||||||
if self._attn_implementation != "eager":
|
if value is True and self._attn_implementation != "eager":
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"The `output_attentions` attribute is not supported when using the `attn_implementation` set to "
|
"The `output_attentions` attribute is not supported when using the `attn_implementation` set to "
|
||||||
f"{self._attn_implementation}. Please set it to 'eager' instead."
|
f"{self._attn_implementation}. Please set it to 'eager' instead."
|
||||||
|
Loading…
Reference in New Issue
Block a user