Skip to content

[3rdparty] fix: LMCache's MP connector keeps vLLM's lookahead block hashes on, so an MTP prefix hit keeps its last block - #15

Merged
Sakits merged 1 commit into
mainfrom
fix/lmcache-lookahead-block-hashes
Nov 22, 2026
Merged

Sakits merged 1 commit into
mainfrom
fix/lmcache-lookahead-block-hashes

Conversation

@Sakits

@Sakits Sakits commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

With MTP, vLLM 0.34 keeps its lookahead block hashes on only when the KV connector class declares
supports_lookahead_block_hashes(). LMCache's MP connector did not, so every replica with LMCache dropped the last
matched block of each prefix-cache hit and moved its align-mode Mamba checkpoints back with it.

LMCache patch 0006 makes the connector declare the support, as LMCache's closed PR 6619 and vLLM main's own LMCache
connector do. It also holds back the lookahead tokens of a lazy-offload store, which PEAR does not use.

Validation:

  • LMCache's MP connector and lazy-offload tests pass with the patch; its four new tests fail without it.
  • An A/B inside one stage-2 run with MTP and the wheel built from this branch, a check of the fix rather than a run of
    the recipe as released (32 sessions per replica, H200 with vLLM limited to an H100's GPU memory, half the replicas
    without LMCache): the replicas with LMCache run with lookahead hashes and hit 97.1% of their prompt tokens in vLLM's
    own cache, as the replicas without LMCache do (97.1%); without the patch, in the same setup, they hit 94.3%.

…ashes on, so an MTP prefix hit keeps its last block

With MTP, vLLM 0.34 keeps its lookahead block hashes on only when the KV connector class declares
supports_lookahead_block_hashes(). LMCache's MP connector did not, so every replica with LMCache dropped the last matched
block of each prefix-cache hit and moved its align-mode Mamba checkpoints back with it. LMCache patch 0006 makes the
connector declare the support, and holds back the lookahead tokens of a lazy-offload store, which PEAR does not use.
@Sakits
Sakits merged commit fc50488 into main Nov 22, 2026
4 checks passed
@Sakits
Sakits deleted the fix/lmcache-lookahead-block-hashes branch November 22, 2026 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant