
Who LMCache is for#
Customer Support
Ideal for businesses looking to enhance AI-driven customer service applications.
Skip if:
If you do not require real-time interactions.
Document Processing
Streamline processing of large volumes of documents with fast retrieval capabilities.
Skip if:
If your application does not involve document handling.
The problem it solves#
LMCache addresses the slow response times and high costs associated with traditional LLM applications by implementing efficient caching mechanisms.
How it solves it#
Prompt Caching
Enable fast, uninterrupted interactions with AI chatbots by caching long conversational histories.
Fast RAG
Enhance the speed and accuracy of RAG queries by dynamically combining stored KV caches.
Scalability
Effortlessly scales without complex GPU request routing.
Cost Efficiency
Reduces the cost of storing and delivering KV caches through novel compression techniques.
Cross-Platform Integration
Seamlessly integrates with popular LLM serving engines like vLLM and TGI.
Strengths and trade-offs#
Strengths
- SpeedMinimizes latency with unique streaming and decompression methods.
- QualityEnhances the quality of LLM inferences through offline content upgrades.
Trade-offs
- -Complexity in SetupInitial setup may require technical expertise to integrate with existing systems.
LMCache vs alternatives#
LMCache vs OpenAI Prompt Caching
LMCache and OpenAI Prompt Caching both reduce repeated LLM prefill work, but they serve different deployment models. LMCache is for teams running their own inference stack; OpenAI Prompt Caching is a managed API feature for teams already using OpenAI models.
| Feature | LMCache | OpenAI Prompt Caching |
|---|---|---|
| License | Apache-2.0 | Proprietary API feature |
| Self-hosting | Yes, runs with open inference stacks such as vLLM | No, handled inside OpenAI API infrastructure |
| Cache scope | Persistent and tiered KV cache reuse across requests, sessions, engines, and storage backends | Automatic prompt-prefix caching for eligible API requests |
| Operations | Exposes KV cache observability, storage backends, and deployment controls | No infrastructure to manage, but no control over cache placement |
Choose LMCache when you operate self-hosted inference and need control over KV cache reuse, storage placement, observability, or multi-engine deployments. It is strongest for long-context agents, RAG, and repeated workloads where cache reuse can cut time to first token and improve throughput across your own serving fleet.
Choose OpenAI Prompt Caching when you want caching without owning inference infrastructure. It can reduce latency and input token cost automatically for repeated prompts, but it keeps the optimization inside OpenAI's managed API rather than your own deployment.
Install and self-host#
Set up LMCache in the Python environment that runs your self-hosted inference stack.
```bash
pip install lmcache
lmcache --help
```What it's built on#
- Languages
- C++GoJavaScriptPythonRust
FAQ#
What is LMCache?
LMCache is an open-source Knowledge Delivery Network that accelerates LLM applications.
How does LMCache improve response times?
By caching key-value pairs, LMCache enables faster retrieval of information.
Is LMCache easy to integrate?
Yes, LMCache integrates seamlessly with popular LLM serving engines.
Similar open-source tools#
Ploomber
Build reproducible Python data pipelines with DAG orchestration
GPT‑NeoX
EleutherAI's framework for training LLMs at research scale
LLM Foundry
Apache 2.0 LLM fine-tuning toolkit for Llama and Mistral on GPU
agent-toolkit-for-aws
Empower AI agents to build and manage AWS applications
iroh
Connect devices seamlessly without relying on the cloud.
headroom
Compress LLM context before it reaches the model

