Skip to content

Copy a snapshot of lmcache_mp_connector.py for vllm 0.18.0#2887

Merged
ApostaC merged 2 commits intoLMCache:devfrom
maobaolong:maintainMPCon
Apr 12, 2026
Merged

Copy a snapshot of lmcache_mp_connector.py for vllm 0.18.0#2887
ApostaC merged 2 commits intoLMCache:devfrom
maobaolong:maintainMPCon

Conversation

@maobaolong
Copy link
Copy Markdown
Collaborator

@maobaolong maobaolong commented Mar 27, 2026

What this PR does / why we need it:

Special notes for your reviewers:

If applicable:

  • this PR contains user facing changes - docs added
  • this PR contains unit tests

Note

Medium Risk
Adds a large new vLLM integration module that implements async KV cache lookup/retrieve/store orchestration; while mostly additive, it touches performance- and correctness-sensitive cache-transfer logic (GPU/ZMQ/stream synchronization).

Overview
Adds a version-pinned LMCacheMPConnector implementation (lmcache_mp_connector_0180.py) for vLLM 0.18.0, including request tracking/state transitions, lookup vs. vLLM-hit reconciliation, batched async retrieve/store submission, and MLA-aware rank/world-size handling.

Updates tooling configs to exclude lmcache_mp_connector_*.py snapshots from pre-commit, ruff, mypy, and codespell, reducing lint/typecheck noise for these vendored compatibility files.

Reviewed by Cursor Bugbot for commit c858999. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the LMCacheMPConnector to integrate LMCache with vLLM's multi-process KV transfer system, including request tracking and metadata management. The reviewer identified several style guide violations, such as missing docstrings for public methods and properties, and a missing return type hint for the wait_for_save method.

Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
Comment thread lmcache/integration/vllm/lmcache_mp_connector_0180.py
@maobaolong
Copy link
Copy Markdown
Collaborator Author

This file is copied from vllm repository, should I fix the code suggestions from gemini-bot ? @ApostaC

Copy link
Copy Markdown
Contributor

@ApostaC ApostaC left a comment

Choose a reason for hiding this comment

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

@maobaolong I have left a comment in vllm-project/vllm#38314. I think that PR looks good to me, but it's better to hear another owner's opinion.

In the worst case, we can probably rename the class name here to something like LMCacheMPConnectorDev in order to avoid naming conflicts? WDYT?

@maobaolong
Copy link
Copy Markdown
Collaborator Author

@maobaolong I have left a comment in vllm-project/vllm#38314. I think that PR looks good to me, but it's better to hear another owner's opinion.

In the worst case, we can probably rename the class name here to something like LMCacheMPConnectorDev in order to avoid naming conflicts? WDYT?

@ApostaC It can be better if we can rename the file name, but not the class name since class name is the content of that file, it is also better if we could keep the file lmcache_mp_connector.py zero line change and check its style follow vllm rule.

maobaolong added a commit to maobaolong/LMCache that referenced this pull request Apr 8, 2026
Copy link
Copy Markdown
Contributor

@ApostaC ApostaC left a comment

Choose a reason for hiding this comment

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

LGTM! We probably want to have some CI for this file as the next step.

@ApostaC ApostaC enabled auto-merge (squash) April 12, 2026 01:10
@github-actions github-actions Bot added the full Run comprehensive tests on this PR label Apr 12, 2026
@ApostaC
Copy link
Copy Markdown
Contributor

ApostaC commented Apr 12, 2026

@sammshen Baolong and his team may want a dev-version of the lmcache_mp_connector.py to do some local iteration without push new code into vLLM. PTAL!

Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Copy link
Copy Markdown
Contributor

@sammshen sammshen left a comment

Choose a reason for hiding this comment

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

LGTM!

@ApostaC ApostaC merged commit 3f71b41 into LMCache:dev Apr 12, 2026
38 checks passed
Oasis-Git pushed a commit to Oasis-Git/LMCache that referenced this pull request Apr 13, 2026
)

* Copy a snapshot of lmcache_mp_connector.py for vllm 0.18.0

Signed-off-by: baoloongmao <baoloongmao@tencent.com>
ftian1 pushed a commit to ftian1/LMCache that referenced this pull request Apr 20, 2026
)

* Copy a snapshot of lmcache_mp_connector.py for vllm 0.18.0

Signed-off-by: baoloongmao <baoloongmao@tencent.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full Run comprehensive tests on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants