Repository navigation
[AMD][MI35X] Kimi K3.1 Pro sglang dflash agentic: one image, P90 tuning and the 1P1D PD recipe / [AMD][MI35X] Kimi K3.1 Pro sglang dflash agentic:统一镜像、P90 调优与 1P1D PD 配置 - #4928
Conversation
…ncy for P90 interactivity Recipe only, same image. A prefill every 32 decode steps at concurrency 8 to 56, fewer running requests and 4 drafts in the middle of the range, a new concurrency 24 point, and 7 drafts at concurrency 1 and 4. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Thanks for the contribution!
中文感谢你的贡献!
|
There was a problem hiding this comment.
Beyond the inline finding, I checked three more things and none is a problem. The changelog's "instead of 16" is correct, because the recipe's base args set prefill-decode-interval: 16. The three env flags were already set in the c48 and c56 overrides, as the entry says. The new conc 24 in amd-master.yaml has a matching override_tp8_dcp8_c24 in the recipe.
Extended reasoning...
I read the base args of agentic.yaml and the c48 and c56 overrides to check the changelog's "from 16" and "already on at 48 and 56" claims, and both hold. I also confirmed that conc 24 in the master config has a matching recipe override.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
| max-running-requests: 8 | ||
| cuda-graph-max-bs-decode: 8 | ||
| # Prefill every 32 decode steps: fewer stalls in running requests' token streams. | ||
| prefill-decode-interval: 32 |
There was a problem hiding this comment.
Does e2el improve tho
There was a problem hiding this comment.
should be flat on most cc
The perf-changelog entry for #4928 moves after main's new entries. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… point, one running request at concurrency 1 The image moves to lmsysorg/sglang:dev-kimi-k31-pro-mi35x@sha256:5901db14: SGLang de0f491836 (the #48427 branch with sgl-project/sglang#49152 and the PD commits) on AITER ROCm/aiter#7620 (flydsl 0.4.2) and sgl-amd-mono 219f40be9a, the image the MI355X PD points use too. Concurrency 1 runs one request at a time, so an agent's parallel tool calls queue instead of sharing decode steps. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ipe at concurrency 128 and 144 kimik3.1-fp4-mi355x-sglang-agentic-dflash-disagg on the same image: one TP8 DCP8 prefill node and one TP8 DCP8 decode node, KV and the MXFP4 DSA index keys over Mooncake RDMA, five-token DFLASH on both roles. Concurrency 144 (decode cap 160) is the highest point that beat the one below it by more than 1% over 3600 s; concurrency 128 (cap 144) is the point below it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ode-local hub snapshot The mi355x-amds Kimi-K3.1-Pro entry pointed at /it-share/data/Kimi-K3.1-Pro, which does not exist, so the 1P1D job failed before launch. Point it at the node-local HF cache snapshot the single-node points already serve. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nnections and decode ranks in step The 1P1D c144 warmup reused router-to-prefill connections that had sat idle past the 900 s keep-alive, and the c128 GSM8K run hung after one decode rank dropped a request the other seven kept. Raise the keep-alive to 7200 s and have rank 0 broadcast the greedy DFLASH accept on both roles. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nic driver entry so PD moves KV over RDMA The image has no Ionic verbs provider, and libibverbs loads a provider only when /etc/libibverbs.d names it. With only libionic mounted, Mooncake found 0 HCAs on every rank and moved KV over TCP: the concurrency 128 PD point of run 42647381696 read 16,321 tok/s/GPU with a TTFT p50 of 18.2 s, while the prefill held 47-48 requests waiting on transfers and the decode 60-84. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@kevin-mii staged run 42695979942.
This run remains available across future |
# Conflicts: # inferencex-e2e/perf-changelog.yaml
…GLang (#121) ## Motivation On current SGLang, Kimi-K3 / K3.1 with `--enable-amd-monokernel` fails at startup: ``` File ".../sgl_amd_mono/kimi_k3/spec.py", line 220, in _model_disable_reasons from sglang.srt.utils.common import require_mlp_sync ImportError: cannot import name 'require_mlp_sync' from 'sglang.srt.utils.common' ``` sgl-project/sglang#48781 split `srt/utils/common.py` and moved `require_mlp_sync` to `sglang.srt.layers.dp_attention`. The change is on SGLang `main` and on `kimi-k3.1-day-0`, so `test/unit/test_contract.py` already fails for `kimi_k3/spec.py` against either: ``` SGLang no longer provides what sgl_amd_mono/kimi_k3/spec.py reads; repair it and its SGLANG_READS: srt/utils/common.py: require_mlp_sync ``` ## Modifications - **`kimi_k3/spec.py`**: import `require_mlp_sync` from `sglang.srt.layers.dp_attention`, and fall back to `sglang.srt.utils.common` on SGLang before #48781, as the package already does for #45389. - **`SGLANG_READS`**: lists `require_mlp_sync` under `srt/layers/dp_attention.py`. A name that moved between two files that both still exist can't be written as `"new.py|old.py"`, so the contract follows current SGLang; the runtime fallback keeps older SGLang working. ## Accuracy Tests Kimi-K3.1-Pro, TP8 with `--enable-amd-monokernel` on 8x MI355X (the c4 single-node recipe of SemiAnalysisAI/InferenceX#4928, its published image `lmsysorg/sglang@sha256:5901db14…`), real acceptance. SGLang is sgl-project/sglang#48427 with `kimi-k3.1-day-0` at 8b180ca9e0 merged in, mounted over the image's tree: | | `kimi_k3/spec.py` on `main` | with this PR | |---|---|---| | Startup | `ImportError` (above) | healthy | | API smoke: models, answer, stream, tools, long prefix, concurrency | — | 6/6 pass | | Planted-fact needles at 28.8k / 68.6k / 78.7k tokens | — | 3/3 | | GSM8K | — | 97.57% | ## Speed Tests and Profiling An import fix, no kernel or forward change. ## Checklist - [x] `pre-commit run --all-files` passes (ruff, ruff-format, isort on the changed file). - [x] Tests under `test/` cover the change: `test/unit/test_contract.py` fails without it on current SGLang (`srt/utils/common.py: require_mlp_sync`) and passes with it (all 14 `kimi_k3` / `kimi_k31` cases). - [x] The SGLang commit or PR this was tested against is named above. - [ ] Accuracy and speed results are attached when kernel or forward code changes. (No kernel or forward change; the accuracy run above covers the import.) - [ ] A new model adds one line to `.github/CODEOWNERS` that names its owner. (No new model.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
# Conflicts: # inferencex-e2e/perf-changelog.yaml
Keep main's Kimi-K3.1 vLLM changelog entry ahead of this PR's entry. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
/use 42910486568 |
|
@cquil11 staged run 42910486568. This run remains available across future |
# Conflicts: # inferencex-e2e/perf-changelog.yaml
|
Ingest report — ✅ Results ingested into the Ingest workflow · Merge Ingest run · Benchmark source run
benchmarkFiles 10, rawBenchmarkRows 10, coveredByPerJobFiles 0, purgedPoints 0, failedRunRows 0, runStatsNew 0, runStatsDuplicate 0, evalSamplesNew 5276, gpuMetricSamplesNew 332312, powerPublicationPoints 10, 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 报告 — ✅ 结果已写入 上表仅统计本次运行写入的数据,各行单位依次为 benchmark_results 行、eval_results 行、已关联 trace 的 agentic 行和 gpu_metrics 序列。重新运行 ingest 时本评论会原地更新。 |
Upstream moved init_dcp_push_combine out of the fi_a2a workspace setup, which ROCm never reached, into its own pre-capture step gated on dcp_comm_backend "a2a", and #47964 lets CustomAllReduceV2 build on ROCm. Both landed on kimi-k3.1-day-0, so a Kimi-K3.1 TP8 DCP8 server on MI355X now builds the push plane (HIP VMM buffers exchanged over POSIX fds) and routes decode and target verify through dcp_push_combine_reduce, a kernel only run over NVLink. On an MI355X node that exchange took 8 min instead of 3 s, prefill graph capture then sat with every KFD process evicted for 85 min, and after teardown RCCL stayed degraded (8-GPU init 39.5 s, 4 MB all-reduce 1887 ms vs 0.05 ms). The image published for SemiAnalysisAI/InferenceX#4928 never builds the plane. Return before it on ROCm, as dispatch_custom_allreduce keeps CustomAllReduceV2 opt-in there. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…single-node key - Rename minimaxm31flash-fp4-mi355x-vllm-disagg-agentic-dspark to minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg and serve it as framework vllm (disagg true), following the #4928 single-node/-disagg key pair. - The changelog block now lists both minimaxm31flash-fp4-mi355x-vllm-agentic-dspark (from #5035, rerun unchanged) and the -disagg key, so both topologies are measured in one sweep. - Rename the PD recipe base name to minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg-mooncake. - 将 minimaxm31flash-fp4-mi355x-vllm-disagg-agentic-dspark 重命名为 minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg,并以 framework vllm(disagg true)运行,沿用 #4928 的单节点 / -disagg 成对 key 方式。 - changelog 条目同时列出 minimaxm31flash-fp4-mi355x-vllm-agentic-dspark(来自 #5035,原样重跑)和 -disagg key,使两种拓扑在同一次 sweep 中测量。 - 将 PD recipe 的 base name 改为 minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg-mooncake。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…oncake / [AMD] MiniMax-M3.1-Flash MI355X vLLM:基于 Mooncake 的 PD 分离 AgentX (#5090) * feat(minimaxm31flash): add MI355X vLLM PD-disaggregated Mooncake AgentX Signed-off-by: whx-sjtu <[email protected]> Co-authored-by: Cursor <[email protected]> * fix(minimaxm31flash): read the shared HF cache on MI355X Mooncake PD engines Set HF_HOME and HF_HUB_CACHE in the prefill and decode env so the engines and srtctl's pre-download resolve the shared hub cache, drop the header comments AGENTS.md forbids, and fill in the changelog pr-link. Co-authored-by: Cursor <[email protected]> Signed-off-by: whx-sjtu <[email protected]> * fix(srt-slurm): sync Mooncake backport with upstream review fixes * chore(srt-slurm): use merged Mooncake support and drop backport * fix(minimaxm31flash): classify Mooncake PD as vllm-disagg [skip ci] [skip-sweep] * fix(srt): raise vLLM worker memlock to the hard limit [skip ci] [skip-sweep] * chore(srt): remove memlock diagnostic output [skip ci] [skip-sweep] * ci(minimaxm31flash): run full Mooncake PD validation * docs(changelog): align the MiniMax-M3.1-Flash MI355X vLLM PD AgentX entry with the diff - Add MiniMax-M3.1-Flash PD-disaggregated AgentX on MI355X under vllm-disagg, on the single-node lane's image vllm/vllm-openai-rocm:minimax-m31-flash-75bc8cf1: one TP4 prefill and two TP4 decode vLLM engines move KV over MooncakeConnector (RDMA) behind vllm-router 0.1.16 with consistent-hash routing, at concurrency 40, 48, 56, 64, 72 and 80 (DRAM utilization 0.9 at c40-c64, 1.0 at c72-c80). - Both roles keep the single-node serving args: NVFP4 KV and indexer caches, DSpark with 7 speculative tokens, AITER MoE, block size 128 and 1M context. - Prefill admits 2x CONC with DBO at 32768 batched tokens and holds a SimpleCPUOffloadConnector host KV tier of 1349 GB (1499 GB at c72 and c80); at c80 it schedules at most 4096 tokens of a prompt per step at 0.75 GPU memory utilization. - Each decode engine runs without DBO at 8192 batched tokens, with max-num-seqs 5, 6, 7, 8, 10 and 10 from c40 to c80 and CUDA graphs captured in multiples of 8 up to 8x that batch. - Both roles set NCCL_DMABUF_ENABLE=0, VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=1200, a 3600 s HTTP keep-alive (900 s on single node) and the Mooncake RDMA env (GID index, traffic class, one concurrent MR registration, 600 s connector timeout; 1 GiB max MR size on prefill, 256 MiB on decode). - Bump utils/srt-slurm from 2d9079c to cc9db05 (21 commits), which adds NVIDIA/srt-slurm#669: one bootstrap port per prefill engine and Router start after every worker's health check. The shared vllm-router.sh setup script now raises the worker parent shell's soft RLIMIT_MEMLOCK to its hard limit. - Draft data type unchanged: the DSpark draft from the checkpoint's dspark/ subfolder runs as shipped, with MXFP8 attention and MLP projections, BF16 fc, norms and the shared target embedding and LM head, and an FP8 E4M3 draft KV cache. - 在 MI355X 上以 vllm-disagg 新增 MiniMax-M3.1-Flash PD 分离 AgentX,沿用单机 lane 的镜像 vllm/vllm-openai-rocm:minimax-m31-flash-75bc8cf1:1 个 TP4 prefill 和 2 个 TP4 decode vLLM 引擎通过 MooncakeConnector(RDMA)传输 KV,前端为采用一致性哈希路由的 vllm-router 0.1.16,并发为 40、48、56、64、72 和 80(c40-c64 的 DRAM 利用率为 0.9,c72-c80 为 1.0)。 - 两个角色都沿用单机的服务参数:NVFP4 KV 和 indexer cache、7 个推测 token 的 DSpark、AITER MoE、block size 128 和 1M 上下文。 - Prefill 准入 2x CONC,开 DBO,batched tokens 为 32768,并带 1349 GB 的 SimpleCPUOffloadConnector 主机 KV 层(c72 和 c80 为 1499 GB);c80 时每步最多调度一个 prompt 的 4096 个 token,GPU 显存利用率为 0.75。 - 每个 decode 引擎不开 DBO,batched tokens 为 8192,c40 到 c80 的 max-num-seqs 依次为 5、6、7、8、10 和 10,CUDA graph 按 8 的倍数捕获到该 batch 的 8 倍。 - 两个角色都设置 NCCL_DMABUF_ENABLE=0、VLLM_EXECUTE_MODEL_TIMEOUT_SECONDS=1200、3600 s HTTP keep-alive(单机为 900 s)以及 Mooncake RDMA 环境变量(GID index、traffic class、一个并发 MR 注册、600 s connector 超时;最大 MR 大小 prefill 为 1 GiB,decode 为 256 MiB)。 - 将 utils/srt-slurm 从 2d9079c 升级到 cc9db05(21 个提交),其中包含 NVIDIA/srt-slurm#669:每个 prefill 引擎一个 bootstrap 端口,并在所有 worker 健康检查通过后启动 Router。共享的 vllm-router.sh setup 脚本现在会把 worker 父 shell 的 RLIMIT_MEMLOCK 软限制提升到硬限制。 - 草稿模型数据类型不变:checkpoint dspark/ 子目录中的 DSpark 草稿模型按发布精度运行,attention 和 MLP 投影为 MXFP8,fc、norm 以及与目标模型共享的 embedding 和 LM head 为 BF16,草稿 KV cache 为 FP8 E4M3。 Co-Authored-By: Claude Opus 5.5 <[email protected]> * config(amd): pair the MiniMax-M3.1-Flash MI355X vLLM PD key with the single-node key - Rename minimaxm31flash-fp4-mi355x-vllm-disagg-agentic-dspark to minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg and serve it as framework vllm (disagg true), following the #4928 single-node/-disagg key pair. - The changelog block now lists both minimaxm31flash-fp4-mi355x-vllm-agentic-dspark (from #5035, rerun unchanged) and the -disagg key, so both topologies are measured in one sweep. - Rename the PD recipe base name to minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg-mooncake. - 将 minimaxm31flash-fp4-mi355x-vllm-disagg-agentic-dspark 重命名为 minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg,并以 framework vllm(disagg true)运行,沿用 #4928 的单节点 / -disagg 成对 key 方式。 - changelog 条目同时列出 minimaxm31flash-fp4-mi355x-vllm-agentic-dspark(来自 #5035,原样重跑)和 -disagg key,使两种拓扑在同一次 sweep 中测量。 - 将 PD recipe 的 base name 改为 minimaxm31flash-fp4-mi355x-vllm-agentic-dspark-disagg-mooncake。 Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Signed-off-by: whx-sjtu <[email protected]> Co-authored-by: Cursor <[email protected]> Co-authored-by: seungrokj <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]> Co-authored-by: seungrokj <[email protected]> Co-authored-by: Alec Ibarra <[email protected]> Co-authored-by: Perplexity <[email protected]>
Summary
This PR moves the Kimi K3.1 Pro SGLang MI355X AgentX configs to one image for every point, retunes the single-node points for P90 interactivity, and adds the 1P1D PD recipe.
Image, both keys:
lmsysorg/sglang:dev-kimi-k31-pro-mi35x@sha256:5901db14(wassha256:346a6d83).Single node (
kimik3.1-fp4-mi355x-sglang-agentic-dflash):prefill-decode-intervalgoes from 16 to 32 (from 8 at 48 and 56). Prefills interrupt running requests' token streams half as often, which raised P90 interactivity at every DCP point with the same throughput. TTFT rises (p50 2–4 s).SGLANG_ENABLE_ROCM_K3_ROW_SHARDED_ROUTED_FRONT,SGLANG_ENABLE_ROCM_K3_ROW_SHARDED_STREAMandSGLANG_OPT_DFLASH_RING_LOCS_FUSED, which were already on at 48 and 56.PD, new (
kimik3.1-fp4-mi355x-sglang-agentic-dflash-disagg):These points were measured over 3600 s on two MI355X nodes at golden acceptance 3.25 (5 draft tokens). Concurrency 144 is the highest concurrency that beat the one below it by more than 1%. GSM8K was 97.88% at native acceptance with the same configuration.
Accuracy on this stack: we checked a local build with the same SGLang, AITER and sgl-amd-mono commits (not the published digest itself):
Risks:
ENABLE_MORI=1, so it has no ibverbs provider for the MI355X nodes' AMD Pollara (ionic) or Broadcom NICs. Mooncake finds 0 HCAs and falls back to TCP. Under AgentX load at concurrency 144, each KV transfer then took 50–120 s instead of about 1 s, and the prefill aborted during warmup. The PD key needs the same commits rebuilt with--build-arg ENABLE_MORI=1, and moves to that image in a follow-up commit. The PD throughput numbers above ran the same SGLang commits on the previous image's AITER (285579b), which had the providers.Kimi-K3.1-Prounderit-share-dataon mi355x-amds.AI model disclosure: claude-opus-5-5 (Claude Code), working under Kevin Mi's direction, did the following:
PR checklist and change type
Type of Change
Checklist
python -m infx.matrix.changed --base origin/mainlists affected config keys, I have appended one new entry covering them to the physical end ofinferencex-e2e/perf-changelog.yaml; if it lists none, I have added none. I have not edited historical entriesinferencex-e2e/perf-changelog.yamlentry, it carries exactly one primary sweep label (a maintainer applies it on fork PRs):full-sweep-fail-fast(recommended),full-sweep-enabled, ornon-canary-full-sweep-enabled. Optional modifiersall-evals,evals-only, andagentx-fastrequire a primary label; the last two block reuse while applied.OWNER/MEMBER/COLLABORATOR) 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 将 Kimi K3.1 Pro SGLang MI355X AgentX 配置统一到同一个镜像,按 P90 交互性重新调优单节点配置点,并新增 1P1D PD 配置。
镜像(两个配置键):
lmsysorg/sglang:dev-kimi-k31-pro-mi35x@sha256:5901db14(原为sha256:346a6d83)。单节点(
kimik3.1-fp4-mi355x-sglang-agentic-dflash):prefill-decode-interval由 16 改为 32(并发 48、56 由 8 改为 32),预填充打断运行中请求 token 流的频率减半。在吞吐量不变的情况下,每个 DCP 点的 P90 交互性均有提升;TTFT 上升(p50 2–4 s)。SGLANG_ENABLE_ROCM_K3_ROW_SHARDED_ROUTED_FRONT、SGLANG_ENABLE_ROCM_K3_ROW_SHARDED_STREAM和SGLANG_OPT_DFLASH_RING_LOCS_FUSED(原先仅在 48、56 开启)。PD(新增)(
kimik3.1-fp4-mi355x-sglang-agentic-dflash-disagg):以上为两台 MI355X 节点上 3600 s 的结果,golden 接受长度 3.25(5 个草稿 token)。并发 144 是吞吐量比下一档高出 1% 以上的最高并发。同一配置在真实接受长度下 GSM8K 为 97.88%。
该软件栈上的精度: 测试使用相同 SGLang、AITER、sgl-amd-mono 提交的本地构建(并非已发布的镜像本身):
风险:
ENABLE_MORI=1,因此缺少 MI355X 节点 AMD Pollara(ionic)和 Broadcom 网卡的 ibverbs provider。Mooncake 找不到任何 HCA,回退到 TCP。在并发 144 的 AgentX 负载下,每次 KV 传输耗时 50–120 s(正常约 1 s),预填充在预热阶段中止。PD 配置键需要使用相同提交并加上--build-arg ENABLE_MORI=1重新构建的镜像,并将在后续提交中切换到该镜像。上述 PD 吞吐结果使用相同的 SGLang 提交,但 AITER 为上一版镜像的 285579b,该镜像包含这些 provider。it-share-data下的Kimi-K3.1-Pro。AI 模型使用说明:claude-opus-5-5(Claude Code)在 Kevin Mi 的指导下完成了以下工作: