Principle:LMCache LMCache CacheBlend Connector Initialization
| Knowledge Sources | |
|---|---|
| Domains | Infrastructure, Inference_Optimization |
| Last Updated | 2026-02-09 00:00 GMT |
Overview
An initialization pattern that sets up the CacheBlend subsystem including the blender, fused RoPE encoder, and segment-based token database.
Description
CacheBlend Connector Initialization extends the standard vLLM connector initialization with blend-specific components. When enable_blending=True, the connector creates an LMCBlender (via LMCBlenderBuilder.get_or_create) that handles per-layer KV blending with RoPE position recovery. The cache engine also selects SegmentTokenDatabase instead of ChunkedTokenDatabase, which splits tokens on separator strings rather than fixed chunk boundaries.
Usage
This initialization happens automatically when the vLLM connector is created with a blend-enabled config. The blender intercepts the forward pass to blend cached and recomputed KV values.
Theoretical Basis
The blend initialization sets up:
- LMCBlender: Orchestrates per-layer blending during inference
- FusedRope: CUDA kernel for efficient RoPE position recovery on K vectors
- SegmentTokenDatabase: Splits tokens on blend_special_str instead of fixed chunks