[HiSparse] Support FP8 KV cache by routing to flashmla_kv backend#23013
Merged
whybeyoung merged 3 commits intosgl-project:mainfrom May 6, 2026
Merged
[HiSparse] Support FP8 KV cache by routing to flashmla_kv backend#23013whybeyoung merged 3 commits intosgl-project:mainfrom
whybeyoung merged 3 commits intosgl-project:mainfrom
Conversation
flashmla_sparse does not accept FP8 input, so HiSparse was previously pinned to BF16 KV. The flashmla_kv kernel already supports native FP8 + sparse attention (is_fp8_kvcache=True + indices=...), and HiSparse's hot-buffer indices are drop-in compatible with its indices contract. Pair HiSparse with the correct backend by KV dtype: - bfloat16 -> flashmla_sparse (unchanged) - fp8_e4m3 -> flashmla_kv (new) No attention-path code changes are needed; the existing _forward_flashmla_kv path handles HiSparse indices as-is. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
xiezhq-hermann
approved these changes
Apr 17, 2026
2 tasks
Collaborator
Author
|
/tag-and-rerun-ci |
ShangmingCai
approved these changes
Apr 30, 2026
Collaborator
|
/rerun-test test/registered/8-gpu-models/test_dsa_models_hisparse.py |
Contributor
|
✅ |
hzh0425
approved these changes
Apr 30, 2026
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.
flashmla_sparse does not accept FP8 input, so HiSparse was previously pinned to BF16 KV. The flashmla_kv kernel already supports native FP8 + sparse attention (is_fp8_kvcache=True + indices=...), and HiSparse's hot-buffer indices are drop-in compatible with its indices contract.
Related resource:
#13841
#13832
sgl-project/FlashMLA#1
Pair HiSparse with the correct backend by KV dtype:
Decode cli add:
Accuracy:

CC @xiezhq-hermann @hzh0425