Override sdpa option in Gaudi#771
Merged
Merged
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
regisss
approved these changes
Mar 7, 2024
Collaborator
regisss
left a comment
There was a problem hiding this comment.
LGTM!
This can be merged now I think no?
jiminha
added a commit
that referenced
this pull request
Mar 7, 2024
puneeshkhanna
pushed a commit
to puneeshkhanna/optimum-habana-fork
that referenced
this pull request
Mar 11, 2024
HolyFalafel
pushed a commit
to HabanaAI/optimum-habana-fork
that referenced
this pull request
Mar 11, 2024
This was referenced Jun 7, 2024
gplutop7
pushed a commit
to HabanaAI/optimum-habana-fork
that referenced
this pull request
Nov 6, 2025
…ransformers version, even in HF. (huggingface#2306) (huggingface#771) Signed-off-by: Artur Kloniecki <arturx.kloniecki@intel.com> Co-authored-by: Artur KlonieckiX <arturx.kloniecki@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
From torch 2.1 and above, SDPA attention is enabled by default. Due to this some models that we enabled are failing due to SDPA attention layer is not comparable with our code. Affected models are bart,gpt_bigcode,mistral and mixtral
TypeError: GPTBigCodeSdpaAttention.forward() got an unexpected keyword argument 'token_idx'
TypeError: BartSdpaAttention.forward() got an unexpected keyword argument 'token_idx'
We are overriding check sdpa method for Gaudi for these model to disable sdpa until we have fusedSDPA support for them. All other models will follow original implementation.
https://github.com/huggingface/transformers/blob/v4.37.2/src/transformers/modeling_utils.py#L1542