[None][perf] Use FP8 MiniMax-M3 MSA indexer QK#16742
Merged
peihu-nv merged 1 commit intoJul 23, 2026
Merged
Conversation
tburt-nv
approved these changes
Jul 22, 2026
Signed-off-by: peihengh <259410613+peihu-nv@users.noreply.github.com>
peihu-nv
force-pushed
the
peihengh/m3-msa-proxy-decode
branch
from
July 23, 2026 17:34
da6f1e6 to
6842ede
Compare
brb-nv
pushed a commit
to brb-nv/TensorRT-LLM
that referenced
this pull request
Jul 23, 2026
Signed-off-by: peihengh <259410613+peihu-nv@users.noreply.github.com> Signed-off-by: Balaram Buddharaju <169953907+brb-nv@users.noreply.github.com>
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.
@coderabbitai summary
Description
MiniMax-M3 MSA currently produces normalized/RoPE index Q/K in BF16, converts the indexer tensors separately, and launches a separate paged index-K cache write in every sparse layer. This PR adds an opt-in fused CUDA path that performs Gemma RMSNorm, NeoX partial RoPE, BF16 rounding, raw-E4M3 index-Q output, and direct strided-HND index-K insertion in one kernel.
The path is controlled by the prototype
indexer_kv_dtypeoption and keepsbf16as the default. FP8 is restricted to the MSA implementation with the index-value branch disabled. The existing general MSA max-score FMHA and fused block selector remain unchanged; score accumulation remains FP32.Matched GB200 disaggregated serving used 1P1D, TP4/EP4 with attention DP, FP8 main KV cache, ISL 8192 / OSL 1024, concurrency 64, and the same 1,000 requests (7,415,543 input and 918,382 output tokens) in both arms:
Test Coverage
2456310).2456315). Outputs had 0/8,192 index-Q byte mismatches, 0/2,048 index-K byte mismatches, and 0/1,024 selected-ID mismatches against the converted-FP8 reference.2456337).2456544). BF16/FP8 scored 85.015%/85.063% on MMLU and 90.713%/89.765% on GSM8K.2456634,2456701).6 x 57sparse layers) and proxy-score time fell from 1.694 to 1.419 ms/replay (-16.21%) (2457008).PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.