Disable SDPA attention layer for mistral and gpt_bigode#88
Merged
Conversation
Author
|
Reviewed with @libinta , she doesn't want this to be added per model, but want to override configuration in generic way so we don't need to modify all individual model file. |
libinta
reviewed
Mar 6, 2024
| #This model doesn't support SDPA in Gaudi yet, fallback to original code. | ||
| MODELS_ATTN_IMPLEMENTATION_EAGER = [ | ||
| "gpt_bigcode", | ||
| "mistral", |
Collaborator
There was a problem hiding this comment.
@vivekgoe should we add the t5 model here too?
There was a problem hiding this comment.
you mean "bart". yes please go ahead and add it.
vivekgoe
approved these changes
Mar 6, 2024
vivekgoe
left a comment
There was a problem hiding this comment.
Please add "bart" also to list of models not using sdpa.
…emistral
pick dd138ac Disable SDPA attention layer for GPT_BIGCODE and Mistral
libinta
approved these changes
Mar 6, 2024
Author
@vivekgoe change merged before I add this. I just tested adding "bart", and remove your original change. it also works for summarization. Do you want to make the change? |
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.
Currently both mistral and gpt-bigcode model is failing to run since SDPA attention layer is enabled for both model by default with transformer4.37.2 + torch2.2. Until we have proper FusedSDPA support for these model, we are disabling SDPA attention so it can fall back to original attention layer.