From 055dfc2ddcd77841d127ef29e77adb04c7802ddd Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 19:58:31 +0000 Subject: [PATCH 01/12] kimik3-fp4-mi355x-vllm-agentic-mtp: add LMCache DRAM KV-offload arm Add an lmcache kv-offload-backend point at TP8 conc 10 on top of the existing DSpark MTP serving stack, mirroring the vllm-simple offload arm for a direct backend comparison. The benchmark script gains an lmcache case arm that installs the LMCache 0.5.4rc1 ROCm wheel (torch/ROCm stack untouched), starts one MP server per the Kimi-K3 recipe (chunk size 768 = K3 unified block size at 8 GPUs, --separate-object-groups for the hybrid KDA/MLA two-group KV layout, --enable-extra-logging, --max-cpu-workers 8 --max-gpu-workers 1), and wires vLLM to it via LMCacheMPConnector. --- .../agentic/kimik3_fp4_mi355x_mtp.sh | 75 +++++++++++++++++++ configs/amd-master.yaml | 4 + 2 files changed, 79 insertions(+) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index ec2eaf3c3..0f1355dfb 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -109,12 +109,14 @@ SERVER_LOG="$RESULT_DIR/server.log" mkdir -p "$RESULT_DIR" SERVER_PID="" +LMCACHE_PID="" cleanup_agentic_services() { local exit_code=$? trap - EXIT INT TERM set +e stop_background_process_tree "$SERVER_PID" "vLLM server" 60 + stop_background_process_tree "$LMCACHE_PID" "LMCache server" exit "$exit_code" } trap cleanup_agentic_services EXIT @@ -143,6 +145,79 @@ case "${KV_OFFLOAD_BACKEND:-}" in ) echo "SimpleCPUOffloadConnector: ${CPU_BYTES_PER_RANK} B/rank x ${TP} ranks, lazy_offload=$SIMPLE_LAZY_OFFLOAD" ;; + lmcache) + require_agentic_kv_offload_backend "$KV_OFFLOAD_BACKEND" + + # Keep the image's tested torch/ROCm stack and install only LMCache's + # missing runtime dependencies, same as the MiniMax-M3 lmcache arm. + LMCACHE_VERSION="0.5.4rc1" + LMCACHE_ROCM_INDEX="https://github.com/LMCache/LMCache/releases/expanded_assets/v${LMCACHE_VERSION}-rocm" + agentic_pip_install --quiet --no-cache-dir --no-deps \ + "sortedcontainers==2.4.0" \ + "opentelemetry-exporter-prometheus==0.61b0" \ + "cupy-rocm-7-0==14.1.1" \ + "lmcache==${LMCACHE_VERSION}" --find-links "$LMCACHE_ROCM_INDEX" + python3 -c \ + "import cupy; import lmcache.integration.vllm.lmcache_mp_connector; import opentelemetry.exporter.prometheus" \ + >/dev/null + + # One MP server for the node, per the Kimi-K3 recipe + # (docs.lmcache.ai/recipes/kimi_k3.html). --chunk-size must equal the + # K3 unified block size N=768 at 8 GPUs, and the hybrid KDA/MLA layout + # (two KV-cache groups under MTP) requires one object group per + # sliding-window size: --separate-object-groups. + LMCACHE_PORT=6555 + LMCACHE_HTTP_PORT=8090 + LMCACHE_LOG="$RESULT_DIR/lmcache_server.log" + + # The whole generated node-DRAM budget backs the single server's L1, + # which lives in /dev/shm; fail early if it cannot fit. + LMCACHE_L1_SIZE_GB="$TOTAL_CPU_DRAM_GB" + SHM_FREE_GB=$(df -BG --output=avail /dev/shm 2>/dev/null | tail -1 | tr -dc '0-9') + if [ -n "$SHM_FREE_GB" ] && [ "$SHM_FREE_GB" -gt 0 ]; then + SHM_CAP_GB=$((SHM_FREE_GB * 90 / 100)) + if [ "$LMCACHE_L1_SIZE_GB" -gt "$SHM_CAP_GB" ]; then + echo "Error: LMCache L1 ${LMCACHE_L1_SIZE_GB} GB exceeds 90% of free /dev/shm (${SHM_CAP_GB} GB)." >&2 + exit 1 + fi + fi + + LMCACHE_CMD=( + lmcache server + --host 127.0.0.1 + --port "$LMCACHE_PORT" + --http-host 127.0.0.1 + --http-port "$LMCACHE_HTTP_PORT" + --l1-size-gb "$LMCACHE_L1_SIZE_GB" + --l1-init-size-gb 10 + --chunk-size 768 + --separate-object-groups + --enable-extra-logging + --max-cpu-workers 8 + --max-gpu-workers 1 + --eviction-policy LRU + ) + append_command "$RESULT_DIR/lmcache_command.txt" "${LMCACHE_CMD[@]}" + "${LMCACHE_CMD[@]}" > "$LMCACHE_LOG" 2>&1 & + LMCACHE_PID=$! + wait_for_ready \ + --endpoint "http://127.0.0.1:${LMCACHE_HTTP_PORT}/healthcheck" \ + --log "$LMCACHE_LOG" \ + --pid "$LMCACHE_PID" \ + --sleep-interval 1 \ + --timeout 600 + + # 100k-330k-token agentic prefixes make single retrieves large; use the + # same MQ timeout headroom as the MiniMax-M3 arm. + OFFLOAD_ARGS=( + --kv-transfer-config + "{\"kv_connector\":\"LMCacheMPConnector\",\"kv_connector_module_path\":\"lmcache.integration.vllm.lmcache_mp_connector\",\"kv_role\":\"kv_both\",\"kv_connector_extra_config\":{\"lmcache.mp.port\":$LMCACHE_PORT,\"lmcache.mp.mq_timeout\":6000.0}}" + ) + ;; + *) + echo "Error: unsupported KV_OFFLOAD_BACKEND='$KV_OFFLOAD_BACKEND' (expected vllm-simple or lmcache)" >&2 + exit 1 + ;; esac fi diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index c94029484..3aa757c0a 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -650,6 +650,10 @@ kimik3-fp4-mi355x-vllm-agentic-mtp: search-space: - { tp: 8, kv-offloading: none, conc-list: [1, 4, 8] , spec-decoding: mtp} - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: vllm-simple }, conc-list: [10], spec-decoding: mtp } + # LMCache MP-server DRAM offload on top of the same DSpark MTP serving + # stack, at the same concurrency as the vllm-simple arm for a direct + # offload-backend comparison. + - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc1" }, conc-list: [10], spec-decoding: mtp } dsr1-fp4-mi355x-sglang-disagg: image: lmsysorg/sglang-rocm:v0.5.12-rocm720-mi35x-20260519 From 328836b6f1aea4da24ac60651cdf4b7614920a25 Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 19:59:05 +0000 Subject: [PATCH 02/12] perf-changelog: select kimik3-fp4-mi355x-vllm-agentic-mtp LMCache arm --- perf-changelog.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/perf-changelog.yaml b/perf-changelog.yaml index f118b99aa..da67c0138 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5909,3 +5909,12 @@ - "Increase MTP speculative steps from 3 to 5 (num-draft-tokens 4→6) and raise SGLANG_SIMULATE_ACC_LEN from 2.99 to 3.61 to reflect higher measured acceptance rate, targeting ~15% throughput improvement" - "Replace the TP8/EP8 low-concurrency arm (conc [1,2,4]) hicache offload with kv-offloading: none to reduce per-request latency at low load; conc [1,2,4] are now tested on both tp=4+hicache and tp=8+no-offload so SemiAnalysis can select the Pareto-optimal point per concurrency" pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2570 + +- config-keys: + - kimik3-fp4-mi355x-vllm-agentic-mtp + scenario-type: + - agentic-coding + description: + - "Add an LMCache 0.5.4rc1 DRAM KV-offload arm at TP8 conc 10 on top of the DSpark MTP stack, mirroring the vllm-simple offload point for a direct backend comparison." + - "Run one LMCache MP server per node with chunk size 768 (the K3 unified block size at 8 GPUs) and --separate-object-groups for the hybrid KDA/MLA two-group KV layout." + pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2583 From 4584d37ab75aa38fd8af0060b3d6a429a6b82154 Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 21:20:39 +0000 Subject: [PATCH 03/12] Move the LMCache arm to a dedicated config key at conc 4/8/16 A separate kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache key lets the changelog select only the LMCache points instead of re-running the resident and vllm-simple arms of the base key. The base key returns to its upstream shape. --- configs/amd-master.yaml | 22 ++++++++++++++++++---- perf-changelog.yaml | 4 ++-- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 3aa757c0a..5afd30620 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -650,10 +650,24 @@ kimik3-fp4-mi355x-vllm-agentic-mtp: search-space: - { tp: 8, kv-offloading: none, conc-list: [1, 4, 8] , spec-decoding: mtp} - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: vllm-simple }, conc-list: [10], spec-decoding: mtp } - # LMCache MP-server DRAM offload on top of the same DSpark MTP serving - # stack, at the same concurrency as the vllm-simple arm for a direct - # offload-backend comparison. - - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc1" }, conc-list: [10], spec-decoding: mtp } + +# LMCache MP-server DRAM offload on top of the same DSpark MTP serving stack as +# kimik3-fp4-mi355x-vllm-agentic-mtp (same image, script, and topology). A +# dedicated key so LMCache points can be selected and swept without re-running +# the resident and vllm-simple arms of the base key. +kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache: + image: vllm/vllm-openai-rocm:nightly-cb8104839c141609d99f1254459ef3a4f1bd4263 + model: moonshotai/Kimi-K3 + model-prefix: kimik3 + runner: cluster:mi355x-amds + precision: fp4 + framework: vllm + multinode: false + scenarios: + agentic-coding: + - dram-utilization: 0.50 + search-space: + - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc1" }, conc-list: [4, 8, 16], spec-decoding: mtp } dsr1-fp4-mi355x-sglang-disagg: image: lmsysorg/sglang-rocm:v0.5.12-rocm720-mi35x-20260519 diff --git a/perf-changelog.yaml b/perf-changelog.yaml index da67c0138..b5e9172a3 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5911,10 +5911,10 @@ pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2570 - config-keys: - - kimik3-fp4-mi355x-vllm-agentic-mtp + - kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache scenario-type: - agentic-coding description: - - "Add an LMCache 0.5.4rc1 DRAM KV-offload arm at TP8 conc 10 on top of the DSpark MTP stack, mirroring the vllm-simple offload point for a direct backend comparison." + - "Add a dedicated LMCache 0.5.4rc1 DRAM KV-offload key at TP8 conc 4/8/16 on top of the unchanged kimik3-fp4-mi355x-vllm-agentic-mtp DSpark MTP stack." - "Run one LMCache MP server per node with chunk size 768 (the K3 unified block size at 8 GPUs) and --separate-object-groups for the hybrid KDA/MLA two-group KV layout." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2583 From aba14d1b1f300be44daaf97ecf0693e4f5dcdd1e Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 21:57:33 +0000 Subject: [PATCH 04/12] Lower the lmcache key's dram-utilization to fit the shm-backed L1 The LMCache MP server's L1 lives in /dev/shm and the script rejects budgets above 90% of free shm. mi355x-amds nodes mount ~1.5 TB of shm (cap ~1360 GB), so 0.50's 1499 GB budget failed the check in run 31644286169. 0.40 generates ~1199 GB, which fits with margin. --- configs/amd-master.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 5afd30620..96d3b2986 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -665,7 +665,11 @@ kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache: multinode: false scenarios: agentic-coding: - - dram-utilization: 0.50 + # 0.40, not the base key's 0.50: the LMCache L1 is /dev/shm-backed and the + # script refuses budgets above 90% of free shm. mi355x-amds nodes mount + # ~1.5 TB of shm (cap ~1360 GB), so 0.50's 1499 GB budget fails the check + # (run 31644286169); 0.40 -> ~1199 GB fits with margin. + - dram-utilization: 0.40 search-space: - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc1" }, conc-list: [4, 8, 16], spec-decoding: mtp } From 6b95b7b830beec89a2417cc2d2478cc5a233443e Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 22:10:05 +0000 Subject: [PATCH 05/12] Match the LMCache chunk size to this stack's 1536-token block size vLLM sizes the K3 unified attention block to 1536 tokens on the MI355X fp8-KV TRITON_MLA path (attention page >= mamba page), and the MP connector asserts chunk %% block == 0, so the recipe's CUDA-path 768 fails engine init (run 31644990546). --- .../single_node/agentic/kimik3_fp4_mi355x_mtp.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index 0f1355dfb..eba514b26 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -163,9 +163,13 @@ case "${KV_OFFLOAD_BACKEND:-}" in # One MP server for the node, per the Kimi-K3 recipe # (docs.lmcache.ai/recipes/kimi_k3.html). --chunk-size must equal the - # K3 unified block size N=768 at 8 GPUs, and the hybrid KDA/MLA layout - # (two KV-cache groups under MTP) requires one object group per - # sliding-window size: --separate-object-groups. + # unified attention block size, which THIS stack (fp8 KV, TP8, no + # mamba-cache-mode align) sets to 1536 -- "Setting attention block size + # to 1536 tokens to ensure that attention page size is >= mamba page + # size" (run 31644990546); the recipe's 768 is the CUDA-path value and + # fails the connector's chunk %% block == 0 assert here. The hybrid + # KDA/MLA layout (two KV-cache groups under MTP) requires one object + # group per sliding-window size: --separate-object-groups. LMCACHE_PORT=6555 LMCACHE_HTTP_PORT=8090 LMCACHE_LOG="$RESULT_DIR/lmcache_server.log" @@ -190,7 +194,7 @@ case "${KV_OFFLOAD_BACKEND:-}" in --http-port "$LMCACHE_HTTP_PORT" --l1-size-gb "$LMCACHE_L1_SIZE_GB" --l1-init-size-gb 10 - --chunk-size 768 + --chunk-size 1536 --separate-object-groups --enable-extra-logging --max-cpu-workers 8 From a8cda1afc0cfa50c85515fb7632dd5b7f027662c Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 22:21:13 +0000 Subject: [PATCH 06/12] Raise the LMCache chunk size to 3072 for the KDA state group The connector requires the chunk to be a multiple of every engine KV group's tokens_per_block. On this stack the hybrid layout registers attention groups at 1536 and a KDA state group at 3072 (run 31645828378), so 1536 fails registration; 3072 is the minimum valid chunk. --- .../agentic/kimik3_fp4_mi355x_mtp.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index eba514b26..b9e58ee03 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -162,14 +162,15 @@ case "${KV_OFFLOAD_BACKEND:-}" in >/dev/null # One MP server for the node, per the Kimi-K3 recipe - # (docs.lmcache.ai/recipes/kimi_k3.html). --chunk-size must equal the - # unified attention block size, which THIS stack (fp8 KV, TP8, no - # mamba-cache-mode align) sets to 1536 -- "Setting attention block size - # to 1536 tokens to ensure that attention page size is >= mamba page - # size" (run 31644990546); the recipe's 768 is the CUDA-path value and - # fails the connector's chunk %% block == 0 assert here. The hybrid - # KDA/MLA layout (two KV-cache groups under MTP) requires one object - # group per sliding-window size: --separate-object-groups. + # (docs.lmcache.ai/recipes/kimi_k3.html), with --chunk-size sized for + # THIS stack rather than the recipe's CUDA-path 768: the connector + # requires the chunk to be a multiple of every engine KV group's + # tokens_per_block, and the hybrid KDA/MLA layout here registers + # attention groups at 1536 ("Setting attention block size to 1536", + # run 31644990546) plus a KDA state group at 3072 (run 31645828378), + # so 3072 is the minimum valid chunk. The multi-group layout also + # requires one object group per sliding-window size: + # --separate-object-groups. LMCACHE_PORT=6555 LMCACHE_HTTP_PORT=8090 LMCACHE_LOG="$RESULT_DIR/lmcache_server.log" @@ -194,7 +195,7 @@ case "${KV_OFFLOAD_BACKEND:-}" in --http-port "$LMCACHE_HTTP_PORT" --l1-size-gb "$LMCACHE_L1_SIZE_GB" --l1-init-size-gb 10 - --chunk-size 1536 + --chunk-size 3072 --separate-object-groups --enable-extra-logging --max-cpu-workers 8 From afee680555d81c8783ee45cfd44047f0a434fadf Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 22:44:35 +0000 Subject: [PATCH 07/12] Pin the LMCache MP server to the lmcache_driven transfer path Auto mode loads both transfer paths; pin server-driven STORE/RETRIEVE (as the MiniMax-M3 arm does) so the benchmark measures one deterministic path. The L1 stays shm-backed either way, so the /dev/shm capacity check still applies. --- benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index b9e58ee03..aa2a5ae89 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -201,6 +201,12 @@ case "${KV_OFFLOAD_BACKEND:-}" in --max-cpu-workers 8 --max-gpu-workers 1 --eviction-policy LRU + # Pin the server-driven STORE/RETRIEVE path (same as the MiniMax-M3 + # arm) so the benchmark measures one deterministic transfer path + # instead of the auto-mode pair. The L1 stays /dev/shm-backed either + # way (shm_name defaults on), which is why the capacity check above + # applies in this mode too. + --supported-transfer-mode lmcache_driven ) append_command "$RESULT_DIR/lmcache_command.txt" "${LMCACHE_CMD[@]}" "${LMCACHE_CMD[@]}" > "$LMCACHE_LOG" 2>&1 & From 20b4fdae81f816d7b9741f2c03d66b801f53b7dc Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 23:21:43 +0000 Subject: [PATCH 08/12] Hold LMCache L1 read locks for the job duration The default 300s read-lock TTL expires under a single GPU worker serializing huge K3 transfers: run 31648224111 logged 57k finish-read-on-non-read-locked-key warnings starting exactly at warmup+300s, followed by a GPU illegal-access crash mid-profile. Match the MiniMax-M3 arm's 7200s read TTL. --- benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index aa2a5ae89..55944729b 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -195,6 +195,13 @@ case "${KV_OFFLOAD_BACKEND:-}" in --http-port "$LMCACHE_HTTP_PORT" --l1-size-gb "$LMCACHE_L1_SIZE_GB" --l1-init-size-gb 10 + # Read locks default to a 300s TTL, and with a single GPU worker + # serializing 100k-300k-token K3 transfers, queued reads routinely + # outlive it: run 31648224111 logged 57k "finish read on + # non-read-locked key" warnings starting exactly warmup+300s before + # a GPU illegal-access crash. Outlast the job like the MiniMax-M3 + # arm does. + --l1-read-ttl-seconds 7200 --chunk-size 3072 --separate-object-groups --enable-extra-logging From 3c1908b33c48ba9a37a6efd7e031a672b5a7ae33 Mon Sep 17 00:00:00 2001 From: Samuel Shen Date: Wed, 12 Aug 2026 23:36:49 +0000 Subject: [PATCH 09/12] Revert "Hold LMCache L1 read locks for the job duration" This reverts commit 20b4fdae81f816d7b9741f2c03d66b801f53b7dc. --- benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh | 7 ------- 1 file changed, 7 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index 55944729b..aa2a5ae89 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -195,13 +195,6 @@ case "${KV_OFFLOAD_BACKEND:-}" in --http-port "$LMCACHE_HTTP_PORT" --l1-size-gb "$LMCACHE_L1_SIZE_GB" --l1-init-size-gb 10 - # Read locks default to a 300s TTL, and with a single GPU worker - # serializing 100k-300k-token K3 transfers, queued reads routinely - # outlive it: run 31648224111 logged 57k "finish read on - # non-read-locked key" warnings starting exactly warmup+300s before - # a GPU illegal-access crash. Outlast the job like the MiniMax-M3 - # arm does. - --l1-read-ttl-seconds 7200 --chunk-size 3072 --separate-object-groups --enable-extra-logging From 0811fb0c6962785d07607a9b1cffb621fe01473c Mon Sep 17 00:00:00 2001 From: ApostaC Date: Thu, 13 Aug 2026 08:50:20 -0700 Subject: [PATCH 10/12] trigger lmcache 0.5.4rc2 Signed-off-by: ApostaC --- configs/amd-master.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 96d3b2986..4b95cd413 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -671,7 +671,7 @@ kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache: # (run 31644286169); 0.40 -> ~1199 GB fits with margin. - dram-utilization: 0.40 search-space: - - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc1" }, conc-list: [4, 8, 16], spec-decoding: mtp } + - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc2" }, conc-list: [4, 8, 16], spec-decoding: mtp } dsr1-fp4-mi355x-sglang-disagg: image: lmsysorg/sglang-rocm:v0.5.12-rocm720-mi35x-20260519 From ac6ad7d514a4a5346293e62a5378204d19e32f55 Mon Sep 17 00:00:00 2001 From: ApostaC Date: Thu, 13 Aug 2026 11:02:46 -0700 Subject: [PATCH 11/12] update lmcache configus Signed-off-by: ApostaC --- .../agentic/kimik3_fp4_mi355x_mtp.sh | 19 +++---------------- configs/amd-master.yaml | 10 +++++----- perf-changelog.yaml | 4 ++-- 3 files changed, 10 insertions(+), 23 deletions(-) diff --git a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh index aa2a5ae89..0a3fd4318 100644 --- a/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh +++ b/benchmarks/single_node/agentic/kimik3_fp4_mi355x_mtp.sh @@ -150,7 +150,7 @@ case "${KV_OFFLOAD_BACKEND:-}" in # Keep the image's tested torch/ROCm stack and install only LMCache's # missing runtime dependencies, same as the MiniMax-M3 lmcache arm. - LMCACHE_VERSION="0.5.4rc1" + LMCACHE_VERSION="0.5.4rc2" LMCACHE_ROCM_INDEX="https://github.com/LMCache/LMCache/releases/expanded_assets/v${LMCACHE_VERSION}-rocm" agentic_pip_install --quiet --no-cache-dir --no-deps \ "sortedcontainers==2.4.0" \ @@ -175,17 +175,7 @@ case "${KV_OFFLOAD_BACKEND:-}" in LMCACHE_HTTP_PORT=8090 LMCACHE_LOG="$RESULT_DIR/lmcache_server.log" - # The whole generated node-DRAM budget backs the single server's L1, - # which lives in /dev/shm; fail early if it cannot fit. LMCACHE_L1_SIZE_GB="$TOTAL_CPU_DRAM_GB" - SHM_FREE_GB=$(df -BG --output=avail /dev/shm 2>/dev/null | tail -1 | tr -dc '0-9') - if [ -n "$SHM_FREE_GB" ] && [ "$SHM_FREE_GB" -gt 0 ]; then - SHM_CAP_GB=$((SHM_FREE_GB * 90 / 100)) - if [ "$LMCACHE_L1_SIZE_GB" -gt "$SHM_CAP_GB" ]; then - echo "Error: LMCache L1 ${LMCACHE_L1_SIZE_GB} GB exceeds 90% of free /dev/shm (${SHM_CAP_GB} GB)." >&2 - exit 1 - fi - fi LMCACHE_CMD=( lmcache server @@ -198,15 +188,12 @@ case "${KV_OFFLOAD_BACKEND:-}" in --chunk-size 3072 --separate-object-groups --enable-extra-logging + --extra-logging-interval 30 --max-cpu-workers 8 --max-gpu-workers 1 --eviction-policy LRU - # Pin the server-driven STORE/RETRIEVE path (same as the MiniMax-M3 - # arm) so the benchmark measures one deterministic transfer path - # instead of the auto-mode pair. The L1 stays /dev/shm-backed either - # way (shm_name defaults on), which is why the capacity check above - # applies in this mode too. --supported-transfer-mode lmcache_driven + --shm-name "" ) append_command "$RESULT_DIR/lmcache_command.txt" "${LMCACHE_CMD[@]}" "${LMCACHE_CMD[@]}" > "$LMCACHE_LOG" 2>&1 & diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 4b95cd413..64b156590 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -665,11 +665,11 @@ kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache: multinode: false scenarios: agentic-coding: - # 0.40, not the base key's 0.50: the LMCache L1 is /dev/shm-backed and the - # script refuses budgets above 90% of free shm. mi355x-amds nodes mount - # ~1.5 TB of shm (cap ~1360 GB), so 0.50's 1499 GB budget fails the check - # (run 31644286169); 0.40 -> ~1199 GB fits with margin. - - dram-utilization: 0.40 + # 0.50 matches the base key: the LMCache server runs with --shm-name "" + # so its L1 lives in regular process memory instead of /dev/shm, and the + # budget is no longer capped by the ~1.5 TB shm mount (which forced 0.40 + # before, run 31644286169). + - dram-utilization: 0.50 search-space: - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc2" }, conc-list: [4, 8, 16], spec-decoding: mtp } diff --git a/perf-changelog.yaml b/perf-changelog.yaml index d8619dec9..9b0682f01 100644 --- a/perf-changelog.yaml +++ b/perf-changelog.yaml @@ -5924,6 +5924,6 @@ scenario-type: - agentic-coding description: - - "Add a dedicated LMCache 0.5.4rc1 DRAM KV-offload key at TP8 conc 4/8/16 on top of the unchanged kimik3-fp4-mi355x-vllm-agentic-mtp DSpark MTP stack." - - "Run one LMCache MP server per node with chunk size 768 (the K3 unified block size at 8 GPUs) and --separate-object-groups for the hybrid KDA/MLA two-group KV layout." + - "Add a dedicated LMCache 0.5.4rc2 DRAM KV-offload key at TP8 conc 4/8/16 on top of the unchanged kimik3-fp4-mi355x-vllm-agentic-mtp DSpark MTP stack, with the version pinned in the master config and consumed by the script via KV_OFFLOAD_BACKEND_METADATA." + - "Run one LMCache MP server per node with chunk size 3072 (the minimum multiple of the hybrid KDA/MLA group block sizes) and --separate-object-groups, keeping the L1 in process memory (--shm-name \"\") so the DRAM budget is not capped by /dev/shm." pr-link: https://github.com/SemiAnalysisAI/InferenceX/pull/2583 From e890a2b44a770a2cfec61a9b025fbad6fcbe8e69 Mon Sep 17 00:00:00 2001 From: ApostaC Date: Thu, 13 Aug 2026 11:25:39 -0700 Subject: [PATCH 12/12] update conc Signed-off-by: ApostaC --- configs/amd-master.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/amd-master.yaml b/configs/amd-master.yaml index 64b156590..44075c764 100644 --- a/configs/amd-master.yaml +++ b/configs/amd-master.yaml @@ -671,7 +671,7 @@ kimik3-fp4-mi355x-vllm-agentic-mtp-lmcache: # before, run 31644286169). - dram-utilization: 0.50 search-space: - - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc2" }, conc-list: [4, 8, 16], spec-decoding: mtp } + - { tp: 8, ep: 1, kv-offloading: dram, kv-offload-backend: { name: lmcache, version: "0.5.4rc2" }, conc-list: [4, 8, 10, 12], spec-decoding: mtp } dsr1-fp4-mi355x-sglang-disagg: image: lmsysorg/sglang-rocm:v0.5.12-rocm720-mi35x-20260519