[None][perf] Fuse index-q/index-k projections in MinimaxM3 - #16904
Conversation
Signed-off-by: Balaram Buddharaju <169953907+brb-nv@users.noreply.github.com>
|
/bot run --disable-fail-fast |
WalkthroughMiniMax-M3 sparse attention now uses a fused ChangesMiniMax-M3 sparse index projection
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Checkpoint
participant MiniMaxM3ForCausalLM
participant index_qk_proj
participant SparseAttention
Checkpoint->>MiniMaxM3ForCausalLM: load index_q_proj and index_k_proj tensors
MiniMaxM3ForCausalLM->>index_qk_proj: fuse and load projection weights
SparseAttention->>index_qk_proj: project hidden states once
index_qk_proj->>SparseAttention: concatenated index Q/K output
SparseAttention->>SparseAttention: split into idx_q and idx_k
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
PR_Github #61963 [ run ] triggered by Bot. Commit: |
|
PR_Github #61963 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #62567 [ run ] triggered by Bot. Commit: |
|
PR_Github #62567 [ run ] completed with state
|
|
/bot run --disable-fail-fast |
|
PR_Github #62606 [ run ] triggered by Bot. Commit: |
|
PR_Github #62606 [ run ] completed with state |
Description
This MR fuses index-q / index-k projections in Minimax M3.
Test Coverage
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.Dev Engineer Review
index_qk_proj, reducing projection execution from two calls to one._load_index_qk_proj_weightsand updates sparse attention to split the fused output intoidx_qandidx_k.QA Engineer Review
index_qk_projdimensions and replication.index_q_projandindex_k_projmodules in sparse attention.tests/integration/test_lists/coverage changes were included, so CI/manual QA coverage mapping is unavailable.