-
Notifications
You must be signed in to change notification settings - Fork 224
[LMCache] Add LMCache configs for dsv4 vllm b200/b300 agentix setups #2153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ApostaC
wants to merge
13
commits into
main
Choose a base branch
from
lmcache/agentix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
10e6639
Add LMCache configs for dsv4 vllm b200/b300
ApostaC 73137f1
update perf changelog
ApostaC 951f2c8
Merge origin/main into lmcache/agentix, re-append lmcache changelog e…
ApostaC 4244f91
lmcache: derate L1 pool to 75%, move to vLLM v0.24.0, defer B300 section
ApostaC 380ee5a
fixing the comments and picking optimizations from #2138
ApostaC 6623385
merging upstream updates
ApostaC d9209dd
revert to 0.24.0
ApostaC b935b80
Merge remote-tracking branch 'origin/main' into lmcache/agentix
ApostaC fa1a16c
update vllm commands
ApostaC ef9db5e
update configs
ApostaC 7439500
update gpu memory util
ApostaC b750702
add gpu memory util for EP
ApostaC 0b8646f
move to 0.88 gpu mem util
ApostaC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 The new
--kv-transfer-configJSON for thelmcachearm omits the top-level"kv_connector_module_path":"lmcache.integration.vllm.lmcache_mp_connector"key. Both other in-treeLMCacheMPConnectorcall-sites include it (benchmarks/single_node/agentic/kimik2.5_fp4_b200.sh:150,benchmarks/single_node/agentic/dsv4_fp4_mi355x_vllm.sh:350); vLLMsKVConnectorFactorypre-registers built-in connectors likeMooncakeStoreConnectorby bare name but not the third-partyLMCacheMPConnector, sovllm servewill fail to resolve the class at engine startup on every point of both the new B200 and B300-lmcacheconfigs. The same fix is needed at the equivalentOFFLOAD_ARGSblock indsv4_fp4_b300_vllm.sh.Extended reasoning...
What the bug is
In the new
lmcachebranch of theKV_OFFLOAD_BACKENDcase, the--kv-transfer-configJSON 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
LMCacheMPConnectorincludes 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,
MooncakeStoreConnectoris passed with a bare name across every in-tree site (including the siblingmooncake)branch in these same two scripts) with no module path — because Mooncake is pre-registered in vLLMs built-inKVConnectorFactoryregistry.LMCacheMPConnectoris a third-party connector shipped by thelmcachePyPI package atlmcache.integration.vllm.lmcache_mp_connector; vLLM has no built-in entry for it, soKVConnectorFactoryneeds 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 thevllm serveengine 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
kv-offload-backend: lmcachein eitherdsv4-fp4-b200-vllm-agentic-lmcacheordsv4-fp4-b300-vllm-agentic-lmcache.lmcache)branch runslmcache serverin the background and the healthcheck passes (this is the LMCache process, not vLLM).vllm servestarts with--kv-transfer-config '{"kv_connector":"LMCacheMPConnector",...}'(no module path).KVConnectorFactory.create_connector(...)looks up the bare name"LMCacheMPConnector", does not find it in the built-in registry, has nokv_connector_module_pathto import from, and raises — the engine dies at startup,SERVER_PIDexits,wait_for_server_readyfails, and every point in the new-lmcacheconfigs never produces results.Because both
dsv4-fp4-b200-vllm-agentic-lmcacheanddsv4-fp4-b300-vllm-agentic-lmcacheare 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.sharound line 251 and the equivalent block inbenchmarks/single_node/agentic/dsv4_fp4_b300_vllm.sharound 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:150anddsv4_fp4_mi355x_vllm.sh:350.There was a problem hiding this comment.
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