Skip to content

feat(config): add TokenSpeed Kimi K3.1 Pro MXFP4 MI355X AgentX with DSpark / feat(config): 新增 TokenSpeed Kimi K3.1 Pro MXFP4 MI355X AgentX(DSpark)配置 - #5144

Merged
Oseltamivir merged 23 commits into
mainfrom
zhewenyu/k31-tokenspeed-mi355x-dspark
Nov 20, 2026
Merged

Oseltamivir merged 23 commits into
mainfrom
zhewenyu/k31-tokenspeed-mi355x-dspark

Conversation

@Yu-Zhewen

@Yu-Zhewen Yu-Zhewen commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Moved from #5101 (fork branch) to a same-repository branch so the sweep runs through run-sweep.yml.

Add kimik3.1-fp4-mi355x-tokenspeed-agentic-dspark: Kimi K3.1 Pro MXFP4 (moonshotai/Kimi-K3.1-Pro) AgentX on 8x MI355X with TokenSpeed behind the SMG gateway. Attention and MoE TP8 with EP1, the released Inferact/Kimi-K3.1-Pro-DSpark draft on TokenSpeed's MHA drafter backend (7 drafts at c1 to c8, 5 at c16 to c48), FP8 KV cache with the MXFP4 DSA indexer key cache, 1,048,560-token context and a 128 GB per GPU Host L2 KV store from c8 (kvstore-size: 128; c1 and c4 disable it). Concurrency 1, 4, 8, 16, 24, 32 and 48; KV parallel 8 with DCP8 from c8, and every point has its own running-request cap and prefill/decode intervals (recipe, README).

  • Pinned: TokenSpeed 0.1.1.post20261119, ROCm 7.2 kernel 0.1.5.post20261119, kernel-amd 0.1.4.post20261119 and engine 0.1.1.post20261119 by release URL and SHA256; scheduler 0.1.58 and tokenspeed-smg 1.16.0.post20261118 from PyPI; lightseekorg/tokenspeed-runner-amd:rocm7.2.4-pytorch-2.14.0-gfx950 by digest. tokenspeed-nightly-rocm.sh (the installer from feat(config): add TokenSpeed Muse Spark Open MXFP4 MI355X AgentX / feat(config): 新增 TokenSpeed Muse Spark Open MXFP4 MI355X AgentX 配置 #4962, unchanged) installs them and keeps the image's ROCm torch.
  • Revisions pinned on the worker: checkpoint d9e99b0792a5e93b78ea9bea62a68167e36ddd9e, DSpark draft e4e6e6261e9f8b6d5f249f9627eb6b109d762d5f (speculative-draft-model-revision), the draft the committed golden curve was measured with. It is a five-layer GQA stack, served as it ships (BF16) through drafter-attention-backend: mha.
  • The golden-AL connector and spec identity accept TokenSpeed DSPARK. Throughput uses the committed Kimi K3.1 Pro DSpark acceptance (4.16 and 3.81 at 7 and 5 drafts) with the greedy sampler, removing speculative sampling and block verification; evals keep the recipe's real verification (triton sampler, speculative sampling, block). TokenSpeed's decode-context-parallel-size binds to the matrix dcp-size.
  • lm-eval no longer sends top_p: every request runs at temperature 0, which decodes greedily, and SMG rejects any top_p other than the one the model pins (0.95 for Kimi K3).

Nightly: the pinned November 19 wheels all come from lightseekorg/tokenspeed@8080ba138, which includes lightseekorg/tokenspeed PR 3545, which the released draft needs. Installed in the pinned runner image by tokenspeed-nightly-rocm.sh, they served the c1 (KVP1, 7 drafts) and c48 (KVP8/DCP8, 5 drafts) points through 10-minute AgentX runs with no failed requests apart from 1 one-token turn that SMG 1.16 returns as empty content (acceptance length 4.12 and 3.73).

Overlap with #4962: this PR carries that PR's tokenspeed-nightly-rocm.sh, its workload.py entry and its test byte for byte, so those merge cleanly in either order. Both PRs extend the TokenSpeed golden-AL connector (DSPARK here, DFLASH there), so synthetic_acceptance.py, its tests and the golden-AL READMEs need a small rebase in whichever PR lands second.

Validated end to end on 8x MI355X outside CI, with a local harness that launches the worker and SMG with the recipe's flags and runs this branch's infx.bench clients. With the preview draft and the November 16 wheels: wheel smoke tests in KVP1 and KVP8/DCP8, GSM8K 97.95% at the c48 point, and 10-minute AgentX runs at c8 with no failed scored requests. With the released draft, on TokenSpeed source with lightseekorg/tokenspeed PR 3545: acceptance length 4.08 (KVP1) and 4.14 (KVP8) at 7 drafts, GSM8K 98.0% and 98.1%, and 1-hour AgentX at every concurrency point with this recipe's settings and no errors.

Validation details
  • Wheel smoke tests (the November 16 set in the pinned runner image, preview draft): install, import and pip check, then worker and SMG startup with real DSpark block verification, a short chat request and a 50K-input/64-output request, in both KVP1 and KVP8/DCP8. No runtime errors.
  • GSM8K (infx.bench eval, lm-eval 5-shot, temperature 0, all 1,319 questions, c48 point, real verification, preview draft): 97.95% strict match, no rejected requests.
  • AgentX (infx.bench agentic, c8 point, 10 minutes, two runs, preview draft): 0 of 195 and 0 of 196 scored requests failed. SMG's prompt token count matched the client's on every request. SMG reads the tokenizer from the checkpoint, as under srtctl, with no tokenizer-path.
  • SMG 1.16's kimi_k3 parser returns one-token warmup requests with empty content, so AIPerf logs about 40 warmup errors per run. Warmup is dropped before scoring.
Additional detail
  • Draft precision: shipped BF16 (Inferact/Kimi-K3.1-Pro-DSpark at e4e6e626: dtype: bfloat16, no quantization config); effective BF16 (no draft quantization flag; TokenSpeed's default handling).
AI model disclosure
  • Model/version: claude-opus-5-5 (Cursor agent)
    • Role: led the drafting session and reviewed the delegated work; later let SMG read the tokenizer from the checkpoint, ran the GSM8K and AgentX validation, rebased and wrote this description; later switched the recipe to the released draft, retuned the draft counts and updated this description; later re-pinned the November 19 nightly and smoke-tested its wheels.
  • Model/version: claude-opus-5-5-max (delegated Cursor subagent)
    • Role: wrote the initial recipe, master config entry, setup script, connector changes, tests and READMEs.
  • Model/version: gpt-5.6-sol (Cursor agent)
    • Role: switched the recipe to the November 16 nightly wheels, ran the wheel smoke tests, adopted the latest c48 settings, and fixed the review findings for snapshot argument retention and framework identity metadata.
  • Model/version: grok-4.7 (Cursor agent)
    • Role: handled one turn of the drafting session; whether that turn touched this PR could not be verified.
  • All changes were reviewed and directed by the author.
PR checklist and change type

Type of Change

  • Bug fix
  • New feature
  • Configuration change
  • Documentation update
  • Other (please describe)

Checklist

  • I have completed the AI model disclosure and kept it current
  • I have tested my changes locally
  • I have updated documentation if necessary
  • If python -m infx.matrix.changed --base origin/main lists affected config keys, I have appended one new entry covering them to the physical end of inferencex-e2e/perf-changelog.yaml; if it lists none, I have added none. I have not edited historical entries
  • If this PR appends an inferencex-e2e/perf-changelog.yaml entry, it carries exactly one primary sweep label (a maintainer applies it on fork PRs): full-sweep-fail-fast (recommended), full-sweep-enabled, or non-canary-full-sweep-enabled. Optional modifiers all-evals, evals-only, and agentx-fast require a primary label; the last two block reuse while applied.
  • Before merging via reuse, a maintainer with write access to the repository has commented /use <run_id> (or the legacy /reuse-sweep-run) on this PR. Do this only once there is a final full sweep that is all green with evals passing, since after this comment the primary sweep label will no longer automatically kick off new sweeps. Remove and re-add the primary sweep label to force a new sweep.
中文

本 PR 由 #5101(fork 分支)迁移至同仓库分支,以便通过 run-sweep.yml 运行 sweep。

新增 kimik3.1-fp4-mi355x-tokenspeed-agentic-dspark:在 8 张 MI355X 上用 TokenSpeed(通过 SMG 网关)运行 Kimi K3.1 Pro MXFP4(moonshotai/Kimi-K3.1-Pro)的 AgentX 配置。注意力和 MoE 均为 TP8、EP1,使用正式发布的 Inferact/Kimi-K3.1-Pro-DSpark 草稿模型,通过 TokenSpeed 的 MHA drafter 后端运行(c1 至 c8 为 7 个草稿 token,c16 至 c48 为 5 个),FP8 KV cache 配合 MXFP4 DSA indexer key cache,上下文长度 1,048,560 token,从 c8 起启用每 GPU 128 GB 的 Host L2 KV store(kvstore-size: 128;c1 和 c4 禁用)。并发 1、4、8、16、24、32、48;从 c8 起使用 KV 并行 8 和 DCP8,每个并发点设置各自的运行请求上限和 prefill/decode 间隔。

  • 固定版本:TokenSpeed 0.1.1.post20261119、ROCm 7.2 kernel 0.1.5.post20261119、kernel-amd 0.1.4.post20261119、engine 0.1.1.post20261119,均按 release URL 和 SHA256 固定;scheduler 0.1.58 与 tokenspeed-smg 1.16.0.post20261118 从 PyPI 安装;runner 镜像 lightseekorg/tokenspeed-runner-amd:rocm7.2.4-pytorch-2.14.0-gfx950 按 digest 固定。tokenspeed-nightly-rocm.sh(即 feat(config): add TokenSpeed Muse Spark Open MXFP4 MI355X AgentX / feat(config): 新增 TokenSpeed Muse Spark Open MXFP4 MI355X AgentX 配置 #4962 中的安装脚本,未作改动)安装这些包并保留镜像自带的 ROCm torch。
  • worker 固定 revision:checkpoint d9e99b0792a5e93b78ea9bea62a68167e36ddd9e,DSpark 草稿模型 e4e6e6261e9f8b6d5f249f9627eb6b109d762d5f(speculative-draft-model-revision),即已提交 golden 曲线所用的草稿模型。它是 5 层 GQA 结构,按发布原样(BF16)通过 drafter-attention-backend: mha 运行。
  • golden-AL 连接器和 spec identity 支持 TokenSpeed DSPARK:吞吐测试使用已提交的 Kimi K3.1 Pro DSpark 接受长度(7 和 5 个草稿 token 分别为 4.16 和 3.81)和 greedy 采样器,并移除 speculative sampling 与 block 验证;评测保留 recipe 中的真实验证(triton 采样器、speculative sampling、block)。TokenSpeed 的 decode-context-parallel-size 绑定到矩阵中的 dcp-size。
  • lm-eval 请求不再设置 top_p:所有请求都使用 temperature 0(greedy 解码),而 SMG 会拒绝与模型固定值(Kimi K3 为 0.95)不同的 top_p。

Nightly: 固定的 11 月 19 日 wheel 均构建自 lightseekorg/tokenspeed@8080ba138,包含正式草稿模型所需的 lightseekorg/tokenspeed PR 3545。在固定的 runner 镜像中通过 tokenspeed-nightly-rocm.sh 安装后,c1(KVP1,7 个草稿 token)和 c48(KVP8/DCP8,5 个草稿 token)配置各运行 10 分钟 AgentX,除 1 个被 SMG 1.16 返回为空内容的单 token 请求外无失败请求(接受长度 4.12 和 3.73)。

与 #4962 重叠: 本 PR 原样包含该 PR 的 tokenspeed-nightly-rocm.sh、workload.py 条目及其测试,因此这些文件无论哪一方先合入都不会冲突。两个 PR 都扩展了 TokenSpeed 的 golden-AL 连接器(本 PR 为 DSPARK,#4962 为 DFLASH),因此后合入的一方需要对 synthetic_acceptance.py、相关测试和 golden-AL README 做少量 rebase。

在 CI 之外于 8 张 MI355X 上完成端到端验证:本地脚本按 recipe 参数启动 worker 和 SMG,并运行本分支的 infx.bench 客户端。使用 preview 草稿模型和 11 月 16 日 wheel:KVP1 和 KVP8/DCP8 的 wheel 冒烟测试通过;c48 配置下 GSM8K 为 97.95%;c8 配置下 10 分钟 AgentX 测试中计分请求无失败。使用正式草稿模型(基于包含 lightseekorg/tokenspeed PR 3545 的 TokenSpeed 源码):7 个草稿 token 时接受长度为 4.08(KVP1)和 4.14(KVP8),GSM8K 为 98.0% 和 98.1%,按本 recipe 设置在每个并发点运行 1 小时 AgentX,无错误。

  • wheel 冒烟测试(在固定的 runner 镜像中使用 11 月 16 日的 wheel,preview 草稿模型):安装、import 和 pip check,随后在 KVP1 和 KVP8/DCP8 两种模式下启动 worker 与 SMG(真实 DSpark block 验证),发送一个短对话请求和一个 50K 输入/64 输出的请求,无运行时错误。
  • GSM8K(infx.bench eval,lm-eval 5-shot,temperature 0,全部 1,319 题,c48 配置,真实验证,preview 草稿模型):strict match 97.95%,无被拒请求。
  • AgentX(infx.bench agentic,c8 配置,10 分钟,两次运行,preview 草稿模型):195 个和 196 个计分请求均无失败;SMG 统计的 prompt token 数与客户端在每个请求上都一致。SMG 与 srtctl 下一样从 checkpoint 读取 tokenizer,不设置 tokenizer-path。
  • SMG 1.16 的 kimi_k3 解析器对只要求一个输出 token 的预热请求返回空内容,因此 AIPerf 每次运行会记录约 40 个预热错误。预热请求在计分前被丢弃。
  • 草稿模型精度:发布精度 BF16(Inferact/Kimi-K3.1-Pro-DSpark 的 e4e6e626:dtype: bfloat16,无量化配置),实际运行精度 BF16(未设置草稿量化参数,使用 TokenSpeed 默认处理)。

AI 模型使用说明:

  • claude-opus-5-5(Cursor agent):主导起草会话并审阅委派的工作;之后让 SMG 从 checkpoint 读取 tokenizer,运行 GSM8K 和 AgentX 验证,完成 rebase 并撰写本说明;之后将 recipe 切换为正式草稿模型,重新调整草稿 token 数并更新本说明;之后改为固定 11 月 19 日 nightly 并对其 wheel 做冒烟测试。
  • claude-opus-5-5-max(委派的 Cursor 子 agent):编写初版 recipe、master config 条目、安装脚本、连接器改动、测试和 README。
  • gpt-5.6-sol(Cursor agent):将 recipe 切换为 11 月 16 日的 nightly wheel,运行 wheel 冒烟测试,并采用最新的 c48 设置。
  • grok-4.7(Cursor agent):处理了起草会话中的一轮对话,无法确认该轮是否涉及本 PR。
  • 所有改动均由作者审阅和指导。

改动类型:Bug 修复、新功能、配置变更、文档更新。

Accept TokenSpeed DSPARK speculation in the golden-AL connector. The spec
reads the draft model from speculative-draft-model-path and the draft
sampler from enable-speculative-sampling (probabilistic when true, else
greedy), and the verifier is speculative-rejection-sample-method when the
role sets it.

Synthetic throughput keeps the golden length and the greedy sampler, and
now also removes enable-speculative-sampling and
speculative-rejection-sample-method, which greedy sampling and a
synthetic length reject. Eval-only and fixed-sequence runs keep the
recipe's own DSPARK verification; MTP still selects flashinfer.

Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
…eed DCP

tokenspeed-wheels-rocm.sh installs pinned TokenSpeed, kernel, kernel-amd,
scheduler and engine wheels by URL with tokenspeed-smg at the master
router version. It upgrades only what the wheels need from PyPI, so the
runner image's ROCm torch stays, then checks torch is a ROCm build and
runs pip check. The binder writes ROUTER_VERSION for it.

Single-node binding now compares TokenSpeed's
decode-context-parallel-size with the matrix dcp-size, so DCP points
bind instead of failing as DCP 1.

Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
…Spark

Add kimik3.1-fp4-mi355x-tokenspeed-agentic-dspark: one TokenSpeed worker
on eight MI355X GPUs with attention and MoE TP8 and EP1, the
Inferact/Kimi-K3.1-Pro-DSpark-preview draft, FP8 KV cache with the MXFP4
DSA indexer key cache and a Host L2 KV store at kvstore-ratio 8, at
concurrency 1, 4, 8, 16, 24, 32 and 48. Concurrency 8 and above use KV
parallel 8 with DCP8; each point has its own running-request cap, decode
graph sizes, DSpark draft count and prefill/decode scheduling.

SMG gets the gateway settings ts serve applies. The recipe pins the
runner image, tokenspeed-smg 1.15.0.post20261110, and the checkpoint and
draft revisions. The TokenSpeed wheel URLs and versions and the gateway
tokenizer path are TODO placeholders.

Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
SMG, TokenSpeed's gateway, refuses any top_p but the one a model pins
(Kimi K3 pins 0.95), so every GSM8K request with top_p=1 came back as
HTTP 400. Temperature 0 decodes greedily without reading top_p, so
TokenSpeed's requests now leave it unset; other frameworks still send
top_p=1.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
Signed-off-by: Yu-Zhewen <zhewenyu@amd.com>
…iles

The CI nodes' local Hugging Face cache holds the K3.1 weights but not
every file of the revision (README.md, LICENSE, .gitattributes, ...).
Under HF_HUB_OFFLINE=1, huggingface_hub rejects that snapshot as
incomplete when TokenSpeed reads the model config, so the server never
starts. With Hub access the missing files are fetched, as the SGLang
K3.1 MI355X recipe already does; TokenSpeed retries Hub rate limits.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
lm-eval always runs at temperature 0, which decodes greedily, so
top_p=1 has no effect. TokenSpeed's gateway (SMG) answers any top_p
other than the value the Kimi K3 contract fixes (0.95) with HTTP 400,
which failed TokenSpeed's GSM8K eval. Omitting top_p for every
framework replaces the TokenSpeed-only special case.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Main renamed the Kimi K3.1 DSpark golden curve after the released
draft (#5102), so the TokenSpeed golden-acceptance test now writes its
curve under that name. perf-changelog.yaml keeps main's entries and
appends this PR's entry, now linked to #5101.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
…al to 24

In same-node one-hour AgentX runs on MI355X, keeping at least 24 decode
rounds after each prefill chunk instead of 16 traded 1.3% throughput
for 7.6% interactivity at concurrency 24, and 1.9% for 7.9% at
concurrency 32.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Serve Inferact/Kimi-K3.1-Pro-DSpark at e4e6e626, the draft the committed
golden curve was measured with, instead of the preview. It is a GQA
stack, so it runs on TokenSpeed's MHA drafter backend. Concurrency 4 and
8 move to 7 drafts and 24 to 48 to 5.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
The November 18 nightly is the first to serve the released DSpark draft.
Its TokenSpeed pins tokenspeed-smg 1.16.0.post20261117, and its engine
0.1.1 pairs with tokenspeed-scheduler 0.1.58.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
At concurrency 1 and 4 the GPU KV pool already holds the agent
sessions' prefixes, so the Host L2 KV store served almost no hits,
while pinning it delayed startup past the distributed timeout on one
CPU socket's ranks. Both points now pass --disable-kvstore and run
with kv-offloading none, like the vLLM and SGLang K3.1 recipes.

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Registering pageable memory pins the Host L2 page by page, after
reclaiming the page cache that holds the checkpoint; at kvstore-ratio 8
it outlasted the distributed startup timeout on one CPU socket's ranks.
HSA_USERPTR_FOR_PAGED_MEM=0 makes hipHostMalloc take the Host L2 from
the amdgpu GTT pool instead, as the SGLang K3.1 recipe does. The GTT
pool is about half the node's memory, too small for ratio 8, so
concurrency 8 to 48 pin a fixed 128 GB per GPU (kvstore-size), about
what ratio 4 gave, which held concurrency 32 throughput.

Move to the November 19 nightly. Its TokenSpeed pins tokenspeed-smg
1.16.0.post20261118, and its gfx950 kernels run each MoE layer's
post-attention work as one launch in single-request decode
(lightseekorg/tokenspeed#3613).

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
…ed-mi355x-dspark

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
Signed-off-by: Zhewen Yu <zhewenyu@amd.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 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

inferencex-e2e/infx diff: +157 -21

Generally most InferenceX submissions don't need to add changes to the infx package. On the off chance they do, generally the diff is small. Please prompt your agent to clean your PR to keep your diff to only necessary & minimal changes too. We have an increased code quality bar for changes to the infx package.

中文

大多数 InferenceX 提交通常不需要修改 infx 包。即使确实需要,改动通常也很小。请让你的 agent 清理 PR,使改动只包含必要且最小的内容。infx 包的改动有更高的代码质量要求。

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

Additional findings (outside the current diff — GitHub can't attach inline comments there):

  • 🔴 inferencex-e2e/infx/srt_slurm/spec_identity.py — Running the documented matrix audit now fails with a ValueError once it reaches the new TokenSpeed DSPARK rows. spec_arguments only keeps args whose names start with a SPEC_ARGUMENTS prefix (spec_identity.py:33-36), so it drops enable-speculative-sampling. spec_parameters now reads that flag, so the audit sees greedy drafting and finds no curve. Fix: keep every argument that spec_parameters and verifier read in the snapshot args, e.g. add enable-speculative-sampling to SPEC_ARGUMENTS. [also at: inferencex-e2e/infx/srt_slurm/synthetic_acceptance.py:75 - The documented spec-identity audit of the sweep matrix (spec_identity snapshot) will crash on the new TokenSpeed DSPARK config, so it audits no config at all.]

    Why this was flagged

    The README (golden_al_distribution/README.md:226-227) documents python -m infx.srt_slurm.spec_identity snapshot matrix.json --root . over a full-sweep matrix that includes amd-master.yaml. The new row kimik3.1-fp4-mi355x-tokenspeed-agentic-dspark is agentic-coding with spec-decoding: mtp, so snapshot (spec_identity.py:194-216) passes it to spec_arguments. That filter drops enable-speculative-sampling: true from agentic.yaml. audit then calls spec_parameters (synthetic_acceptance.py:70-75), which reports draft_sample_method: greedy. curve_name -> select_curve matches no kimik3.1 dspark curve, because the only one selects draft_sample: probabilistic, and raises "No kimik3.1 dspark golden curve for draft model 'Inferact/Kimi-K3.1-Pro-DSpark', draft sampling 'greedy' and verify 'block'". snapshot does not catch the error, so the whole audit aborts. On the base branch TokenSpeed never read this flag, so the snapshot completes.

    Verification: This is triggered when the documented audit (golden_al_distribution/README.md:226-227) runs on a matrix that includes amd-master.yaml. spec_arguments (spec_identity.py:187-191) keeps only keys where k.startswith(SPEC_ARGUMENTS) (lines 33-36), so it drops enable-speculative-sampling. select_curve then raises at identity.py:255. snapshot/main do not catch this, so the whole audit aborts.

Comment thread inferencex-e2e/perf-changelog.yaml Resolved
@Yu-Zhewen Yu-Zhewen added the full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) label Nov 19, 2026
@Yu-Zhewen Yu-Zhewen added non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim) and removed full-sweep-fail-fast Full sweep with canary gate; first failure cancels the rest of that matrix (recommended) labels Nov 19, 2026
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
@Oseltamivir

Copy link
Copy Markdown
Collaborator

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

Ignore missing checklist, review

@github-actions

Copy link
Copy Markdown
Contributor

❌❌❌ REJECTED ❌❌❌

@Oseltamivir the sign-off is not valid: it has no review checklist, and you are not a CODEOWNER of inferencex-e2e/configs/amd-master.yaml. The technical evidence otherwise holds up: the sweep and evals are green on the pinned SHA.

❌ Check 0 (CODEOWNER): FAIL — The signer is not a CODEOWNER of a specific changed path. inferencex-e2e/configs/amd-master.yaml is owned only by @billishyahao @chunfangamd @seungrokj @1am9trash @zijiecode. That line does not include @SemiAnalysisAI/core, and the signer's own CODEOWNERS entry (collectivex/) does not cover it. Repository admin permission does not make someone a CODEOWNER. One of the listed AMD owners must sign off.

❌ Check 5 (Latest checklist): FAIL — The sign-off is not the checklist. Its whole body is "As a PR reviewer and CODEOWNER, I have reviewed this and have / Ignore missing checklist, review". None of the 20 items in the current template is present or checked, and it has no additional detail section or Signed: line.

⚠️ Check 4 (Reuse command): WARN — No authorized reuse command has been posted on this PR. Before merging, an authorized maintainer must comment /use 44563025886 on its own line. That is the passing sweep from Check 1. This PR appends a perf-changelog.yaml entry, so merging without the command makes the merge-ingest.yml "Require sweep reuse" step fail and the results never publish.

⚠️ Check 15 (PR description): WARN — The PR body has two claims that do not match the pinned code. (1) The body says "tokenspeed-smg 1.16.0.post20261117", but the master config pins router: { name: smg, version: 1.16.0.post20261118 }, and so do the README and the changelog. (2) The body says "a Host L2 KV store at kvstore-ratio: 8", but agentic.yaml sets kvstore-size: 128 (GB per GPU) and has no kvstore-ratio. Ask the author to correct the body.

Passed and not applicable checks

✅ Check 1 (Sweep on in-PR commit): PASS — The pinned head 6c06923 has executed, green results for all 7 agentic / points and the agentic eval / c48 point in run 44563025886 (head_sha 6c06923, attempt 1). No commits come after it.

✅ Check 2 (Evals): PASS — GSM8K em_strict is 0.9810 ± 0.0038 (n=1319) at the c48 TP8/DCP8 point, on the pinned runner image. The closest ingested cohort (kimik3.1 fp4 B300 dynamo-vllm, run 44024134778) scores 0.9788; the gap is -0.0023 against a threshold of 0.0109, so the eval is not weaker. The eval server log shows the changed real-verification path running (--sampling-backend triton --enable-speculative-sampling --speculative-rejection-sample-method block, no synthetic length). Its report-only AL gate measured 3.76 against the golden 3.81.

➖ Check 3 (Upstream recipe): N/A — The only affected config is framework: tokenspeed, served behind SMG. No vLLM or SGLang production serving configuration is affected.

✅ Check 6 (Upstream images / ordering / provenance): PASS — (a) This is not a vLLM/SGLang entry. (b) A TokenSpeed entry lands after the existing open-source kimik3.1-fp4-mi355x-sglang-agentic-dflash-disagg entry for the same model and SKU. (c) The pinned 20261119 wheels are official LightSeek releases built from lightseekorg/tokenspeed@8080ba1, which is an ancestor of main (main is 63 commits ahead, 0 behind).

✅ Check 7 (Deprecated models): PASS — kimik3.1 (added 2026-11-04) has agentic coding active in MODELS.md, and no deprecation applies on 2026-11-20.

✅ Check 8 (Architecture hacks / integer all-reduce): PASS — There are no architecture overrides or accuracy-trading levers beyond the eval-covered FP8 KV cache and MXFP4 indexer key cache, both allowed by the K3.1 week-1 policy. Kimi K3.1 is not grandfathered, so the integer all-reduce rule applies. TokenSpeed@8080ba1 has no quick-reduce or integer all-reduce path: its Iris ROCm all-reduce reduces in FP32 into BF16. The recipe sets no *QUICK_REDUCE_QUANTIZATION control. The SGLang-ROCm explicit NONE requirement does not apply to TokenSpeed.

✅ Check 9 (Spec-decode chat template): PASS — AgentX trace replay drives SMG's chat-completions endpoint, and lm-eval uses --apply_chat_template.

✅ Check 10 (Engine patches): PASS — Nothing patches the engine. tokenspeed-nightly-rocm.sh installs only the official LightSeek release wheels, pinned by URL and SHA256, plus pinned PyPI packages. This follows the same pattern as the existing TokenSpeed recipes, and the script does not edit or overlay any source.

✅ Check 11 (Golden AL): PASS — The c1 run (7 drafts) set synthetic-acceptance-length=4.16 and the c48 run (5 drafts) set 3.81, with sampling-backend=greedy. Both match kimi-k3.1-pro__dspark__kimi-k3.1-pro-dspark__probabilistic-block.yaml (thinking_on: 7 → 4.16, 5 → 3.81). The recipe's own verifier (probabilistic draft, block verification) matches that curve.

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

✅ Check 13 (Draft precision): PASS — The draft is Inferact/Kimi-K3.1-Pro-DSpark at e4e6e626, and its config is dtype: bfloat16 with no quantization_config. The served command has no draft quantization or dtype flag. The FP8 KV cache applies to target and draft alike. SGLANG_NVFP4_CKPT_FP8_NEXTN_MOE is not set, and its engine is not SGLang. The real-verification AL (3.76 against 3.81) is consistent with the draft running as shipped.

✅ Check 14 (Pareto coverage): PASS — For the curve kimik3.1 / agentic-coding / mi355x_tokenspeed / fp4 / P90 E2EL in run 44563025886 (results_bmk, SHA 6c06923), 7 points were measured and 5 are on the frontier (c8, c16, c24, c32, c48), per the pareto_coverage helper.

➖ Check 16 (NVIDIA overview): N/A — The only affected hardware is AMD MI355X.

➖ Check 17 (Metrics publication): N/A — There are no Dynamo TRT-LLM workers. TokenSpeed runs with --enable-metrics.

✅ Check 18 (Recipe consistency): PASS — CONFIG_FILE and overrides resolve, with no generation errors. Master TP8/EP1, dcp-size and concurrencies match the recipe's attn-tp-size, decode-context-parallel-size and CONC values. The digest-pinned image resolves. The wheels are pinned by SHA256, and srt-slurm is pinned at 2d9079c. No points are removed and no regressions are reported. The TokenSpeed stream_interval defaults to 1, which is at most 60.

Assessed commit: 6c0692374e2fe7ed7042b67303ab85bbcbf85642.

@Oseltamivir

Copy link
Copy Markdown
Collaborator

/use 44563025886

@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

@Oseltamivir staged run 44563025886.

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

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Signed-off-by: Zhewen Yu <zhewenyu@amd.com>

# Conflicts:
#	inferencex-e2e/perf-changelog.yaml
@Yu-Zhewen
Yu-Zhewen force-pushed the zhewenyu/k31-tokenspeed-mi355x-dspark branch from 3834e3e to 8db0dcc Compare November 20, 2026 12:23
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

@Oseltamivir staged run 44563025886.

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

@Oseltamivir
Oseltamivir merged commit 1e97952 into main Nov 20, 2026
30 checks passed
@Oseltamivir
Oseltamivir deleted the zhewenyu/k31-tokenspeed-mi355x-dspark branch November 20, 2026 12:42
@github-actions

Copy link
Copy Markdown
Contributor

Ingest report — ✅ Results ingested into the production database.

Ingest workflow · Merge Ingest run · Benchmark source run

Category new duplicate skipped unmapped failed
benchmark 7 0 7 0 0
eval 1 1 1 0 0
trace 7 0 0 0 0
power 7 0 0 0 0

benchmarkFiles 8, rawBenchmarkRows 14, coveredByPerJobFiles 7, purgedPoints 0, failedRunRows 0, runStatsNew 0, runStatsDuplicate 0, evalSamplesNew 1319, gpuMetricSamplesNew 269448, powerPublicationPoints 7, changelogEntriesWritten 1

Counts cover only this run. Rows: benchmark_results, eval_results, agentic rows linked to a trace, gpu_metrics series. This comment updates if the ingest is rerun.

中文

Ingest 报告 — ✅ 结果已写入 production 数据库。

上表仅统计本次运行写入的数据,各行单位依次为 benchmark_results 行、eval_results 行、已关联 trace 的 agentic 行和 gpu_metrics 序列。重新运行 ingest 时本评论会原地更新。

fanyang-real added a commit that referenced this pull request Nov 21, 2026
…0-agentx

Main's #5144 added TokenSpeed DSPARK support to the golden-AL connector, so
take main's connector, tests and golden-AL READMEs; this branch no longer
changes inferencex-e2e/infx. perf-changelog.yaml is resolved with
prepare_perf_changelog_merge: main's entries plus this PR's entry.
antiagainst pushed a commit to lightseekorg/tokenspeed that referenced this pull request Nov 24, 2026
…ls on gfx950 (#3755)

## Summary

Kimi-K3.1 decode at concurrency 1 on gfx950 now runs fewer and faster
small kernels per step, which puts TokenSpeed ahead of vLLM at c1 on
InferenceX AgentX. Everything except the top-k select and the absorb
noted below writes bit for bit what the launches it replaces wrote.

- **DSA decode front.** One launch,
`_index_k_write_pack_query_mla_kernel`, now does what three did after
the norm GEMV: the index-K LayerNorm, mxfp4 write and index-query pack;
the NoPE prologue (q_pe into the query, the latent into the FP8 KV
cache); and, for up to 64 rows, the W_UK query absorb. GLM5's DSA
attention gets a NoPE-aware prologue for it; the earlier rope merge
never ran for K3.1 because it has no `rotary_emb`. The absorb is one
in-order MFMA chain over K, so it matches K3.1's TP8 `bmm` bit for bit
on finite query rows.
- **DSA index scorer.** A leaner decode-only path for mxfp4 index keys,
and long spans split into equal runs of tiles across programs instead of
whole chunks. Scores are unchanged.
- **DSA top-k select.** The multi-CTA select's last CTA no longer spends
most of its time in the compact gather, returning atomics and
re-streaming the threshold bucket. The output order, data and coherence
protocol are production's.
- **DSA split reduce folded into W_UV.** A new op,
`dsa_decode_projected_value`, merges the 32 key splits and runs the W_UV
GEMM with its gate in one launch, for 12 heads and 1 to 31 rows without
KVP or DCP. Attention backends advertise it through
`projects_decode_values`.
- **KDA output norm in the MoE tail.** The fused tail applies the KDA
gated RMSNorm while staging o_proj's input, so `_rmsnorm_gated_kernel`
no longer launches ahead of it. The tail's loads and stores are also
reordered so it no longer waits on load order.
- **GEMV.** The gfx950 GEMV's masked loads drop `other`, whose select
waited on every load ahead of it.

Shapes and platforms outside these conditions keep the current path.

## Results

InferenceX AgentX at concurrency 1 on 8x MI355X, 3600 s, same recipe as
[InferenceX#5144](SemiAnalysisAI/InferenceX#5144),
one run per build:

| c1 | Throughput per GPU | Interactivity p90 | TTFT p90 |
|---|---:|---:|---:|
| main | 2,458 tokens per second | 301.9 | 1.74 s |
| This PR | 2,647 tokens per second | 334.3 | 1.53 s |
| vLLM | 2,539 tokens per second | 328.9 | |

Against main: throughput per GPU +7.7%, interactivity +10.7%.

## Test Plan

On gfx950:

- [x] `test_gluon_dsv41_index_topk.py`: the merged front launch against
the separate launches, with and without the absorb, and the multi-CTA
top-k selecting exactly `torch.topk`'s set for eight verify rows of one
long request.
- [x] `test_gluon_dsa_amd.py`: `dsa_decode_projected_value` against
`dsa_decode` then `mla_project_value`, gated and ungated, across its
block shapes.
- [x] `test_kimi_k3_moe_tail_gfx950.py`: the tail with the KDA output
norm against the norm then the plain tail on every rank.
- [x] The 1-GPU CI tasks on MI350X in the runner image: import check,
`ut-tokenspeed-kernel`, the AMD ops and gfx950 kernel parts, and both
runtime parts.
- [x] The 2-GPU kernel and runtime tasks in CI.
- [x] The AgentX runs above.
- Not run on NVIDIA; these paths are gfx950 only.

---------

Signed-off-by: Zhewen Yu <zhewenyu@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

non-canary-full-sweep-enabled Run the full sweep without the canary gate (full search space, no trim)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants