Skip to content

feat(agentx): run the MiniMax-M3 MI300X LMCache point on the lmcache-server service - #3545

Open
cquil11 wants to merge 6 commits into
mainfrom
agentx/minimaxm3-mi300x-lmcache-server
Open

cquil11 wants to merge 6 commits into
mainfrom
agentx/minimaxm3-mi300x-lmcache-server

Conversation

@cquil11

@cquil11 cquil11 commented Sep 28, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

The MI300X MiniMax-M3 AgentX LMCache point (minimaxm3-fp8-mi300x-vllm-agentic-mtp, variant override_tp8_c16_lmcache of benchmarks/single_node/srt-slurm-recipes/minimaxm3/vllm/mi300x-fp8-mtp/agentic.yaml) now uses srt-slurm's native lmcache-server service instead of LMCache servers that lmcache-mp-rocm.sh started inside the worker container.

  • The variant declares a services: entry of type: lmcache-server. srtctl runs lmcache server on the worker node on ports 8750 (RPC) and 8751 (HTTP) before vLLM starts, marks it critical, and waits for GET /healthcheck. The LMCache flags are unchanged: --l1-init-size-gb 10 --l1-read-ttl-seconds 7200 --chunk-size 256 --max-workers 2 --eviction-policy LRU --supported-transfer-mode lmcache_driven.
  • The agg role names its connector: connector is the lmcache-mp preset JSON (LMCacheMPConnector at tcp://localhost:8750) plus the measured lmcache.mp.mq_timeout: 6000. The preset alone would fall back to LMCache's 300 s timeout.
  • lmcache-mp-rocm.sh now only installs the ROCm LMCache 0.5.3 wheel (plus cupy-rocm and the Prometheus exporter). It runs twice: as the LMCache variant's setup_script in the worker container, because the connector is imported inside vLLM, and as the service's preamble, because the service runs in its own step of the job container. setup_script moved from the base recipe to the LMCache variant, so the GPU-resident points no longer run it (it was a no-op for them).
  • The service readiness keeps the kind's default probe (http://<node>:8751/healthcheck) with a 900 s timeout instead of 300 s, since the preamble's pip install counts against it. The old script waited up to 600 s after installing.
  • Adds the srt-slurm patch runners/srt-slurm/patches/507-lmcache-server-atom-sglang.patch and its README entry, byte-identical to feat(agentx): port the MI355X DSV4 ATOM disagg LMCache config to srt-slurm #3543 (feat: add LMCache support for ATOM and SGLang srt-slurm#32, which includes feat(services): lmcache-server kind and lmcache-mp connector NVIDIA/srt-slurm#507).
  • perf-changelog entry for the config.

The other variants are unchanged.

Why

The DRAM point should use the same LMCache server path srt-slurm now supports natively, rather than a setup script that daemonizes servers inside the vLLM step and polls them itself.

Behavior changes

  • Sharding. The point used to run 8 LMCache servers of 162 GB L1 each, one per TP rank, listed in lmcache.mp.server_urls. It now runs one server per node with the same total L1, 1296 GB, shared by all 8 ranks. The service gives each node one instance on fixed ports; reproducing 8 shards would take 8 service entries, each overriding ports and readiness and each repeating the install, so I kept the recipe simple instead. The single server still uses --max-workers 2, now for 8 ranks instead of 1. Expect the measured numbers to move.
  • srt-slurm fix for aggregate connectors. With frontend.type: vllm, srtctl used to drop a role's connector for a direct aggregate worker. SemiAnalysisAI/srt-slurm#32 commit 181b2e4 now runs the connector an aggregate role names (the engine-wide default stays prefill/decode only), and the regenerated 507-lmcache-server-atom-sglang.patch includes it.

Local verification

  • The patch and README are byte-identical to origin/agentx/srt-atom-disagg-lmcache.
  • The changed YAML parses strictly with ruamel (duplicate keys rejected); bash -n passes on the script.
  • Through the patched srtctl (pinned 8dace5f + 504 + the [AMD] Add MI355X runners #32 patch), the LMCache variant renders the vLLM worker with --kv-transfer-config '{"kv_connector":"LMCacheMPConnector",...,"lmcache.mp.host":"tcp://localhost","lmcache.mp.port":8750,"lmcache.mp.mq_timeout":6000.0}', and srtctl dry-run lists the service as lmcache server --host 0.0.0.0 --port 8750 --http-host 0.0.0.0 --http-port 8751 --l1-size-gb 1296 ..., placement workers, start before_workers, critical, container = job container, readiness http://<node>:8751/healthcheck with a 900 s timeout, preamble bash /configs/lmcache-mp-rocm.sh. The GPU-resident variants render with no kv-transfer-config and no setup script.
  • The MI300X single-node launcher (launch_mi300x-amd.sh -> launch_srt_single_node) goes through setup_srt_slurm, which applies runners/srt-slurm/patches/*.patch and copies benchmarks/multi_node/srt-slurm-recipes/configs/ to srt-slurm's configs/ (mounted at /configs).
  • validate_perf_changelog passes against origin/main.

Not verified

  • MI300X hardware (TP8 conc 16, DRAM LMCache point), all green: 36458033009 (hand-written config) and 36460859852 (current head, connector).
    • The service installed LMCache and passed readiness in 176-182 s of its 900 s budget, before vLLM started. Pinned L1 grew to the full 1296 GB. Node memory was tight but nothing ran out of memory.
    • All 8 TP workers created LMCacheMPConnector with mq_timeout 6000, and the server registered 8 GPUs.
    • LMCache stored and served KV: about 4.2k-4.7k stores and 384-584 retrieves per run, and 8.7M-10.9M external prefix-cache hit tokens.
    • Throughput is about 14% below the earlier 8-shard run, 9,970 against 11,586 tok/s, and TTFT p90 is higher. That run used image v0.29.0, so the drop isn't attributed to the single server alone. A same-image 8-shard comparison, or more server --max-workers, would separate the two.
  • Image fix: configs/amd-master.yaml moved this config to vllm/vllm-openai-rocm:v0.30.0 in [Klaud Cold] Update minimaxm3-fp8-mi300x-vllm-agentic-mtp vLLM ROCm image to v0.30.0 / 将 minimaxm3-fp8-mi300x-vllm-agentic-mtp 的 vLLM ROCm 镜像更新至 v0.30.0 #3361, but the recipe still named v0.29.0, so the single-node adapter rejected every point, on main as well. The recipe now uses v0.30.0, and check_sn.py binds all 12 points (6 points × perf/eval).
  • pytest infx/tests/srt_slurm: the same 15 local-environment failures as main, none new.
  • Whether one LMCache server with --max-workers 2 keeps up with 8 TP ranks, and whether the pinned L1 grows to 1296 GB within the job's host memory as the 8 shards did.

Dependency

Requires the lmcache-server srt-slurm patch, the same one as #3543 (SemiAnalysisAI/srt-slurm#32 / NVIDIA/srt-slurm#507). If #3543 lands first, this PR's copy of the patch becomes a no-op diff after rebase.

@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 任务通过。临时性失败通常可以通过重新运行恢复;参见重新运行失败任务的说明。

amd-master.yaml moved minimaxm3-fp8-mi300x-vllm-agentic-mtp to
vllm/vllm-openai-rocm:v0.30.0 in #3361, but the recipe still named v0.29.0,
so the single-node adapter rejected every point.

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

Nothing blocking. The comments below are optional suggestions. There is no need to push a fix for them before merging.

Beyond the inline finding, I also looked at the new lmcache-server service binding --host 0.0.0.0 --http-host 0.0.0.0 in the vendored srt-slurm patch (line ~600) — this exposes the RPC/HTTP ports to the whole node network rather than just localhost, but that's consistent with how srt-slurm's existing service kinds bind for multi-worker access within the job's network namespace, so it doesn't look like a new exposure introduced by this PR.

Extended reasoning...

The diff migrates LMCache DRAM cache setup from a per-TP-rank shell-scripted fleet to a vendored srt-slurm lmcache-server service; it touches a shell script, a benchmark YAML config, a large vendored patch, and a changelog, with no direct auth/crypto surface. An inline finding (pre-existing set -euo pipefail nounset violation) is already being posted, so I did not approve; I additionally checked the 0.0.0.0 bind in the new service definition and found it matches the pattern of other srt-slurm service kinds rather than being a novel exposure.

# Install the ROCm LMCache wheel for the MI300X MiniMax-M3 AgentX LMCache point.
# It runs twice: as the vLLM worker's setup_script (the connector is imported
# there) and in the lmcache-server service's preamble (its own container).
set -euo pipefail

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.

🟣 Pre-existing: lmcache-mp-rocm.sh still has set -euo pipefail (line 5), violating AGENTS.md's mandatory "Do not enable nounset" bash rule, which explicitly bans combined flags like set -euo pipefail. The diff rewrites nearly the whole script (strips the shard loop and env-var gating) and now runs this script from two call sites (setup_script and service preamble), but keeps the nounset flag. Fix: drop -u (use set -eo pipefail) per AGENTS.md, consistent with the rest of the sweep since this script is being touched anyway.

Why this was flagged

AGENTS.md:34 forbids set -u/set -euo pipefail in active bash scripts, requiring explicit validation instead. lmcache-mp-rocm.sh:5 keeps set -euo pipefail, unchanged by this diff but the surrounding script is rewritten and now invoked from a new preamble call site as well as setup_script. No unset-variable dereference currently exists in the new script body, so there's no active crash today, but the convention violation persists and is reachable from a second, new invocation path (the service preamble) that did not exist before. This is pre-existing, not newly introduced, but the diff is a natural point to bring it into compliance since the file is being substantially rewritten.

Verification: pre-existing. lmcache-mp-rocm.sh:5 has set -euo pipefail, which AGENTS.md:34 explicitly forbids: "Do not enable nounset. No set -u, set -o nounset, combined flags such as set -euo pipefail... Use explicit validation; preserve other intended shell options, for example set -eo pipefail." So the candidate's claim is factually accurate — the fix is set -eo pipefail. Severity is…

…MCache point

The refreshed lmcache-server patch (SemiAnalysisAI/srt-slurm#32 at 181b2e4)
keeps a role's connector on a direct vllm serve aggregate worker, so the
variant names connector: lmcache-mp instead of hand-writing its
kv-transfer-config. The message queue timeout falls back to LMCache's
default (300 s) instead of 6000 s.
The role connector is now the lmcache-mp preset written out plus
lmcache.mp.mq_timeout 6000, so the point keeps its measured timeout
instead of falling back to LMCache's 300 s default.
…slurm v2.30.0

main bumped srt-slurm to v2.30.0 and dropped the 504 patch. The 507 patch
is regenerated on v2.30.0 from SemiAnalysisAI/srt-slurm#32 at 181b2e4, and
the #3545 perf-changelog entry is rewritten to state the benchmark change:
one lmcache-server with 1296 GB L1 instead of 8 per-rank 162 GB servers,
image v0.30.0, LMCacheMPConnector at localhost:8750 with mq_timeout 6000,
re-measured results.
@github-actions

Copy link
Copy Markdown
Contributor

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants