Skip to content

[AMD] Use AITER FP8 block selection for MiniMax-M3 - #41708

Open
zijiecode wants to merge 5 commits into
sgl-project:mainfrom
zijiecode:pr/minimax-m3-aiter-fp8-indexer
Open

zijiecode wants to merge 5 commits into
sgl-project:mainfrom
zijiecode:pr/minimax-m3-aiter-fp8-indexer

Conversation

@zijiecode

@zijiecode zijiecode commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Motivation

MiniMax-M3 scores its index cache and selects KV blocks before sparse attention. This PR uses AITER FP8 score and top-k kernels for that work, reducing index-selection time.

Modifications

  • Select the AITER indexer by default for supported gfx950 FP8 index-cache configurations.
  • Handle decode, linear verification and ragged prefill, rebuilding page metadata during graph replay.
  • Reuse the existing cross-layer top-k cache and retain the NHD sparse-attention consumer.
  • Add FP32-reference, 1M-context, graph-replay and per-batch cache-reuse regressions.

Set SGLANG_M3_USE_AITER_INDEXER=0 to disable both paths, or SGLANG_M3_USE_AITER_PREFILL_INDEXER=0 to disable only prefill.

Accuracy Tests

9 GPU regression tests passed on this branch with the enable flags unset, including the cross-layer and per-batch cache-reuse tests. Tested on MI355X with AITER e7d2453f25.

amd/MiniMax-M3-MXFP4, TP4/EP1, full 5-shot GSM8K (1,319 questions), chat-completions, 16384-token output budget, temperature 0, and real EAGLE3 verification. The baseline includes the EAGLE fix; the candidate adds only AITER FP8 index selection to the same integration stack.

Configuration Strict-match Flexible-extract
Baseline 96.74% 96.66%
This PR 96.59% 96.51%

The candidate has two fewer correct answers out of 1,319 in each filter. Both configurations are below the 97% reference threshold.

Benchmarking and Profiling

AgentX on MI355X, TP4/EP1, C32, no KV offload, 3600 seconds per run, and 10 warmup requests per lane. Both sides use the same MiniMax-M3 integration stack with EAGLE3 and simulated acceptance length 2.78; the candidate enables only AITER FP8 index selection.

Metric Baseline This PR Change
Standard p90 interactivity (tok/s/user) 27.91 39.08 +40.02%
Total throughput (tok/s/GPU) 28742.32 34245.29 +19.15%
Output throughput (tok/s/GPU) 198.93 227.36 +14.29%
TPOT mean (ms/token) 21.227 19.541 -7.94%
TPOT p50 (ms/token) 16.782 10.520 -37.31%

Both formal runs had zero request errors. Grace-period cancellations were 0 / 4 for baseline / candidate; warmup errors were 2 / 1 and excluded from the formal metrics.

Checklist

  • Format your code according to the Format code with pre-commit guide.
  • Add unit tests.
  • Update documentation.
  • Provide accuracy and speed benchmark results.
  • Follow the SGLang code style guidance.

CI States

Latest PR Test (Base): 🚫 Run #38822155369
Latest PR Test (Extra): ❌ Run #38822155368
Latest PR Test (AMD ROCm 10): ❌ Run #38822155514

@1am9trash 1am9trash added amd run-ci CI: run the baseline test suite on this PR labels Oct 1, 2026
@zijiecode

Copy link
Copy Markdown
Collaborator Author

/rerun-failed-ci

Preserve both AITER and CP initialization. Let explicit indexer CP own decode and linear verify while retaining AITER prefill and cross-layer top-k reuse. Add regressions for dispatch priority and verify metadata.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

amd run-ci CI: run the baseline test suite on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants