[wip][core] propagate sage attention updates. - #14584
Draft
sayakpaul wants to merge 1 commit into
Draft
Conversation
Member
Author
|
Cc: @asomoza. I will do a separate one for Sage Blackwell (Sage Attention 3). |
|
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. |
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.
What does this PR do?
Refer to huggingface/kernels-community#1095. This PR will be marked for review after that PR is merged and the builds are successfully updated on the Hub repo.
Summary of the speedups (used black-forest-labs/FLUX.2-klein-9B DiT on an L4):
Before we jump to any conclusions, here is a table benchmarking just the attention kernel:
So, as we can see that just the attention kernel is doing fine. But since the underlying model is itself dominates on MLP, results in the context of the full model become somewhat diluted.
The usage doesn't change:
pipe.transformer.set_attention_backend("sage_hub").Full code is below:
Unfold