[Feat] optimize Qwen3 on H20 by hybrid Attention Backend#6151
Closed
TianQiLin666666 wants to merge 3 commits intosgl-project:mainfrom
Closed
[Feat] optimize Qwen3 on H20 by hybrid Attention Backend#6151TianQiLin666666 wants to merge 3 commits intosgl-project:mainfrom
TianQiLin666666 wants to merge 3 commits intosgl-project:mainfrom
Conversation
Collaborator
|
Nice PR! And thanks for the detailed benchmark! How about provide two optional server args:
And if they are not provided, we will use attention backend. |
Collaborator
Author
OK, I will do it. |
5 tasks
6 tasks
Collaborator
Hi @TianQiLin666666 , thanks for the great work! I will finish the follow-up on this PR. I have opened a new PR #6338, and added you as a coauthor 👀. |
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.
Motivation
FA3 decode performance is significantly lower than flashinfer on H20
#5630
Dao-AILab/flash-attention#1572
I have profiled the Qwen3-235B-A22B performance on H20(tp8) as follows.
Prefill
FA3: 554us

flashinfer: 722us

Decode
FA3: 98us

flashinfer: 35us

The results indicate that FA3 decode performance is lower than flashinfer on H20, but FA3 prefill performance is higher than flashinfer on H20.
Modifications
Use fa3 for prefill and flashinfer for decode on H20 for Qwen3 models. To enhance compatibility, server_arg
--enable-flashinfer-attention-decodeis introduced to determine whether enforce flashinfer as attention backend during the decoding phase, while the prefill phase retains the original--attention-backendconfiguration. By default, this argument is disabled and both prefill and decode phases utilize the backend specified by--attention-backendas before.Evaluation
Summary
Throughput(input + output tokens/s)
Qwen3-235B-A22B' records as an example
comands
results
Checklist