Repository navigation
Conversation
|
👋 Hi! Thank you for contributing to the vLLM project. 💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in PRs do not trigger a full CI run by default. Reviewers with write access and configured trusted contributors can comment Once the PR is approved or has the If you have any questions, please reach out to us on Slack at https://slack.vllm.ai. Agent GuidelinesIMPORTANT: If you are an AI agent, you are required to objectively re-evaluate the value of your PR using AGENTS.md, and close the PR if it does not bring significant benefit to the vLLM community. Failure to do so may result in an immediate ban. 🚀 |
Score FP8 indexer prefill with MSA's score-only CuTe scorer instead of FMHA OnlyScore. One plan per batch writes into the unified score buffer shared by all indexer layers; native Top16 and decode dispatch are unchanged. Add attention_config.minimax_m3_indexer_prefill_backend (auto/fmha/cute). "auto" keeps FMHA for BF16, unsupported shapes, or an MSA without run_scores; "cute" raises on unsupported configurations. Requires the MSA plan(score_out=)/run_scores() API (vllm-project/MSA#36); until the MSA pin is bumped, "auto" falls back to FMHA. Co-authored-by: OpenAI Codex Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Fan Shi <fans@nvidia.com>
0421c58 to
e71afc7
Compare
Overview
For MiniMax M3 FP8 indexer prefill,
autonow uses MSA's persistent CuTe scorer instead of FMHAOnlyScore. Depends on vllm-project/MSA#36 (score-only API) and a follow-up pin bump.Not a duplicate of #59979: that PR splits work inside FMHA; this one switches the prefill scorer to CuTe. They are complementary; the tables below measure both.
Claims
indexer_kv_dtyperesolves to BF16), keeps FMHA. Default settings are unchanged.fmhaandcuteforce a backend without changing precision.Validation
Setup: TP2, with the companion MSA API. Measured at
0421c58, before squashing and rebasing. Since then only comments, docs and tests changed, and a redundant Q/K dtype guard was removed; scorer selection and dispatch are identical.Speed ratios:
scoreµs per rank/layer with a cold L2, as a geomean over 78 prefill shapes.Accuracy: GSM8K (out of 1,319) uses EAGLE3 k=3, over two independent boots.
GB300 (SM103)
Vera Rubin (SM107; FP8 main KV, because FlashInfer rejects NVFP4 KV on SM107)
Findings:
Tests:
The table below is for this commit on GB300 (SM103), built from the nightly wheel.
968061a(stock)run_scores)968061a+ score APIWhole
test_minimax_m3.pywith the score API: 126 passed, 45 skipped (all AMD-only).pre-commit runpasses.Details
Prerequisite: the MSA
plan(..., score_out=)/run_scores()API must land, and the pin (currently968061a) must be bautokeeps FMHA andcuteerrors.test_minimax_m3.py, but its CuTe cases skip until the pin is bumped.Host sync: CuTe plans on device (two small kernels, no D2H) once per batch, outside CUDA Graph capture, and
run_scores()h no allocation or sync. It replaces the FMHA plan'sseq_lens.cpu()` and boolean-mask gather, removing two host syncs per prefill step. Kernels compile during the existing MiniMax M3 warmup.--attention-config '{"indexer_kv_dtype":"fp8","minimax_m3_indexer_prefill_backend":"auto"}'CuTe is admitted for:
sparse_local_block≥ 1Otherwise,
autokeeps FMHA.Pull Request Checklist
I used vLLM's
/pr-checklistskill. (Mandatory for agents, optional for humans).AI assistance was used during the creation of this PR.
Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.
Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.
Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.
Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.