LMCache is an extension layer for LLM serving engines that accelerates inference, especially with long contexts, by storing and reusing key-value (KV) attention caches across requests. Instead of rebuilding KV states for repeated or shared text segments, LMCache persists and retrieves them from multiple tiers—GPU memory, CPU DRAM, and local disk—then injects them into subsequent requests to reduce TTFT and increase throughput. Its design supports reuse beyond strict prefix matching and enables sharing across serving instances, improving efficiency under real multi-tenant traffic. The broader project includes examples, tests, a server component, and public posts describing cross-engine sharing and inter-GPU KV transfers. These capabilities aim to lower latency, cut GPU cycles, and stabilize performance for production workloads with overlapping prompts or retrieval-augmented contexts. The end result is a cache fabric for LLMs that complements engines rather than replacing them.

Features

  • KV cache reuse across queries to cut TTFT and boost throughput
  • Multi-tier storage across GPU, CPU, and local disk
  • Cross-engine sharing for interoperability between serving stacks
  • Non-prefix reuse to exploit any overlapping text segments
  • Inter-GPU KV transfer for advanced pipeline/disaggregated setups
  • Example suites, tests, and a server to ease integration

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow LMCache

LMCache Web Site

Other Useful Business Software
MongoDB Atlas runs apps anywhere Icon
MongoDB Atlas runs apps anywhere

Deploy in 115+ regions with the modern database for every enterprise.

MongoDB Atlas gives you the freedom to build and run modern applications anywhere—across AWS, Azure, and Google Cloud. With global availability in over 115 regions, Atlas lets you deploy close to your users, meet compliance needs, and scale with confidence across any geography.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of LMCache!

Additional Project Details

Operating Systems

Linux

Programming Language

Python

Related Categories

Python Artificial Intelligence Software

Registered

5 days ago