Skip to content

[Klaud Cold] minimaxm31flash-fp4-b200-sglang-agentic-dspark: day-zero MiniMax-M3.1-Flash B200 SGLang recipe - #4442

Merged
Oseltamivir merged 4 commits into
mainfrom
feat/minimaxm31flash-b200-sglang
Oct 24, 2026
Merged

Oseltamivir merged 4 commits into
mainfrom
feat/minimaxm31flash-b200-sglang

Conversation

@Oseltamivir

Copy link
Copy Markdown
Collaborator

Summary

Day-zero MiniMax-M3.1-Flash (MiniMaxAI/MiniMax-M3.1-Flash, NVFP4) AgentX on B200 with SGLang, following the SGLang cookbook: https://docs.sglang.io/cookbook/autoregressive/MiniMax/MiniMax-M3.1 (config source: docs/src/snippets/configs/MiniMaxAI/minimax-m3.1.jsx).

  • Image: lmsysorg/sglang:dev-minimax-m31-flash, pinned by digest (verified on Docker Hub 2026-10-24).
  • Serve flags: the cookbook's B200 Balanced (TP4, TRT-LLM routed MoE) for conc 1–32 and High-Throughput (TP8, attention DP2 via --attn-dp-size 2, EP8 MegaMoE, --mem-fraction-static 0.75, --cuda-graph-max-bs-prefill 16384) for conc 64–128. The matrix row is tp: 8, ep: 8 with dp-attn false, because the matrix's dp-attn means full DP attention.
  • Common flags: --speculative-algorithm DSPARK --speculative-use-block-verification, --cuda-graph-backend-prefill breakable, minimax-m3 reasoning and tool parsers, --tokenizer-worker-num 8.
  • Speculative decoding: seven-token DSpark (--speculative-dspark-block-size 7, the bundled draft's dspark_block_size). It's set explicitly so throughput runs resolve synthetic acceptance from minimaxm31flash_dspark.yaml ([Klaud Cold] Add MiniMax-M3.1-Flash DSpark golden AL curve and SPEED-Bench collector / [Klaud Cold] 新增 MiniMax-M3.1-Flash DSpark 黄金 AL 曲线与 SPEED-Bench 采集脚本 #4425): AL 4.04 at 7 tokens, thinking on (adaptive, the default).
  • Scheduler batch: the TP4 arm uses 2× CONC for AgentX subagent fan-out, capped at the cookbook's 128, with the decode graph batch matching it.
  • Checked locally: infx generate binds every matrix point to exactly one recipe variant, with SGLANG_SIMULATE_ACC_LEN=4.04.

vLLM siblings: #4419 (GB300), #4420 (MI355X), #4421 (B300), #4422 (H100), #4423 (H200), #4426/#4431 (B200), #4433 (GB200).

…-Flash SGLang AgentX on B200

Serve flags follow the SGLang cookbook's MiniMax-M3.1 cells with the day-zero
dev-minimax-m31-flash image. Seven-token DSpark with synthetic acceptance from
the minimaxm31flash_dspark golden curve.
@Oseltamivir
Oseltamivir requested a review from a team October 23, 2026 17:38
@Oseltamivir Oseltamivir added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Oct 23, 2026
@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 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@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.

Findings marked 🟡 are optional suggestions and need no follow-up push.

Comment thread inferencex-e2e/perf-changelog.yaml Outdated
- "Serve flags follow the cookbook's B200 Balanced (TP4) and High-Throughput (TP8, attention DP2, EP8: DSpark with block verification, breakable prefill graphs, minimax-m3 reasoning and tool parsers, 8 tokenizer workers."
- "Seven-token DSpark (the bundled draft's dspark_block_size); throughput runs use synthetic acceptance from the minimaxm31flash_dspark golden curve (AL 4.04 at 7 draft tokens, #4425)."
- "Search space: Balanced TP4 at conc 1-32; TP8 + EP8 with attention DP2 at conc 64-128."
pr-link: TBD

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.

🔴 The changelog check will fail this PR, and the merge helper will refuse it, because the new entry's pr-link: TBD is not an accepted placeholder. validate_added_pr_link accepts only the canonical link for this PR or one of PR_LINK_PLACEHOLDERS (XXX, https://github.com/SemiAnalysisAI/InferenceX/pull/XXX). Fix: set pr-link to https://github.com/SemiAnalysisAI/InferenceX/pull/<this PR number>, or to XXX so the merge helper fills it in.

Why this was flagged

The new block at inferencex-e2e/perf-changelog.yaml:11018 has pr-link: TBD. On a PR run, infx/workflows/validate_perf_changelog.py:147 raises new PR entry must use 'https://github.com/SemiAnalysisAI/InferenceX/pull/N' or an XXX placeholder; found 'TBD'. That check runs for every appended entry (line 193). Separately, infx/workflows/prepare_perf_changelog_merge.py:108-111 raises appended entry N has unexpected pr-link 'TBD', so merge_with_reuse cannot canonicalize the link. The changelog entry is what triggers result collection, so the new config key's sweep cannot be collected or merged until this is fixed. No existing entry in the file uses TBD. The placeholder set is XXX and https://github.com/SemiAnalysisAI/InferenceX/pull/XXX.

Verification: The appended block at the tail of inferencex-e2e/perf-changelog.yaml has pr-link: TBD. In inferencex-e2e/infx/workflows/validate_perf_changelog.py, lines 147-150 (validate_added_pr_link) raise when the link is neither a placeholder nor the expected link. The merge helper also refuses to rewrite the link. The validator is wired into CI at .github/workflows/run-sweep.yml:106.

Comment on lines +136 to +154
gpus: 8
args:
tensor-parallel-size: 8
attn-dp-size: 2
enable-dp-lm-head: true
expert-parallel-size: 8
chunked-prefill-size: 65536
max-running-requests: 128
cuda-graph-max-bs-decode: 64
cuda-graph-max-bs-prefill: 16384
mem-fraction-static: 0.75
env:
SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '32768'
benchmark:
env:
CONC: '64'
KV_OFFLOADING: none

override_tp8_ep8_c128:

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.

🔴 The TP8 conc 64 and 128 results will not measure the DeepGEMM MegaMoE path that the recipe comment and PR description advertise. Both TP8 overrides set only SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK, which caps per-rank tokens. Neither passes the flag that selects the MegaMoE backend, so SGLang serves EP8 with its default MoE path. Fix: add moe-a2a-backend: megamoe to both TP8 overrides (override_tp8_ep8_c64 and override_tp8_ep8_c128), and keep the per-rank token cap of at least chunked-prefill-size / attn-dp-size (32768). Otherwise, drop the MegaMoE claims.

Why this was flagged

Both TP8 matrix points ({ tp: 8, ep: 8, ... conc-list: [64, 128] } at nvidia-master.yaml:5620) bind to override_tp8_ep8_c64 / override_tp8_ep8_c128 (agentic.yaml:136-173). Those overrides set expert-parallel-size: 8 and the env SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '32768'. Neither sets moe-a2a-backend or moe-runner-backend. Other SGLang recipes in this repo choose MegaMoE with --moe-a2a-backend megamoe (perf-changelog.yaml:3056, 3117, 3218, 6336, 6438). There, the NUM_MAX_TOKENS_PER_RANK variable only sizes the MegaMoE workspace, and the backend sets its companion env vars itself (perf-changelog.yaml:3221). So the c64/c128 runs fall back to SGLang's default EP MoE path. The published numbers then do not reflect the configuration described in perf-changelog.yaml:11014 and the master config comment. Because this is a new config, no base-branch result exists for these points to compare against.

Verification: In the new recipe, override_tp8_ep8_c64 and override_tp8_ep8_c128 (agentic.yaml:134-173) only set SGLANG_OPT_DEEPGEMM_MEGA_MOE_NUM_MAX_TOKENS_PER_RANK: '32768'. Neither override sets moe-a2a-backend or moe-runner-backend, and the base args don't either. Every other SGLang recipe in this repo pairs that env cap with moe-a2a-backend: megamoe. So the TP8 cells serve EP8 on SGLang's default MoE path.

Comment on lines +5598 to +5603
# MiniMax-M3.1-Flash AgentX on B200 with SGLang: day-zero image from the SGLang
# cookbook (https://docs.sglang.io/cookbook/autoregressive/MiniMax/MiniMax-M3.1),
# manifest digest verified 2026-10-24. Serve flags follow the cookbook's
# B200 Balanced (TP4) and High-Throughput (TP8, attention DP2, EP8; mem 0.75, prefill graphs to 16384).
# Seven-token DSpark (bundled draft); synthetic acceptance follows
# infx/golden_al_distribution/minimaxm31flash_dspark.yaml.

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.

🟡 nit (optional): new header and provenance comments break the AGENTS.md comment rules, which forbid header comments and history. sweep:cookbook|digest verified|# Balanced|# High-Throughput|# TP4 Balanced Examples: the six-line header above minimaxm31flash-fp4-b200-sglang-agentic-dspark (nvidia-master.yaml:5598-5603) says where the flags came from and when the digest was verified. The recipe's "Serve flags follow the cookbook..." comment (agentic.yaml:24-25) does the same. Fix: delete header, section and provenance comments, keeping only short per-line technical why comments.

Why this was flagged

AGENTS.md "Code comments (mandatory)" bans header comments above a recipe, override or section. It also bans comments about where code came from. The diff adds a section header above the master entry (nvidia-master.yaml:5598-5603, including "manifest digest verified 2026-10-24"). It adds section headers above the override groups in agentic.yaml (lines 51-52 and 130-132). It adds a cookbook-provenance comment above args (agentic.yaml:24-25), plus "# Balanced: TP4." and "# High-Throughput: ..." labels in the search-space (nvidia-master.yaml:5617, 5619-5620). On the base branch these comments do not exist. Maintainers would inherit comments the repo rules say must be removed.

Verification: Nit. The diff breaks the repository's mandatory comment rules every time it is merged as written. AGENTS.md:60-67 says: "No header comments." It also says: "No history." nvidia-master.yaml:5598-5603 is a six-line header above minimaxm31flash-fp4-b200-sglang-agentic-dspark. Nothing breaks at runtime because these are YAML comments.

@github-actions

github-actions Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Keep main's entries and re-add the B200 SGLang changelog and master-config blocks.
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.

1 participant