[Feat] Support npu in modeling models (#37369)
This commit is contained in:
@@ -1040,7 +1040,7 @@ class AriaTextModel(AriaTextPreTrainedModel):
|
||||
if (
|
||||
self.config._attn_implementation == "sdpa"
|
||||
and attention_mask is not None
|
||||
and attention_mask.device.type in ["cuda", "xpu"]
|
||||
and attention_mask.device.type in ["cuda", "xpu", "npu"]
|
||||
and not output_attentions
|
||||
):
|
||||
# Attend to all tokens in fully masked rows in the causal_mask, for example the relevant first rows when
|
||||
|
||||
Reference in New Issue
Block a user