Skip to content

feat(agentx): add Kimi-K3 FP4 MI355X ATOM DSpark recipe - #2670

Closed
zejunchen-zejun wants to merge 22 commits into
SemiAnalysisAI:mainfrom
zejunchen-zejun:amd/agentx_kimik3_atom
Closed

feat(agentx): add Kimi-K3 FP4 MI355X ATOM DSpark recipe#2670
zejunchen-zejun wants to merge 22 commits into
SemiAnalysisAI:mainfrom
zejunchen-zejun:amd/agentx_kimik3_atom

Conversation

@zejunchen-zejun

@zejunchen-zejun zejunchen-zejun commented Aug 19, 2026

Copy link
Copy Markdown

Recipe PR: ROCm/ATOM#1941
Adds the MI355X Kimi-K3 ATOM AgentX submission alongside the existing vLLM arm: same checkpoint, same runner, same concurrency points, so the two engines are directly comparable.

TP8 at concurrency 1 and 4 is GPU-resident. Concurrency 8 and 10 switch on the LMCache DRAM tier and ATOM's CPU state-offload tier together, because Kimi-K3 is a hybrid -- Kimi Delta Attention carries a per-request recurrent state alongside the paged KV, so a resumed agentic turn needs the state back and the paged KV tier alone cannot restore one.

spec-decode-acceptance-rate is derived from the committed golden acceptance length 2.51 at num_speculative_tokens 2 as (2.51 - 1) / 2 = 0.755, the same golden the vLLM arm feeds to synthetic_acceptance_length, so both engines are held to one acceptance assumption.

LMCACHE_MAX_LOCAL_CPU_SIZE is per rank, so the aggregate TOTAL_CPU_DRAM_GB is divided by TP as the agentic README requires; dram-utilization 0.085 lands that at roughly 32 GB per rank.

Adds the MI355X Kimi-K3 ATOM AgentX submission alongside the existing vLLM
arm: same checkpoint, same runner, same concurrency points, so the two
engines are directly comparable.

TP8 at concurrency 1 and 4 is GPU-resident. Concurrency 8 and 10 switch on
the LMCache DRAM tier and ATOM's CPU state-offload tier together, because
Kimi-K3 is a hybrid -- Kimi Delta Attention carries a per-request recurrent
state alongside the paged KV, so a resumed agentic turn needs the state back
and the paged KV tier alone cannot restore one.

spec-decode-acceptance-rate is derived from the committed golden acceptance
length 2.51 at num_speculative_tokens 2 as (2.51 - 1) / 2 = 0.755, the same
golden the vLLM arm feeds to synthetic_acceptance_length, so both engines are
held to one acceptance assumption.

LMCACHE_MAX_LOCAL_CPU_SIZE is per rank, so the aggregate TOTAL_CPU_DRAM_GB is
divided by TP as the agentic README requires; dram-utilization 0.085 lands
that at roughly 32 GB per rank.

新增 MI355X 上 Kimi-K3 的 ATOM AgentX 提交,与既有 vLLM 分支并列:相同权重、
相同 runner、相同并发点,两个引擎可直接对比。

TP8 在并发 1 和 4 下全部驻留 GPU。并发 8 和 10 同时开启 LMCache DRAM 层与
ATOM 的 CPU state-offload 层,因为 Kimi-K3 是混合架构——Kimi Delta Attention
在分页 KV 之外还带有每请求的循环状态,恢复一次 agentic 轮次必须取回该状态,
仅靠分页 KV 层无法还原。

spec-decode-acceptance-rate 由仓库内已提交的 golden 接受长度 2.51(
num_speculative_tokens 为 2)按 (2.51 - 1) / 2 = 0.755 推导,与 vLLM 分支传给
synthetic_acceptance_length 的 golden 一致,使两个引擎处于同一接受假设下。

LMCACHE_MAX_LOCAL_CPU_SIZE 是每 rank 的设置,因此按 agentic README 的要求将
聚合预算 TOTAL_CPU_DRAM_GB 除以 TP;dram-utilization 取 0.085 使其落在每 rank
约 32 GB。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A mechanical dry-run diff of the resolved server command against the ATOM
recipe, per concurrency, turned up three gaps:

- AITER_LOG_LEVEL was missing. ATOM requires it: without it the aiter kernel
  logs flood the server log for the whole 3600 s replay.
- dram-utilization 0.085 gave an aggregate of 254 GB, which floors to 31 GB
  per rank after the divide-by-TP. 0.086 gives 257 and lands on exactly the
  32 GB per rank the recipe was measured with.
- OFFLOAD_PROFILE stays unset, matching the measured runs rather than the
  recipe's 1; it only enables per-step offload statistics. Now stated in the
  script so the difference reads as a choice, not an omission.

After this the two commands are identical on every server flag and every
environment variable at concurrency 1, 4, 8 and 10. The one remaining textual
difference is an explicit --host 0.0.0.0, which is a no-op: ATOM's DEFAULT_HOST
is already 0.0.0.0.

按并发逐档对 resolved server command 与 ATOM recipe 做了机械化 dry-run 比对,
发现三处差异:

- 缺少 AITER_LOG_LEVEL。ATOM 要求设置该变量,否则 aiter kernel 日志会在整个
  3600 秒回放期间刷屏。
- dram-utilization 取 0.085 时聚合预算为 254 GB,按 TP 整除后落到每 rank
  31 GB。改为 0.086 得到 257,整除后正好是 recipe 实测所用的每 rank 32 GB。
- OFFLOAD_PROFILE 保持不设置,与实测运行一致,而非 recipe 中的 1;该变量仅
  开启逐步的 offload 统计。现已在脚本中写明,使该差异体现为有意选择而非遗漏。

此后两侧命令在并发 1、4、8、10 下的每一个服务端参数与每一个环境变量上完全一致。
唯一残留的文本差异是显式的 --host 0.0.0.0,而这是空操作:ATOM 的 DEFAULT_HOST
本身就是 0.0.0.0。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@seungrokj seungrokj added AMD agentx AgentX benchmarks, recipes, and infrastructure labels Aug 19, 2026
@zejunchen-zejun
zejunchen-zejun marked this pull request as ready for review August 19, 2026 07:25
@zejunchen-zejun
zejunchen-zejun requested a review from a team August 19, 2026 07:25

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision bb5da9c40e549ed108c7dfa4029697d9c83b931a.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 bb5da9c40e549ed108c7dfa4029697d9c83b931a 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision 719fb73ef12aea9830f14abe2b053ce87bf98915.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 719fb73ef12aea9830f14abe2b053ce87bf98915 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision cee4d50553e18fc8af12194359051efbf41d995b.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 cee4d50553e18fc8af12194359051efbf41d995b 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision cb5f8150faf4a05b80d3081a0e19192a2bf76baa.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 cb5f8150faf4a05b80d3081a0e19192a2bf76baa 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision 4fc2072deabb94ebedd91c3a86a75ab4af16d671.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 4fc2072deabb94ebedd91c3a86a75ab4af16d671 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision a415354e4daa92dbe91d3047e89952b89bdbaa9e.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 a415354e4daa92dbe91d3047e89952b89bdbaa9e 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision e33acaf212cdd93e5e483ea0936c3c8dd1f23f7d.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 e33acaf212cdd93e5e483ea0936c3c8dd1f23f7d 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@github-actions

Copy link
Copy Markdown
Contributor

Dispatched trusted sweep run for approved external revision 39bbc96db42c12fe1f490ef6cf195885d76354a1.
New commits are not trusted automatically; remove and re-add the primary sweep label to approve a new SHA.

已为获批的外部提交 39bbc96db42c12fe1f490ef6cf195885d76354a1 调度trusted sweep run
后续新提交不会自动获得信任;如需批准新的 SHA,请移除并重新添加主扫描标签。

@seungrokj

Copy link
Copy Markdown
Collaborator

/reuse-sweep-run

@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
  • 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; FLOPs at lower precisions is fine, given that the config passes private evals. 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.

Additional detail section:

Signed: seungrokj

@seungrokj

Copy link
Copy Markdown
Collaborator

It seems sign-off verify does not work on External PR

@cquil11

cquil11 commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

/stage-results 32353543507

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

Development

Successfully merging this pull request may close these issues.

3 participants