LMCache Claims 14x Faster LLM Inference With KV Caching

LMCache KV cache architecture speeding up LLM inference on GPUs

A new technical explainer says LMCache, an open-source KV cache project, can speed up LLM inference by as much as 14x for time to first token while cutting cost. The figure comes from a specific setup, and the reasoning behind it explains why ordinary prompt caching leaves so much value unused.

Why prompt caching misses so often

Cloud providers charge up to 90% less for cached input tokens, since a hit avoids the prefill computation altogether. Stable system prompts and tool definitions can reach hit rates of 60 to 85%, making this one of the most effective inference savings.

The catch: the stored text has to match the start of the new request exactly. One altered character earlier in the prompt and the whole stored region goes unused. Three everyday patterns cause that:

  • A question needing documents A and B together can’t use B’s earlier cache, because B was processed without A before it.
  • Retrieving the same three documents in another order produces a full miss.
  • Every new turn of a chat invalidates the cache past the fixed opening.

Alibaba’s production data shows the waste: 10% of cached KV blocks account for 77% of hits, so most stored data is never read again. KV entries depend on position. Each token’s entry reflects attention to all earlier text, so a block only works in the context that created it.

The second problem: caching inside the engine

Most setups run cache management in the same process as the engine, so shuffling KV tensors among GPU, CPU and disk takes resources from inference. Google’s TurboQuant shrinks KV caches to 3 bits without losing accuracy, yet still slows things by 20% or more when run that way.

How LMCache restructures it

Solving both means relocating the cache. It gets a separate process, the engine passes only block IDs through shared GPU memory, and bulk transfers happen in parallel between GPU, CPU, disk and remote storage.

For text that isn’t a prefix, the system recomputes just the few tokens that attend across document boundaries. This technique, called CacheBlend, lets cached documents be reused in any order or mix and speeds multi-document work by 2 to 4x.

LMCache, an open-source project with over 10,000 stars, builds this design and works with vLLM, SGLang and TensorRT-LLM.

What the 14x number means

The headline figure was measured on H200 GPUs serving Qwen3-235B to 50 concurrent users. There, LMCache’s multiprocess mode cut time to first token by 14x and sped decoding 4x against in-process caching.

Those are results for one model, one hardware setup and one load level, and the comparison is against in-process caching, not against running with no cache. Teams with different prompts or traffic patterns should expect different results and test their own workloads.

Why this matters for serving costs

Inference bills depend heavily on how much context gets reprocessed. Retrieval-augmented systems that pull several documents per query, and agents that carry long conversations, are exactly the workloads where prefix caching breaks down. If most cached blocks go unused, as the Alibaba figures suggest, then a design that can reuse documents regardless of order recovers value that provider discounts alone don’t reach.

The 4x decoding gain matters separately. Time to first token measures how long a user waits before anything appears, while decoding speed governs how fast the rest of the answer streams. Moving cache traffic out of the engine process frees the engine to spend its resources on the model.

Where to look next

This is one of many ways to hold down KV cache cost. The author covers 12 more in a longer guide that ties each method to the cost it reduces and says whether it needs a new model architecture or just a serving-engine change. For anyone running vLLM, SGLang or TensorRT-LLM, the practical first step is to check how often long, repeated context is being recomputed, since that is where multiprocess caching and CacheBlend are meant to pay off.

Source: X (formerly Twitter)

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.