Fast softmax#972
Merged
Merged
Conversation
…at matches its scale method (#92)
* Done to allow quantization using HQT * Added use_flash_attention and flash_attention_recompute to run_lm_eval
* Enable fast softmax mode in FusedSDPA * Add fast_softmax parameter to _gradient_checkpointing_func
ghost
approved these changes
May 22, 2024
ghost
left a comment
There was a problem hiding this comment.
@wszczurekhabana Pls confirm we can merge this now as #967 is merged.
regisss
reviewed
May 30, 2024
Collaborator
regisss
left a comment
There was a problem hiding this comment.
LGTM!
Please run make style.
|
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
Jun 6, 2024
ssarkar2
approved these changes
Jun 6, 2024
This was referenced Jun 12, 2024
imangohari1
pushed a commit
to imangohari1/optimum-habana
that referenced
this pull request
Jun 13, 2024
Co-authored-by: Dudi Lester <160421192+dudilester@users.noreply.github.com> Co-authored-by: Sayantan Sarkar <sasarkar@habana.ai>
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.
Changes from: HabanaAI#159
This change is dependent on: #967 to be merged first.
Original description:
Support for setting fast softmax mode in FusedSDPA operator. This is a tradeoff: performance vs accuracy.
Data on performance:
Data on accuracy (using mlperf test from: https://gerrit.habana-labs.com/plugins/gitiles/mlperf_inference/+/refs/heads/master_next/code/llama/llama_greedy.py
and https://gerrit.habana-labs.com/plugins/gitiles/mlperf_inference/+/refs/heads/master_next/code/llama/evaluation.py):