Discover / Token & Cost Optimization

LMCache

by LMCachePython

KV cache management layer that speeds up LLM serving by reusing cached context.

Toolstable

Maturity: stable because 2y old, operator-v0.5.1 released 11d ago. Derived from release and commit history, not a rating.

Stars
11k
Forks
1.6k
Downloads / mo
68k
Last commit
2026-08-02
License
Apache-2.0
Open issues
437

Market and trust evidence

Edition not yet matched

No exact skills.sh identity match is available for this repository. Repository adoption and freshness remain visible above; install momentum is not inferred.

Trust analysis is a screening signal, not a security warranty. Read the ranking and trust methodology.

In practice

Written by AI from this repository’s README · high confidence

Long contexts get re-prefilled on every request and the KV cache dies with the serving process.

Use it when

Use it for multi turn, agentic or RAG workloads where the same long prefix is sent again and again.

Not the right pick when

No benefit for short one shot prompts, and it only pays off alongside a supported serving engine.

Capabilities

  • KV cache reused across requests, sessions and engine instances
  • standalone daemon so cache survives an engine crash
  • tiered offloading across GPU, CPU memory, local storage and remote backends
  • vendor neutral across serving engines, hardware and storage
  • multi-node P2P CPU memory sharing
  • observability stack for cache monitoring

Requirements

  • A supported serving engine such as vLLM
  • CUDA or ROCm GPU hardware

Cost: Free and open source

Install

Derived from the published package name in the repository, not from a model.

Video walkthroughs

Third-party YouTube uploads matched to this tool by title, channel and repository name on 2026-08-03. Not made, reviewed or endorsed by SkillPilot. View counts and publish months are as of the match date and the month is approximate. Nothing loads from YouTube until you press play.

What the repository ships

Ships CLAUDE.mdCursor rulesHas testsHas docsHas examplesSecurity policyCI configured

Detected from the actual files in the repository root.

Latest release operator-v0.5.1

Published 2026-07-23

No release notes provided.

Tags

README

<div align="center">

<p align="center">

<img src="asset/logo.png" alt="lmcache logo" width="45%">

</p>

<h3 align="center">

A KV Cache Management Layer for Scalable LLM Inference

</h3>

<hr width="78%">

<h3 align="center">

<a href="https://blog.lmcache.ai/">Blog</a> |

<a href="https://docs.lmcache.ai/">Documentation</a> |

<a href="https://join.slack.com/t/lmcacheworkspace/shared_invite/zt-3zxjao8h0-lRfBfnLqbALOtLsWn2ITxA">Join Slack</a> |

<a href="https://docs.lmcache.ai/community/meetings.html">Community Meeting</a> |

<a href="https://github.com/LMCache/LMCache/issues/2923">Roadmap</a>

</h3>

GitHub Repo stars

PyPI

PyPI - Downloads

GitHub commit activity

GitHub contributors

Good first issues

Slack

Ask DeepWiki

If LMCache helps you serve LLMs faster and cheaper, give us a star — it helps more teams discover the project.

</div>

Updates

  • [2026/05] 🔥 Agentic workload benchmark on AMD MI300X (blog).
  • [2026/04] 🔥 LMCache's new multiprocess (MP) architecture release (blog).
  • [2026/03] LMCache at GTC 2026 (post).
  • [2026/01] LMCache multi-node P2P CPU memory sharing, from experimental feature to production (blog).

<details>

<summary>More</summary>

  • [2025/11] LMCache x CoreWeave accelerate efficient LLM inference for Cohere (blog).
  • [2025/10] LMCache joins the PyTorch Foundation and Tensormesh unveiled (blog, PyTorch).
  • [2025/09] NVIDIA Dynamo integrates LMCache, accelerating LLM inference (blog).
  • [2025/08] 🎉 LMCache hits 5,000+ GitHub stars (blog).
  • [2025/08] LMCache supports gpt-oss (20B/120B) on day 1 (blog).
  • [2025/07] Get faster LLM inference and cheaper responses with LMCache and Redis (Redis blog).
  • [2025/07] LMCache extends its turbo-boost to multimodal models in vLLM V1 (blog).
  • [2025/06] LLM Production Stack goes cross-hardware: AMD, Arm and Ascend (blog).

</details>

About

LMCache is a KV cache management layer for LLM inference. It turns KV cache from a temporary state into reusable AI-native knowledge that can be stored persistently, reused across multiple serving engines, monitored with an observability stack, and transformed for better generation quality. As a result, LMCache reduces TTFT (time-to-first-token) and improves throughput, especially for long-context agentic, multi-turn conversation, and knowledge-augmented workloads (e.g., RAG).

LMCache is vendor-neutral. It can be used as a KV cache layer for a range of mainstream open-source serving engines, inference frameworks, hardware vendors, storage systems, and infrastructure providers. The vendor neutrality allows users to freely switch between serving engines and storage vendors, while reusing the stored KV caches.

<p align="center">

<picture>

<source media="(prefers-color-scheme: dark)" srcset="asset/deployment_modes_dark.png">

<source media="(prefers-color-scheme: light)" srcset="asset/deployment_modes_light.png">

<img alt="LMCache Deployment Modes" src="asset/deployment_modes_light.png">

</picture>

</p>

Key features

  • Engine-independent deployment: LMCache, as a standalone daemon process, manages KV cache independently from the inference engine process, so that KV cache will not be lost even if the inference engine crashes (i.e., no fate-sharing with engines).
  • Persistent, tiered KV cache offloading and reuse: Move KV caches out of GPU memory into a tiered storage hierarchy spanning CPU memory, local storage, and remote backends, enabling reuse across requests, sessions, and engine instances to reduce repeated prefill computation and improve TTFT.
  • Production-level KV cache observability: LMCache provides a rich set of KV cache observability metrics, including typical Kubernetes metrics (health monitoring, performance diagnostics), KV-cache-specific metrics (request-level and token-level prefix cache hits, lifecycle, request-level KV cache performance), management metrics (user-specific usage), and more.
  • Pluggable storage and transport backends: Easily integrate remote storage and KV transfer backends through a unified interface, enabling KV cache offloading and sharing across storage providers. Through this interface, LMCache supports storage backends including CPU RAM, local disk (SSD), Redis/Valkey, Mooncake, InfiniStore, S3-compatible object storage, NIXL, and GDS.
  • Non-prefix KV reuse: Extend KV reuse beyond prefix caching by reusing cached KV blocks at any position in the prompt. This leverages CacheBlend to selectively recompute tokens for quality recovery.
  • PD disaggregation and KV transfer: Support KV cache transfer from prefill workers to decode workers over NVLink, RDMA, or TCP through transport layers such as NIXL.
  • Pluggable KV transformation: A simple interface for researchers to write compression, token dropping, and custom serialization through a flexible SERDE interface.

LMCache is becoming an integral layer in the LLM inference ecosystem, with community-driven integration with serving engines, inference frameworks, hardware vendors, storage systems, and infrastructure providers:

<p align="center">

<img src="asset/ecosystem.png" alt="LMCache ecosystem">

</p>

Getting Started

To use LMCache, simply install lmcache from your package manager, e.g. pip:


pip install lmcache

For more setup options and examples, see:

Contributing

We welcome and value contributions and collaborations. Join us in improving LMCache. Check out the Contributing Guide or join our Slack community to get started.

Adoption and Partnerships

LMCache has a growing community of developers, researchers, industry adopters, and partners building the next generation of efficient LLM inference systems.

<p align="center">

<picture>

<source media="(prefers-color-scheme: dark)" srcset="asset/partner_dark.png">

<source media="(prefers-color-scheme: light)" srcset="asset/partner_light.png">

<img alt="LMCache Adoption and Partnerships" src="asset/partner_light.png">

</picture>

</p>

As an independent open-source project, LMCache is becoming the de-facto standard for KV Cache management in LLM inference. Its continued development and community work are supported in part by Tensormesh.

Citation

LMCache builds on research in KV cache management, including cache reuse, offloading, compression, and serving optimization. If you use LMCache in your research, please cite the LMCache paper and related work.

~~~bibtex

@article{cheng2025lmcache,

title={LMCache: An Efficient KV Cache Layer for Enterprise-Scale LLM Inference},

author={Cheng, Yihua and Liu, Yuhan and Yao, Jiayi and An, Yuwei and Chen, Xiaokun and Feng, Shaoting and Huang, Yuyang and Shen, Samuel and Du, Kuntai and Jiang, Junchen},

journal={arXiv preprint arXiv:2510.09665},

year={2025}

}

~~~

<details>

<summary>Related papers</summary>

~~~bibtex

@inproceedings{liu2024cachegen,

title={Cachegen: Kv cache compression and streaming for fast large language model serving},

author={Liu, Yuhan and Li, Hanchen and Cheng, Yihua and Ray, Siddhant and Huang, Yuyang and Zhang, Qizheng and Du, Kuntai and Yao, Jiayi and Lu, Shan and Ananthanarayanan, Ganesh and others},

booktitle={Proceedings of the ACM SIGCOMM 2024 Conference},

pages={38--56},

year={2024}

}

@inproceedings{yao2025cacheblend,

title={Cacheblend: Fast large language model serving for rag with cached knowledge fusion},

author={Yao, Jiayi and Li, Hanchen and Liu, Yuhan and Ray, Siddhant and Cheng, Yihua and Zhang, Qizheng and Du, Kuntai and Lu, Shan and Jiang, Junchen},

booktitle={Proceedings of the twentieth European conference on computer systems},

pages={94--109},

year={2025}

}

~~~

</details>

License

The LMCache codebase is licensed under Apache License 2.0. See the LICENSE file for details.

Related tools