Skip to content

[AgentX] MiniMax-M3.1-Flash GB300 SGLang: store DSpark draft KV in FP8 / [AgentX] MiniMax-M3.1-Flash GB300 SGLang:DSpark draft KV 改用 FP8 - #4600

Open
zijiexia wants to merge 2 commits into
mainfrom
minimaxm31flash-gb300-sglang-agentx-fp8-draft-kv
Open

zijiexia wants to merge 2 commits into
mainfrom
minimaxm31flash-gb300-sglang-agentx-fp8-draft-kv

Conversation

@zijiexia

Copy link
Copy Markdown
Collaborator

The SGLang DSpark drafter stores its KV cache in bf16 by default. On B300 TP2 that took 21 GB of HBM and 71 GB of the 370 GB HiCache host pool per rank, leaving about 10% less GPU KV than vLLM, whose DSpark drafter uses FP8 KV. At high concurrency the smaller GPU cache lowered the GPU prefix hit rate and cost throughput against vLLM.

This PR sets speculative-draft-kv-cache-dtype: fp8_e4m3 in the base args of the GB300 MiniMax-M3.1-Flash SGLang AgentX recipe, so the freed HBM and host memory go to target KV. The batch-size-1 MonoKernel Low-Latency point (agentic-low-latency.yaml) keeps bf16 draft KV, since it runs a separate kernel path and has no KV capacity pressure. The changelog entry is not append-only, so the whole curve reruns on the new recipe. The same change for B300 is in #4524.

Risk: FP8 draft KV can lower real DSpark acceptance. Throughput runs use the golden synthetic AL, so the sweep's eval is what checks this.

中文

SGLang 的 DSpark drafter 默认用 bf16 存 KV cache。在 B300 TP2 上,它每个 rank 占用 21 GB HBM 和 370 GB HiCache host 池中的 71 GB,GPU KV 容量比 vLLM 少约 10%(vLLM 的 DSpark drafter 用 FP8 KV)。高并发时 GPU cache 更小,GPU prefix 命中率下降,吞吐落后于 vLLM。

本 PR 在 GB300 MiniMax-M3.1-Flash SGLang AgentX recipe 的 base args 中设置 speculative-draft-kv-cache-dtype: fp8_e4m3,把省下的 HBM 和 host 内存留给 target KV。batch size 1 的 MonoKernel 低延迟点(agentic-low-latency.yaml)保持 bf16 draft KV:它走独立的 kernel 路径,也没有 KV 容量压力。changelog 条目不是 append-only,整条曲线会用新 recipe 重跑。B300 的同样改动在 #4524。

风险:FP8 draft KV 可能降低真实的 DSpark 接受率。吞吐测试使用 golden synthetic AL,因此需要由 sweep 中的 eval 来验证。

AI model disclosure

Prepared with Claude Code using claude-opus-5-5. Reviewed by the human author before submission.

🤖 Generated with Claude Code

Set speculative-draft-kv-cache-dtype fp8_e4m3, matching the vLLM DSpark
drafter, so the bf16 draft KV no longer takes HBM and HiCache host pool space
from target KV. The whole curve reruns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution!

  • Review: If this PR changes files owned by someone other than a repository admin or @SemiAnalysisAI/core, ask one eligible CODEOWNER to complete the latest PR_REVIEW_CHECKLIST.md before contacting a core maintainer on Slack. Follow the template exactly, including As a PR reviewer and CODEOWNER, I have reviewed this and have, so sign-off verification triggers.
  • PR verification: Sweeps run only when the PR appends an inferencex-e2e/perf-changelog.yaml entry and carries exactly one primary label: full-sweep-fail-fast (strongly recommended; canary plus per-matrix fail-fast), full-sweep-enabled (canary; matrix jobs continue after a failure), or non-canary-full-sweep-enabled (no canary or fail-fast). The modifiers all-evals, evals-only, and agentx-fast require a primary label. On fork PRs, a maintainer applies the label. See sweep labels and reuse.
  • After merging: PR authors must ensure all GitHub Actions jobs pass. Transient failures often pass on rerun; see how to rerun failed jobs.
中文

感谢你的贡献!

  • **审阅:**如果 PR 修改的文件归属于仓库管理员及 @SemiAnalysisAI/core 之外的 CODEOWNER,请先联系一位有资格的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,再通过 Slack 联系核心维护者。必须严格遵循模板,并保留 As a PR reviewer and CODEOWNER, I have reviewed this and have,才能触发签核验证。
  • **PR 验证:**只有当 PR 在 inferencex-e2e/perf-changelog.yaml 末尾追加了条目,并且恰好带有一个主标签时,才会运行扫描:full-sweep-fail-fast(强烈推荐;canary 加逐矩阵 fail-fast)、full-sweep-enabled(有 canary;矩阵任务在失败后继续运行)或 non-canary-full-sweep-enabled(无 canary,也无 fail-fast)。修饰标签 all-evals、evals-only 和 agentx-fast 必须与主标签一起使用。fork PR 的标签由维护者添加。参见扫描标签与复用。
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@zijiexia zijiexia added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 28, 2026
Comment on lines +36 to +37
# FP8 draft KV, as vLLM's DSpark drafter uses; bf16 costs ~10 GB of HBM per rank.
speculative-draft-kv-cache-dtype: fp8_e4m3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 After merging, the GB300 MiniMax-M3.1-Flash SGLang AgentX curve runs its DSpark draft below shipped precision, which CONTRIBUTING.md#draft-model-precision forbids. speculative-draft-kv-cache-dtype: fp8_e4m3 targets only the draft. No target kv-cache-dtype is set, so target KV stays at the bf16 default. Fix: drop the draft-only override in both recipes and their changelog line, or use one upstream-supported KV dtype for target and draft alike. Same pattern at 2 sites (gb300-fp4-mtp/agentic.yaml:37, gb300-fp4-mtp/agentic-tp2.yaml:37).

Why this was flagged

The base agg role args of agentic.yaml:37 and agentic-tp2.yaml:37 now set speculative-draft-kv-cache-dtype: fp8_e4m3. Neither recipe sets a target kv-cache-dtype. The PR's own changelog entry (perf-changelog.yaml, new block) says this replaces "the bf16 default", so the effective draft KV precision drops below the pinned image's default for this checkpoint. On the base branch the draft KV runs at the shipped bf16 default and is compliant. CONTRIBUTING.md lists "Dtype or KV-cache dtype overrides aimed at the draft that lower its precision below the framework's default for that checkpoint" as forbidden. It says matching an upstream recipe (here, vLLM's DSpark drafter) and passing evals or synthetic AL do not exempt this. The allowed case is FP8 draft KV inherited from an FP8 target KV, which does not apply here. Every point except agentic-low-latency.yaml in config key minimaxm31flash-fp4-gb300-sglang-agentic-dspark would publish non-compliant throughput gained by cheapening the draft.

Verification: agentic.yaml:36-37 and agentic-tp2.yaml:36-37 add speculative-draft-kv-cache-dtype: fp8_e4m3 to the base agg args, and no SGLang minimaxm31flash recipe sets kv-cache-dtype. So the effective draft KV precision drops from the pinned image's default (bf16) to FP8, which CONTRIBUTING.md lines 86-87 forbid. On the base branch the draft runs at the default bf16 KV and is compliant.

@zijiexia zijiexia removed the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 28, 2026
@zijiexia zijiexia closed this Oct 28, 2026
@zijiexia zijiexia reopened this Oct 28, 2026
@zijiexia zijiexia added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 28, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review found no new issues

No new issues were found in this update; 1 finding from earlier reviews is still open above.

Still open from earlier reviews (1):

If you have decided not to act on one of these findings, resolve its thread (a reply alone leaves it open) and the next review stops counting it. To review this commit again now, use Re-run on its "Claude Code Review" check.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] The SGLang cookbook integration of this PR's AgentX config (minimaxm31flash-fp4-gb300-sglang-agentic-dspark) will happen in sgl-project/sglang#47027, in the Agentic Long-Context Deployment section of the MiniMax-M3.1-Flash cookbook page.

This PR has no authorized /use <run_id> comment yet, so the cookbook shows the recipe at this PR's head (3b96f3383) as "in progress". A later cookbook PR switches it to the measured run once a run is pinned or this PR merges.

@nvpohanh

Copy link
Copy Markdown
Collaborator

[by Claude Code] sgl-project/sglang#47027 has been merged. This PR's AgentX config (minimaxm31flash-fp4-gb300-sglang-agentic-dspark) is now in the Agentic Long-Context Deployment section of the SGLang MiniMax-M3.1-Flash cookbook: https://docs.sglang.io/cookbook/autoregressive/MiniMax/MiniMax-M3.1#agentic-long-context-deployment

This PR has no authorized /use <run_id> comment yet, so the cookbook shows the recipe at this PR's head (3b96f3383) as "in progress". A later cookbook PR switches it to the measured run once a run is pinned or this PR merges.

@github-actions

Copy link
Copy Markdown
Contributor

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

full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants