LMCache
Framework · Text & code
A cache layer for language model servers that stores attention key-value data in RAM or on disk, so repeated prompts are answered without recomputing.
Latest · Oct 13After a vLLM restart, LMCache kept 141 ms with 99.9% hits; vLLM prefix cache and CPU offload fell back to about 1.35 s.
AccessOpen codeLicenseApache 2.0
Seen running on
| Machine | Speed | How | Seen by |
|---|---|---|---|
| 3 runs on 748 GB | |||
Evidence
- Oct 13Described as a cache layer for vLLM that stores KV notes in a separate server, in RAM and sometimes on NVMe.Hands-on test
Alex Ziskind - Oct 13With 16 clients (about 144 concurrent requests): no cache 187 s, vLLM GPU prefix cache 107 s, vLLM CPU offload 69 s; LMCache about tied with offload.Hands-on test
Alex Ziskind - Oct 13After vLLM died, LMCache held about 89 GB of GPU memory for 2 minutes, crashing the new vLLM; restart took 277 s versus about 150 s.Hands-on test
Alex Ziskind - Oct 13The memory-release wait setting has a 30-second minimum (6 s refused); at 30 s, restart took 173 s, still 20-30 s slower than plain vLLM.Hands-on test
Alex Ziskind - Oct 13With only 40 GB RAM plus NVMe, LMCache served about 265 ms, and still 265 ms after restart by reading the cache from disk; RAM only gave about 1.4 s, all misses.Hands-on test
Alex Ziskind
Show all 11
- Oct 13CacheBlend, reusing document chunks in shuffled order (under 5% cache hits when shuffled), could not be tested because one mode has no vLLM support yet.Hands-on test
Alex Ziskind - Oct 13With DeepSeek V4 Flash after a restart, 16 documents took 5.7 s with LMCache versus 13.8 s with vLLM's cache.Hands-on test
Alex Ziskind - Oct 13With Qwen Flash Next after restart, the 16-document round took 12.3 s with LMCache versus 27.4 s with vLLM.Hands-on test
Alex Ziskind - Oct 13After a vLLM restart at turn 16, vLLM's cache took 9.5 s while LMCache took 1.1 s, reusing almost 60,000 tokens.Hands-on test
Alex Ziskind - Oct 13A 30-turn session took about 350 s uncached, 65 s with vLLM cache and 55 s with LMCache; counting restart (88 s vs 58 s) LMCache ends about 20 s behind.Hands-on test
Alex Ziskind - Oct 13Recommends keeping vLLM prefix caching on; use vLLM CPU offload if it fits RAM; use LMCache for restarts or caches larger than RAM, at the cost of more moving parts.Hands-on test
Alex Ziskind