Skip to content

feat: enable DSpark for DeepSeek-V4-Pro-0813 AgentX disagg on MI355X - #3188

Merged
cquil11 merged 18 commits into
mainfrom
dspark-dsv4-mi355-agentx-disagg
Sep 17, 2026
Merged

cquil11 merged 18 commits into
mainfrom
dspark-dsv4-mi355-agentx-disagg

Conversation

@Duyi-Wang

@Duyi-Wang Duyi-Wang commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Enable DSPARK for DeepSeek-V4-Pro-0813 on the MI355X disaggregated AgentX path. The recipe uses block size 3 / four verification tokens and the measured golden throughput AL of 3.01; evaluation uses natural verification. The 0813 checkpoint supplies the DSpark draft weights.

Both prefill and decode node logs are collected into the uploaded server artifact. All nodes now finish the existing preflight checks before any serving container starts. Serving process groups are tracked and cleaned up on normal completion or failed startup, with bounded teardown that preserves the original benchmark failure status. Benchmark duration, serving parameters, acceptance settings, accuracy thresholds and offload budgets are unchanged by these lifecycle fixes.

Validation:

  • Full sweep source: https://github.com/SemiAnalysisAI/InferenceX/actions/runs/35166686551 — all seven throughput points and three evaluations passed; all successful points have verified prefill/decode artifacts.
  • Focused local tests passed for command construction, changelog, reuse and evaluation collection. The three added cleanup, preflight and node-log staging test files were removed.
  • Changelog/matrix validation, Bash syntax, Ruff and formatting pass. Main's changelog bytes are preserved and this PR's contribution is appended.
  • The GPU sweep ran source commit cbcaed5, before the later lifecycle fixes. The completed sweep is retained through the supported /use 35166686551 workflow.

The full-sweep-enabled label remains enabled. No benchmark or accuracy threshold was relaxed.

Add a DSpark arm to the AMD multi-node SGLang disaggregated path and switch
dsv4-fp4-mi355x-sglang-disagg-agentic-hicache-mtp onto it.

models.yaml: DeepSeek-V4-Pro-AgentX gains dspark_flags alongside (not
replacing) mtp_flags, so recipes that stay on spec-decoding: mtp keep the
EAGLE arm untouched. dp_flags gains --enable-dp-lm-head, which SGLang
requires for DSpark under DP attention and which is harmless for EAGLE.

server_sglang.sh: the config loader exports MODEL_DSPARK_FLAGS, and
build_server_config branches on SPEC_DECODING == draft_model.
DECODE_MTP_SIZE carries the draft length for both algorithms but they spend
it differently: EAGLE runs that many sequential draft passes, while DSpark
emits a whole block in one pass, so num-steps is pinned to 1 and the draft
length becomes --speculative-dspark-block-size. The verify window
(num-draft-tokens = draft length + 1) is identical, which is why the MORI
decode dispatch scaling by (DECODE_MTP_SIZE + 1) needs no change. A model
configured with draft_model but no dspark_flags now fails hard instead of
silently falling back to EAGLE.

amd-master.yaml: all four arms move to spec-decoding: draft_model at
DECODE_MTP_SIZE=3 (golden AL 3.01), and the image moves to
v0.5.19-rocm720-mi35x-20260913, the first tag carrying the DSpark
optimizations. CLIENT_IMAGE stays at 20260907; it only runs the load
generator.

在 AMD 多节点 SGLang 分离式路径上启用 DSpark,并将
dsv4-fp4-mi355x-sglang-disagg-agentic-hicache-mtp 切换过去。

models.yaml:DeepSeek-V4-Pro-AgentX 新增 dspark_flags,与 mtp_flags 并列而非
替换,因此仍使用 spec-decoding: mtp 的配方的 EAGLE 分支不受影响。dp_flags 增加
--enable-dp-lm-head,这是 SGLang 在 DP attention 下运行 DSpark 的必需项,对
EAGLE 无副作用。

server_sglang.sh:配置加载器新导出 MODEL_DSPARK_FLAGS,build_server_config 按
SPEC_DECODING == draft_model 分流。DECODE_MTP_SIZE 对两种算法都表示草稿长度,
但花法不同:EAGLE 顺序执行同样次数的草稿前向,而 DSpark 一次前向产出一整块,
因此 num-steps 固定为 1,草稿长度改为 --speculative-dspark-block-size。验证窗口
(num-draft-tokens = 草稿长度 + 1)两者相同,这正是 MORI 解码 dispatch 的
×(DECODE_MTP_SIZE + 1) 缩放无需改动的原因。若模型配置了 draft_model 却没有
dspark_flags,现在直接硬失败,而不是静默退回 EAGLE。

amd-master.yaml:四条臂全部切到 spec-decoding: draft_model,DECODE_MTP_SIZE=3
(黄金 AL 3.01),镜像升级到 v0.5.19-rocm720-mi35x-20260913,即首个带 DSpark
优化的标签。CLIENT_IMAGE 保持 20260907,该容器只运行负载生成器。
@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 only run on labeled PRs. Add full-sweep-fail-fast (strongly recommended); use full-sweep-enabled only when matrix jobs should continue after a failure.
  • 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 上运行。强烈建议添加 full-sweep-fail-fast;仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled
  • **合并后:**PR 作者必须确保所有 GitHub Actions 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明

Append the perf-changelog entry for
dsv4-fp4-mi355x-sglang-disagg-agentic-hicache-mtp moving to
spec-decoding: draft_model on image -20260913.

为 dsv4-fp4-mi355x-sglang-disagg-agentic-hicache-mtp 切换到
spec-decoding: draft_model 及镜像 -20260913 追加 perf-changelog 条目。
Comment thread configs/amd-master.yaml Outdated
@Duyi-Wang Duyi-Wang changed the title feat: enable DSpark for DeepSeek-V4-Pro-0813 AgentX disagg on MI355X / 在 MI355X AgentX 分离式路径上为 DeepSeek-V4-Pro-0813 启用 DSpark feat: enable DSpark for DeepSeek-V4-Pro-0813 AgentX disagg on MI355X Sep 16, 2026
Rename dsv4-fp4-mi355x-sglang-disagg-agentic-hicache-mtp to
dsv4-fp4-mi355x-sglang-disagg-agentic-umbp-dspark per review, so the key
names the algorithm the arm now serves (DSpark) instead of the retired MTP
label, matching the dsv41flash-*-agentic-dspark precedent.

The rename touches only the config key. The emitted matrix is byte-identical
to the pre-rename run: 7 points, same exp-names (derived from model-prefix
and topology, not the key), image, spec-decoding, topology, concurrency, and
offload backends. Historical perf-changelog entries keep the old key, which
the append-only contract requires; the new entry records the rename so the
lineage stays traceable.

按评审意见,将 dsv4-fp4-mi355x-sglang-disagg-agentic-hicache-mtp 改名为
dsv4-fp4-mi355x-sglang-disagg-agentic-umbp-dspark,使配置键反映该分支实际
使用的算法(DSpark),而非已停用的 MTP 标签,与 dsv41flash-*-agentic-dspark
的命名惯例一致。

改名仅涉及配置键。生成的 matrix 与改名前逐字节一致:7 个点,exp-name
(由 model-prefix 与拓扑推导,与键名无关)、镜像、spec-decoding、拓扑、
并发列表、offload 后端均不变。perf-changelog 的历史条目保留旧键名(append-only
契约的要求),新条目记录了此次改名以保持谱系可追溯。

@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 configs/amd-master.yaml
Comment thread benchmarks/multi_node/amd_utils/server_sglang.sh
The guard lived inside build_server_config, which is only ever invoked as
PREFILL_SERVER_CONFIG=$(build_server_config ...). exit there terminates the
command-substitution subshell, and with no set -e and no status check the
script carried on with an empty config string -- dropping base, ep, dp, and
parallel flags for that mode, a worse failure than the silent EAGLE fallback
the guard was meant to prevent.

Move the check to top level, immediately before both build_server_config
calls, where exit 1 actually stops the script. The in-function branch keeps a
comment explaining why the validation is not co-located with the flag it
guards.

Verified: with SPEC_DECODING=draft_model and empty MODEL_DSPARK_FLAGS the old
shape exits 0 and continues with an empty config, the new shape exits 1
before either assignment. Populated dspark_flags, spec-decoding mtp, empty
SPEC_DECODING, and DECODE_MTP_SIZE=0 all still pass through unchanged.

原先的守卫位于 build_server_config 内,而该函数只以
PREFILL_SERVER_CONFIG=$(build_server_config ...) 的形式调用。子 shell 里的 exit
只会终止命令替换本身;脚本没有 set -e,也没有检查退出码,因此会带着空配置字符串
继续执行——该模式下的 base、ep、dp、parallel 参数全部丢失,比守卫本要防止的
"静默退回 EAGLE" 更糟。

将检查移到顶层、两次 build_server_config 调用之前,此处 exit 1 才真正终止脚本。
函数内分支保留注释,说明校验为何没有与它所保护的 flag 放在一起。

已验证:当 SPEC_DECODING=draft_model 且 MODEL_DSPARK_FLAGS 为空时,旧写法退出码
为 0 并带空配置继续,新写法在两次赋值之前即以退出码 1 终止。dspark_flags 非空、
spec-decoding 为 mtp、SPEC_DECODING 为空、以及 DECODE_MTP_SIZE=0 四种情况均保持
原有行为。
@Duyi-Wang Duyi-Wang added AMD full-sweep-enabled agentx AgentX benchmarks, recipes, and infrastructure labels Sep 16, 2026
@github-actions

github-actions Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

@functionstackx functionstackx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@Duyi-Wang can u port over cam's changes to collect node logs from all nodes plz #3170

@cquil11

cquil11 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

/stage-results 35166686551

@github-actions

github-actions Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

@cquil11 staged run 35166686551: https://inferencemax-app-git-staging-semianalysisai.vercel.app/inference?i_dates=2026-09-17~r35166686551

This run remains available across future /stage-results requests. Staging the same run ID again updates its staged data. Staging workflow

@cquil11

cquil11 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

/use 35166686551

@cquil11
cquil11 dismissed functionstackx’s stale review September 17, 2026 14:49

I told Seungrok to wait for me since it's still WIP

@cquil11
cquil11 merged commit c3cd0f1 into main Sep 17, 2026
25 checks passed
@cquil11
cquil11 deleted the dspark-dsv4-mi355-agentx-disagg branch September 17, 2026 14:49
kedarpotdar-nv added a commit that referenced this pull request Sep 17, 2026
Resolves the perf-changelog.yaml conflict where this branch and PR #3188
both appended a new entry after the same GLM-5.2 entry, leaving the shared
"- config-keys:" line contested. Both entries are kept verbatim, with
main's entry ordered first so the branch remains a pure append over main.

That ordering is load-bearing: infx/matrix/plan.py rejects any deletion in
perf-changelog.yaml, and get_added_lines diffs pull.base.sha against
pull.head.sha (two-dot), not the merge base. While the branch was behind
main, main-only entries appeared as deletions and the check failed with

  ValueError: Deletions are not allowed in perf-changelog.yaml.
  Found deleted line: - config-keys:

naming kimik3-fp4-mi355x-vllm-agentic-mtp from PR #3124, an entry this
branch never touched.

No B300 recipe, master-config, or launcher content changes.

<details><summary>中文</summary>

解决 perf-changelog.yaml 的合并冲突:本分支与 PR #3188 都在同一条 GLM-5.2
条目之后追加了新条目,导致共享的 "- config-keys:" 行产生冲突。两条条目均
原样保留,并将 main 的条目排在前面,使本分支相对 main 保持纯追加。

该顺序是必要的:infx/matrix/plan.py 不允许 perf-changelog.yaml 出现任何
删除行,而 get_added_lines 使用 pull.base.sha 与 pull.head.sha 的两点 diff
(而非 merge base)。分支落后于 main 时,仅存在于 main 的条目会被判定为
删除,从而使检查失败。

本次合并未改动任何 B300 配方、master config 或 launcher 内容。

</details>

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentx AgentX benchmarks, recipes, and infrastructure AMD full-sweep-enabled

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants