Skip to content

Commit

Permalink
Use eager attention for wav2vec2 (#1333)
Browse files Browse the repository at this point in the history
  • Loading branch information
skaulintel authored Sep 20, 2024
1 parent a324e7c commit 253165a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optimum/habana/transformers/models/modeling_all_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def gaudi_conv1d_forward(self, x):
@classmethod
def gaudi_check_and_enable_sdpa(cls, config, hard_check_only: bool = False) -> PretrainedConfig:
# This model doesn't support SDPA in Gaudi yet, fallback to original code.
MODELS_ATTN_IMPLEMENTATION_EAGER = ["bart", "gpt_bigcode", "mistral", "mixtral"]
MODELS_ATTN_IMPLEMENTATION_EAGER = ["bart", "gpt_bigcode", "mistral", "mixtral", "wav2vec2"]

if config.model_type in MODELS_ATTN_IMPLEMENTATION_EAGER:
config._attn_implementation = "eager"
Expand Down

0 comments on commit 253165a

Please sign in to comment.