Skip to content

[LMCache] Add LMCache configs for dsv4 vllm b200/b300 agentix setups#2153

Open
ApostaC wants to merge 4 commits into
mainfrom
lmcache/agentix
Open

[LMCache] Add LMCache configs for dsv4 vllm b200/b300 agentix setups#2153
ApostaC wants to merge 4 commits into
mainfrom
lmcache/agentix

Conversation

@ApostaC

@ApostaC ApostaC commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adding LMCache configurations for dsv4-vllm launching script
  • Adding 2 nvidia configs with lmcache agentix

Signed-off-by: ApostaC <yihua98@uchicago.edu>
Signed-off-by: ApostaC <yihua98@uchicago.edu>
@cquil11 cquil11 added the agentx AgentX benchmarks, recipes, and infrastructure label Jul 10, 2026 — with ChatGPT Codex Connector
ApostaC added a commit that referenced this pull request Jul 10, 2026
…ntry

Resolve the perf-changelog.yaml tail conflict with #2127 per KLAUD_DEBUG.md §1.1:
take main's changelog wholesale and re-append this PR's entry at the end, with
pr-link updated from the XXX placeholder to #2153.

中文:将 origin/main 合并到 lmcache/agentix,按 KLAUD_DEBUG.md §1.1 处理
perf-changelog.yaml 末尾冲突:整体采用 main 的版本并在末尾重新追加本 PR 的
条目,同时把 pr-link 占位符更新为 #2153。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

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

Additional findings (outside current diff — PR may have been updated during review):

  • 🟡 perf-changelog.yaml:4720-4727 — PR title and description are English-only, but AGENTS.md requires bilingual PR metadata: title format <English title> / <中文标题> and a ## 中文说明 section in the body mirroring the English summary. Please update the title (e.g. append / [LMCache] 为 dsv4 vllm b200/b300 agentix 配置添加 LMCache) and add a ## 中文说明 section to the description before merge.

    Extended reasoning...

    AGENTS.md line 7 states: "PR and GitHub-issue titles & descriptions must be bilingual — include a Simplified Chinese version in addition to English. Title format: ' / <中文标题>'. In the PR/issue body, follow the English content with its Chinese translation (e.g. a '## 中文说明' section mirroring the summary)." This is a repo-wide convention that applies to every PR.

    The PR under review is missing both required pieces:

    • Title: [LMCache] Add LMCache configs for dsv4 vllm b200/b300 agentix setups — English only, no / <中文标题> suffix.
    • Body: two English bullets under # Summary ("Adding LMCache configurations for dsv4-vllm launching script" / "Adding 2 nvidia configs with lmcache agentix") with no ## 中文说明 section following them.

    Step-by-step proof of the violation:

    1. Open AGENTS.md at line 7 — the bilingual rule is explicit and unambiguous, with the exact title format and the ## 中文说明 section pattern spelled out.
    2. Read the PR title as rendered on GitHub — it contains only ASCII characters and no / separator introducing a Chinese portion.
    3. Read the PR body — the entire description is 3 lines of English (# Summary header plus two bullets); grep for 中文说明 in the body returns nothing.
    4. Therefore both required bilingual elements are absent, directly violating the rule at AGENTS.md:7.

    Impact: This is metadata-only — the benchmark scripts and configs themselves are unaffected, CI will still run, and no runtime behavior changes. But the repo convention exists so that non-English speakers on the team can review and search PR history, and every merged PR sets precedent. The rule is stated as a requirement, not a suggestion.

    How to fix (no code change needed):

    1. Edit the PR title to append a Chinese translation after /, e.g. [LMCache] Add LMCache configs for dsv4 vllm b200/b300 agentix setups / [LMCache] 为 dsv4 vllm b200/b300 agentix 配置添加 LMCache.
    2. Add a ## 中文说明 section to the PR body after the English summary, mirroring the two bullets — for example:
      ## 中文说明
      - 为 dsv4-vllm 启动脚本添加 LMCache 配置
      - 新增 2 个使用 LMCache agentix 的 NVIDIA 配置
      

    Severity is nit — this is a documentation/metadata policy issue, easy to fix in the PR description with no code impact, but should be addressed before merge since AGENTS.md declares it a requirement.

Comment on lines +249 to +253
*)
echo "Error: unsupported KV_OFFLOAD_BACKEND '$KV_OFFLOAD_BACKEND' (expected one of: mooncake, lmcache)" >&2
exit 1
;;
esac

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.

🔴 The new --kv-transfer-config JSON for the lmcache arm omits the top-level "kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector" key. Both other in-tree LMCacheMPConnector call-sites include it (benchmarks/single_node/agentic/kimik2.5_fp4_b200.sh:150, benchmarks/single_node/agentic/dsv4_fp4_mi355x_vllm.sh:350); vLLMs KVConnectorFactory pre-registers built-in connectors like MooncakeStoreConnector by bare name but not the third-party LMCacheMPConnector, so vllm serve will fail to resolve the class at engine startup on every point of both the new B200 and B300 -lmcache configs. The same fix is needed at the equivalent OFFLOAD_ARGS block in dsv4_fp4_b300_vllm.sh.

Extended reasoning...

What the bug is

In the new lmcache branch of the KV_OFFLOAD_BACKEND case, the --kv-transfer-config JSON is built as:

{
  "kv_connector": "LMCacheMPConnector",
  "kv_role": "kv_both",
  "kv_connector_extra_config": {
    "lmcache.mp.host": "...",
    "lmcache.mp.port": ...,
    "lmcache.mp.mq_timeout": ...
  }
}

It is missing the top-level "kv_connector_module_path": "lmcache.integration.vllm.lmcache_mp_connector" key.

Why the existing in-tree pattern says this is required

Every other in-tree call-site of LMCacheMPConnector includes that module path explicitly:

  • benchmarks/single_node/agentic/kimik2.5_fp4_b200.sh:150 (vLLM v0.22.0)
  • benchmarks/single_node/agentic/dsv4_fp4_mi355x_vllm.sh:350 (AMD lmcache path)

Those two sites were authored by independent PRs and both pass the module path. The consistency of that pattern is strong evidence the key is load-bearing, not decorative.

By contrast, MooncakeStoreConnector is passed with a bare name across every in-tree site (including the sibling mooncake) branch in these same two scripts) with no module path — because Mooncake is pre-registered in vLLMs built-in KVConnectorFactory registry. LMCacheMPConnector is a third-party connector shipped by the lmcache PyPI package at lmcache.integration.vllm.lmcache_mp_connector; vLLM has no built-in entry for it, so KVConnectorFactory needs the module path to import the class.

Why the pre-existing import check does not save us

The script does run python3 -c "import lmcache.integration.vllm.lmcache_mp_connector" on the way up, but that runs in a separate subprocess and does not seed the vllm serve engine subprocess registry. Even if LMCache 0.5.1 ships entry-point auto-registration for vLLM 0.23.0, both other in-tree sites — one of them on the same LMCache generation — chose not to rely on it, so it is at best not guaranteed on this stack.

Impact and step-by-step failure

  1. Sweep drives a point with kv-offload-backend: lmcache in either dsv4-fp4-b200-vllm-agentic-lmcache or dsv4-fp4-b300-vllm-agentic-lmcache.
  2. The lmcache) branch runs lmcache server in the background and the healthcheck passes (this is the LMCache process, not vLLM).
  3. vllm serve starts with --kv-transfer-config '{"kv_connector":"LMCacheMPConnector",...}' (no module path).
  4. Inside the engine, KVConnectorFactory.create_connector(...) looks up the bare name "LMCacheMPConnector", does not find it in the built-in registry, has no kv_connector_module_path to import from, and raises — the engine dies at startup, SERVER_PID exits, wait_for_server_ready fails, and every point in the new -lmcache configs never produces results.

Because both dsv4-fp4-b200-vllm-agentic-lmcache and dsv4-fp4-b300-vllm-agentic-lmcache are 100% kv-offload-backend: lmcache, this blocks the PRs entire core purpose.

Fix

Add the module path in the JSON built at benchmarks/single_node/agentic/dsv4_fp4_b200_vllm.sh around line 251 and the equivalent block in benchmarks/single_node/agentic/dsv4_fp4_b300_vllm.sh around line 253:

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.host\":\"$LMCACHE_CONNECT_HOST\",\"lmcache.mp.port\":$LMCACHE_PORT,\"lmcache.mp.mq_timeout\":$LMCACHE_MQ_TIMEOUT}}"
)

This mirrors the pattern already established at kimik2.5_fp4_b200.sh:150 and dsv4_fp4_mi355x_vllm.sh:350.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No we don't need this in newer versions of vLLM

Comment thread perf-changelog.yaml Outdated
…ntry

Signed-off-by: ApostaC <yihua98@uchicago.edu>
@github-actions

Copy link
Copy Markdown
Contributor

ApostaC added a commit that referenced this pull request Jul 10, 2026
Bring-up on PR #2153 showed full-budget pinned pools OOM-killing B200 nodes
(host OOM-killer / cudaErrorMemoryAllocation) as the LMCache lazy allocator
filled past ~2 TB, so cap --l1-size-gb at 75% of TOTAL_CPU_DRAM_GB. Run the
LMCache section on vllm/vllm-openai:v0.24.0 (the LMCache-0.5.x-validated
pairing) with the CUTLASS DSL cu13 reinstall gated to vLLM < 0.24, and drop
the B300 LMCache section for now to focus test runs on B200.

中文:PR #2153 启动调试发现满预算固定内存池会在缓存填充超过约 2 TB 时触发
节点 OOM(主机 OOM-killer / cudaErrorMemoryAllocation),故将 --l1-size-gb
上限降至 TOTAL_CPU_DRAM_GB 的 75%。LMCache 配置改用 vllm/vllm-openai:v0.24.0
镜像(与 LMCache 0.5.x 验证过的组合),CUTLASS DSL cu13 重装仅在 vLLM < 0.24
时执行;暂时移除 B300 的 LMCache 配置,将测试集中在 B200。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Comment on lines +73 to +77
# The v0.24 images ship fixed bindings; reinstalling there would downgrade.
VLLM_INSTALLED_VERSION=$(python3 -c "from importlib.metadata import version; print(version('vllm'))")
if [ "$(printf '%s\n' "$VLLM_INSTALLED_VERSION" 0.24.0 | sort -V | head -n1)" != "0.24.0" ]; then
agentic_pip_install --quiet --force-reinstall --no-deps \
'nvidia-cutlass-dsl-libs-cu13==4.5.2'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally we don't allow reinstalling kernel libraries

@functionstackx functionstackx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution @ApostaC

can u please update recipes.vllm.ai with ur new configs? https://github.com/vllm-project/recipes

vllm recipes doesn't currently support offloading tho the inferact guys said they are open to contributions to support mooncake store, lmcache, vllm native offloading support in vllm recipes

as in sglang cookbook recipes , they also have support for cpu offloading recipes

Image

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

Labels

agentx AgentX benchmarks, recipes, and infrastructure full-sweep-enabled

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants