Skip to content

[AMD][AgentX] Add DeepSeek-V4.1-Flash ATOM TP2/TP4 / 新增 DeepSeek-V4.1-Flash ATOM TP2/TP4 - #3387

Merged
seungrokj merged 11 commits into
mainfrom
feat/dsv41flash-mi355x-atom-agentic-dspark
Sep 25, 2026
Merged

seungrokj merged 11 commits into
mainfrom
feat/dsv41flash-mi355x-atom-agentic-dspark

Conversation

@yhl-amd

@yhl-amd yhl-amd commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add dsv41flash-fp4-mi355x-atom-agentic-dspark following the upstream ATOM TP2 / TP4 recipe, using the integration pattern from #2668.

  • Pin rocm/atom-dev:nightly_202609250902 and serve deepseek-ai/DeepSeek-V4.1-Flash on cluster:mi355x-amds. TP2 concurrency: [1, 2, 8, 16, 32, 64]; TP4: [2, 8, 16, 32, 64]. No expert parallelism or KV offload.
  • Match BF16 KV, FP8 index cache, max-num-seqs=128, 16K batching/prefill chunks, prefix caching with block size 16, 8K state checkpoints, level 3, FULL graphs, and dsml_v41. At c32, capture every size through 32 plus 48/64/128; otherwise use the upstream sparse list.
  • Use five-token DSpark with the committed thinking_on golden AL 3.51 for throughput. Eval-only runs use real acceptance. Canonical AgentX runs replay semianalysis_cc_traces_weka_062126 for 3600 seconds with five warmup requests per lane. Retain the shared harness's explicit duration overrides and fast mode.

The existing MI355X launcher routes draft_model to the new executable _atom_mtp.sh script, mounts the model cache and repository at /ix, and supplies the GPU allocation. The script preserves that allocation and uses the shared replay, metrics, eval, and cleanup helpers. English/Chinese documentation and the append-only performance changelog are updated.

Image and draft

Docker Hub manifest: sha256:9aaeed59d78decfc51eaabda072ba095c1d64d6cfbdb64ecb28ea74cf3deb18a. Image labels identify ATOM 0.1.7.dev35+g4685e3cf7, source revision 4685e3cf7da95036126f94749258b9ed3b4cb3ed, and ROCm 7.2.4.

Use the checkpoint's embedded DSpark head through the pinned image's default loader. No draft checkpoint replacement, online quantization configuration, draft precision override, or engine patch is applied. The pinned weight loader retains its default draft tensor handling, including wo_a dequantization. These are source/registry checks; GPU execution and checkpoint-loading evidence remain pending.

Validation

  • bash -n and git diff --check passed.
  • YAML parsing, exact-key matrix generation, filtered family generation, and the real changelog validator passed. Both matrices contain exactly the 11 intended points at 3600 seconds. Existing changelog bytes are preserved.
  • Executed the real benchmark script and shared replay builder with external GPU/network/workload operations stubbed: TP2 sparse capture, TP4 c32 dense capture, real-acceptance eval, fast mode, and duration override passed. Invalid TP, KV offload, and missing EVAL_ONLY fail before server launch.
  • Verified the launcher filename route and upstream CLI flags against the image's recorded ATOM revision.
  • GPU sweep and accuracy eval are pending; no new performance results are claimed.

AI model disclosure

Prepared with OpenAI GPT-6 via Codex for implementation, source inspection, and local validation. The exact runtime model/version identifier was not exposed and could not be verified. No delegated agents were used.

中文

概要

参考 #2668 的接入方式,按照 ATOM 上游 TP2 / TP4 配方 新增 dsv41flash-fp4-mi355x-atom-agentic-dspark。

  • 固定镜像 rocm/atom-dev:nightly_202609250902,在 cluster:mi355x-amds 上运行 deepseek-ai/DeepSeek-V4.1-Flash。TP2 并发为 [1, 2, 8, 16, 32, 64],TP4 为 [2, 8, 16, 32, 64],不启用专家并行或 KV 卸载。
  • 对齐 BF16 KV、FP8 index cache、max-num-seqs=128、16K batching/prefill chunk、block size 16 的前缀缓存、8K 状态检查点、level 3、FULL graphs 和 dsml_v41。c32 捕获 1–32 的全部尺寸及 48/64/128,其他点使用上游稀疏列表。
  • 使用 5-token DSpark,吞吐测试采用仓库已提交的 thinking_on golden AL 3.51,eval-only 使用真实 acceptance。标准 AgentX 测试回放 semianalysis_cc_traces_weka_062126,每点 3600 秒,每条 lane 预热 5 个请求;保留公共 harness 的显式时长覆盖和 fast mode。

现有 MI355X launcher 已能将 draft_model 路由到新增的可执行 _atom_mtp.sh 脚本,将模型缓存和仓库挂载至 /ix,并传入 GPU 分配。脚本保留该分配,复用公共 replay、metrics、eval 和清理函数;同步更新中英文文档,性能 changelog 仅在末尾追加。

镜像与 draft

Docker Hub manifest 为 sha256:9aaeed59d78decfc51eaabda072ba095c1d64d6cfbdb64ecb28ea74cf3deb18a。镜像标签记录 ATOM 0.1.7.dev35+g4685e3cf7、源码 revision 4685e3cf7da95036126f94749258b9ed3b4cb3ed 和 ROCm 7.2.4。

通过镜像默认 loader 使用检查点内置的 DSpark head,不替换 draft 检查点、不设置在线量化或 draft 精度覆盖,也不修改 engine。已检查固定版本的 weight loader,保留包括 wo_a 反量化在内的默认处理。这些证据来自源码和 registry,GPU 执行及检查点加载证据仍待补充。

验证

  • bash -n、git diff --check、YAML 解析、精确配置及过滤矩阵生成、正式 changelog validator 均通过。两个矩阵都只有预期的 11 个点,时长均为 3600 秒;历史 changelog 字节保持不变。
  • 在替代外部 GPU、网络和工作负载操作后,执行真实 benchmark 脚本及公共 replay builder:TP2 稀疏 capture、TP4 c32 密集 capture、真实 acceptance eval、fast mode 和时长覆盖均通过。非法 TP、KV 卸载及缺失 EVAL_ONLY 均在启动 server 前失败。
  • 已核对 launcher 文件路由及镜像所记录 ATOM revision 的 CLI 参数。
  • GPU sweep 和准确率 eval 尚未完成,本 PR 不声称已获得新的性能结果。

AI 模型披露

由 OpenAI GPT-6 通过 Codex 完成实现、源码检查和本地验证。运行环境未暴露确切的模型/版本标识,因此无法核实。未使用委派代理。

新增 DeepSeek-V4.1-Flash 在 MI355X 上的 ATOM TP2/TP4 AgentX 配方,使用指定 nightly 镜像、5-token DSpark 和 golden AL 3.51;同步中英文文档及性能变更记录。
回填 DeepSeek-V4.1-Flash ATOM 配方的实际 PR 链接。
@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 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

将性能变更记录指向 upstream 分支提交的 PR 3387。
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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

I reviewed this PR and didn't find any bugs. Because it adds a new AMD ATOM benchmark recipe touching CODEOWNER-protected files (configs/amd-master.yaml, MODELS.md) with ROCm/ATOM-specific server flags that still lack GPU validation, a human (ideally one of the listed AMD codeowners) look would still be worthwhile.

What was reviewed: the new dsv41flash_fp4_mi355x_atom_mtp.sh benchmark script (env-var checks, TP/EP/DP validation, capture-size logic, spec-decode args, server startup/cleanup traps) against the closely-analogous existing dsv4_fp4_mi355x_atom_mtp.sh and dsv41flash_fp4_mi355x_vllm_mtp.sh scripts; confirmed the MI355X launcher's _mtp suffix routing for draft_model/mtp covers the new script; checked that configs/amd-master.yaml's new matrix entry, the append-only perf-changelog.yaml entry, and the English/Chinese docs all describe the same TP2/TP4 concurrency lists, image, and DSpark settings consistently.

Extended reasoning...

The change adds a new AMD MI355X ATOM AgentX recipe: a new benchmark shell script, a config matrix entry, docs (EN/ZH), MODELS.md/MODELS_zh.md updates, and an append-only perf-changelog entry — no application logic, auth, or data-handling code is touched, so there is no injection/auth/data-exposure surface. The script closely mirrors an existing sibling script (dsv4_fp4_mi355x_atom_mtp.sh) in structure, env-var validation, cleanup traps, and capture-size handling, and cross-checking it against that pattern and against benchmark_lib.sh's helper functions turned up no discrepancies. The decisive factor for deferring rather than approving is that configs/amd-master.yaml and MODELS.md are both explicitly CODEOWNER-protected files, and the recipe encodes ROCm/ATOM-specific tuning (capture sizes, kv/index cache dtypes, DSpark AL) that the PR itself says still awaits GPU execution and checkpoint-loading evidence.

This review covers commit 7f94c5f, which is no longer the latest commit on this pull request; later commits are not covered by it.

Honglie Yi and others added 4 commits September 24, 2026 15:54
将 DeepSeek-V4.1-Flash ATOM 配方镜像更新为 rocm/atom-dev:nightly_202609241513(digest sha256:d04ec105),同步中英文文档及性能变更记录。

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
解决 perf-changelog.yaml 追加冲突,本 PR 条目移至末尾。

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
将 DeepSeek-V4.1-Flash ATOM 配方镜像更新为 rocm/atom-dev:nightly_202609250902(digest sha256:9aaeed59),同步中英文文档及性能变更记录。

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
解决 perf-changelog.yaml 追加冲突,本 PR 条目移至末尾。

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@seungrokj

Copy link
Copy Markdown
Collaborator

/reuse-sweep-run 36123267823

@seungrokj seungrokj added AMD agentx AgentX benchmarks, recipes, and infrastructure labels Sep 25, 2026
seungrokj and others added 4 commits September 25, 2026 11:11
…-Flash

PR #3387 adds the DeepSeek-V4.1-Flash FP4 ATOM AgentX recipe on MI355X
(TP2/TP4, five-token DSpark, BF16 KV, FP8 index cache, no EP/KV offload).

This commit adds a changelog note recording the data-type-preserved audit:
DSpark draft layers 37-39 keep their checkpoint precision. The recipe
passes no --online_quant_config, so make_v4_quant_config builds the same
per-layer quant spec for the drafter as the target; the mtp.0/1/2 weights
load inline from the same checkpoint (spec_decode=True) and
config.get_layer_quant_config has no mtp.* special case, so ATOM neither
re-quantizes nor up/down-casts them. --kv_cache_dtype/--index-cache-dtype
affect cache storage only, not draft/MTP weights.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…4 DSpark)

Add the DeepSeek-V4.1-Flash FP4 ATOM AgentX recipe on MI355X following the
upstream TP2/TP4 recipe: TP2 conc [1,2,8,16,32,64], TP4 conc [2,8,16,32,64],
no expert parallelism or KV offload. Uses rocm/atom-dev:nightly_202609250902,
BF16 KV, FP8 index cache, max-num-seqs 128, 16K batching/prefill chunks,
prefix caching with block size 16, 8K state checkpoints, level 3 + FULL graphs.
Five-token DSpark with thinking_on golden AL 3.51 for throughput, real
acceptance for eval, dsml_v41 tool parsing.

Data-type preserved: DSpark draft layers 37-39 keep their checkpoint precision.
The recipe passes no --online_quant_config, so make_v4_quant_config builds the
same per-layer quant spec for the drafter as the target; the mtp.0/1/2 weights
load inline from the same checkpoint (spec_decode=True) and
config.get_layer_quant_config has no mtp.* special case, so ATOM neither
re-quantizes nor up/down-casts them. --kv_cache_dtype/--index-cache-dtype
affect cache storage only, not draft/MTP weights.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

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

As a PR reviewer and CODEOWNER, I have reviewed this and have:

  • Verified that as of the moment of typing this, this is the latest version of PR_REVIEW_CHECKLIST.md
  • Verified that the general code quality meets the InferenceX standard and does not make the code quality any worse.
  • Verified that this PR has passed PR validation. Please link to GitHub Action workflow that shows this.
  • Verified that this PR passes evals. Please link to GitHub Action workflow that shows this.
  • Verified that speculative decoding PRs uses chat templates to align the AL distribution to real world
  • Verified that every draft model and draft head is served as it ships: the draft that ships with the served checkpoint, at its stored precision, through the pinned upstream image's default handling, with the shipped and effective draft precision recorded in the additional detail section. No submission-side quantization, dtype override, checkpoint substitution, or patch may lower draft precision below that default, regardless of eval results or AL. Explicitly verified that SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is not enabled in the effective recipe, including inherited settings; enabling it is prohibited going forward, and historical runs do not grant an exception. See Draft-model precision for what counts as the default and the MLPerf comparison.
  • For agentic workloads: verified that speculative-decoding configs (EAGLE / MTP / draft models) run with simulated synthetic acceptance, with the acceptance-length value taken from the committed golden AL curve in golden_al_distribution/ for that model, thinking mode, and draft length. A submission may choose any supported draft length, but it may not substitute a different acceptance target.
  • Verified against the current MODELS.md that this PR does not submit a deprecated model, scenario, or model-scenario combination.
  • Verified that the model architecture isn't changed with benchmark hacks like using --hf-overrides to skipping indexer for every x layers on models that don't natively support this. As a general rule, we won't accept optimizations that reduces the number of model architecture FLOPs. Anything that makes that same computation run faster is fair game; target/verifier FLOPs at lower precisions is fine, given that the config passes private evals, but this does not permit lowering draft-model or draft-head precision below what ships. As an general north star princple, we should only use optimizations which is used in production by customers that care about accuracy
  • If an company claims that they support vLLM/SGLang as first class LLM inference engines on their hardware, I have verified that the respective vLLM submission made using upstream https://hub.docker.com/u/vllm docker repo, upstream SGLang https://hub.docker.com/u/lmsysorg docker repo. The only exceptions are for new hardware, such as MI455X UALoE72, Vera Rubin NVL72, Rubin NVL8, etc., and for new model architectures where there is an actual reason why vLLM/SGLang does not fundamentally support them yet as supported by vLLM/SGLang community maintainers
  • If an company claims that they support vLLM/SGLang as first class upstream in-tree LLM inference engines on their hardware, I have have verified that the respective vLLM/SGLang submission has been made before additional frameworks (TRT-LLM, ATOM, etc.). The only exceptions are for new hardware, such as MI455X UALoE72, Vera Rubin NVL72, Rubin NVL8, etc., and for new model architectures where there is an actual reason why vLLM/SGLang does not fundamentally support them yet.
  • Verified that every single-node vLLM/SGLang recipe in this PR is documented in the official vLLM recipes and/or the SGLang cookbook:
    • I linked the corresponding upstream PR in the vLLM recipe repo or SGLang repo and verified that it is MERGED before this InferenceX PR merges. An opened, draft, or closed-without-merge upstream PR does not satisfy this requirement. If the matching recipe was already published, I linked the published recipe/cookbook page in the additional detail section below.
  • Verified that this PR does not patch the inference engine or serving stack — the pinned image must run as shipped. This covers .patch files / git apply / patch, inline patches embedded in benchmark scripts (e.g. a python3/sed heredoc that rewrites installed engine sources before serving), in-place edits of site-packages, monkey-patching, overwriting container files, and installing forked/rebuilt engine wheels on top of the pinned image. The only exception is a patch covered by a filled-out waiver at docs/waiver/<PR_NUMBER>.md — named after the PR that introduces the patch and filed in that same PR, stating what is patched, why the unmodified upstream image cannot run this benchmark, the upstream PR/issue link, and the removal plan — which I have linked below in the additional detail section.
  • If this PR uses append-only: true, verified that it only adds generated points or recipe variants inside a selected existing config/scenario and existing same-image visual curve: every previously generated point remains present with the same recipe, no prior point is removed or rerun, and every benchmark-affecting change in the complete diff can affect only the corresponding newly appended points (never an existing point), regardless of which file contains it.
  • If any of the above criteria cannot reasonably be satisfied, I have provided additional reasoning below.
  • Reported measured throughput/E2EL Pareto counts and evidence per affected curve (≥5 points strongly recommended). Below 5 or unverifiable: tag a core maintainer for review; recorded admin bypass required before merge. N/A if no curves are affected. Details.

Additional detail section:

  • insert any additional info here
  • recipe at https://github.com/ROCm/ATOM/blob/main/recipes/DeepSeek-V4.1-Flash-Agentic.md
  • "DSpark draft layers 37-39 keep their checkpoint precision: the recipe passes no --online_quant_config, so online_quant_config resolves to None and make_v4_quant_config builds the same per-layer quant spec for the drafter as for the target. The MTP weights (mtp.0/1/2) load inline from the same checkpoint with spec_decode=True, and config.get_layer_quant_config has no mtp.* special case, so layers 37-39 are neither re-quantized nor up/down-cast by ATOM and retain their on-disk dtype. --kv_cache_dtype bf16 and --index-cache-dtype fp8 touch cache storage only, not draft/MTP weights."

Signed: seungrokj

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Verdict: WARN ⚠️

⚠️ Pareto coverage needs additional review: @functionstackx @cquil11 @Oseltamivir @adibarra. At least 5 points per affected throughput-versus-E2EL frontier are highly recommended. Below 5, or when coverage cannot be verified, merge only with an explicit, recorded admin bypass for the assessed commit; this advisory comment does not grant or enforce a bypass.

⚠️ Check 14 (Pareto coverage): WARN — dsv41flash agentic-coding MI355X ATOM FP4 (rocm/atom-dev:nightly_202609250902), P90 E2EL curve: 4/5 frontier points (TP2 c8, c16, c32, c64; 11 measured, 0 invalid). The P75 curve reaches 5/5 (TP4 c16; TP2 c8, c16, c32, c64). Evidence: bmk_agentic_* artifacts of run 36123267823 attempt 1, source SHA 02fae228, metric request_metrics.throughput.per_gpu.total_tput_tps vs latency.e2el.p90/p75, counted with infx.workflows.pareto_coverage. Admin bypass not verified: no admin exception comment found for b010f09c and this curve.

Passed and not applicable checks

✅ Check 0 (CODEOWNER): PASS — seungrokj is a listed owner of configs/amd-master.yaml. The remaining paths fall under the catch-all, or under MODELS*.md, whose owners include @SemiAnalysisAI/core.

✅ Check 1 (Passing sweep in PR): PASS — In-PR commit 02fae228 has all 11 agentic / jobs and the agentic eval / job at success in run 36123267823. Between that commit and the pinned head b010f09c, the only changes are main-branch merges. This recipe's script and config entry are unchanged.

✅ Check 2 (Evals pass): PASS — agg_eval_all.json shows GSM8K em_strict 0.953 ± 0.006 (n=1319) for TP2 c64 with real acceptance. It ran on the same rocm/atom-dev:nightly_202609250902 image as the config.

➖ Check 3 (Recipe): N/A — This is an ATOM submission, and the recipe-link rule covers vLLM/SGLang single-node recipes only. For reference, the linked ATOM recipe is on ATOM main, and its TP2/TP4 server args match the script exactly.

✅ Check 4 (Reuse command): PASS — COLLABORATOR seungrokj posted /reuse-sweep-run 36123267823.

✅ Check 5 (Latest template): PASS — Every item in the current PR_REVIEW_CHECKLIST.md template, including the recipe sub-item and the Pareto item, is present and checked.

✅ Check 6 (Upstream images / engine-first): PASS — ATOM is not subject to rule 6(a). For engine-first ordering, dsv41flash-fp4-mi355x-vllm-agentic-dspark and dsv41flash-fp4-mi355x-sglang-agentic-dspark already exist on cluster:mi355x-amds.

✅ Check 7 (No deprecated models): PASS — dsv41flash agentic coding is active in MODELS.md, with no deprecation listed.

✅ Check 8 (No architecture hacks): PASS — There are no --hf-overrides, model-config edits, or layer/expert trimming.

✅ Check 9 (Spec-decode chat templates): PASS — build_replay_cmd drives /v1/chat/completions with --endpoint-type chat (benchmarks/benchmark_lib.sh:3266-3267).

✅ Check 10 (No engine patches): PASS — The script applies no patches, source rewrites, monkey-patches, or engine wheel installs. It only runs hf download and installs harness dependencies.

✅ Check 11 (Golden AL): PASS — Throughput runs pass --spec-decode-acceptance-length 3.51 with 5 DSpark tokens. At ATOM 4685e3cf, that flag force-accepts draft tokens (same units as vLLM's synthetic_acceptance_length). The value equals golden_al_distribution/dsv41flash_dspark.yaml thinking_on K5 = 3.51. Eval-only runs use real acceptance.

➖ Check 12 (Append-only): N/A — The new changelog entry does not set append-only: true.

✅ Check 13 (Draft as shipped): PASS — The embedded DSpark head loads from the served checkpoint. The script sets no --online_quant_config, draft-model path, draft quantization, or dtype override, and does not set SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE (an SGLang flag; this is ATOM). At the pinned ATOM 4685e3cf, deepseek_v41/weights.py gives draft (mtp.*) tensors the same checkpoint schema as the backbone. It rejects any dtype mismatch (lines 364-365) and applies only the default wo_a scale dequantization. --kv_cache_dtype bf16 does not go below the default.

Assessed commit: b010f09c3da9c6c80944df641f772d80fd6cdd68.

@functionstackx

Copy link
Copy Markdown
Collaborator

overriding warning as the points seems reasonably spaced out
image

image

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

approved

@seungrokj
seungrokj merged commit 8490145 into main Sep 25, 2026
27 of 43 checks passed
@seungrokj
seungrokj deleted the feat/dsv41flash-mi355x-atom-agentic-dspark branch September 25, 2026 18:40
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-fail-fast

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants