Add sm70 FlashAttention config case for DKQ=256, DV=256, ncols=64 - #27997
Add sm70 FlashAttention config case for DKQ=256, DV=256, ncols=64#27997mistrjirka wants to merge 1 commit into
Conversation
|
Hi @mistrjirka, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
The AI generated content is disclosed and I had written this PR description by hand, so what exactly is the issue? |
Second V100 data point: 2x Tesla V100-SXM2, Qwen3.8-27B Q8, prefill +11.6% at 70k and +17.2% at 120kYour note asks for tests on other sm_70 GPUs. This is still V100, but a different machine Setup
MethodRequests go to Prefill
The three repetitions of each cell agree within 0.2% (957 / 956 / 956 against Decode is unchanged50.8 -> 49.5 t/s at the shallow point and 40.7 -> 40.3 t/s at the deep one. Both arms This is expected from the dispatch rather than from the table. On Volta CaveatsThe gain here is smaller than the +22% at 65k and +27% at 100k in the PR description, and I The model that motivated this on our side is Qwen3.8-Flash-Next ( Happy to re-run on this machine if another configuration would help. |
Overview
Added SM70 FlashAttention config improving performance around 20% based on the model. Previously the config for 256x256 head fell back onto the Ampere config which was suboptimal for SM70.
My goal was to optimize the Qwen 3.8 27B performance in agentic workflows and it uses the DKQ=256, DV=256, ncols=64 which configuration was suboptimal.
To simulate agentic turn I used 100k cached KV tokens + 1024 PP and 512 TG.
Simulated Agentic Turn
repeats: 4
Prompt Processing Scaling
repeats: 10
repeats for 100k PP: 5
MMQ flag means adding
GGML_CUDA_FORCE_MMQ=ONduring compilationAdditional information
It would be good to test it on other SM70 gpus then just purely v100 tested here.
Requirements