StackMap
Subscribe
Explore / kvcached
ovg-project

kvcached

Virtualized, elastic KV cache for LLM serving on shared GPUs: reserve virtual memory, back it with physical GPU memory only when used — vLLM and SGLang, with a memory-limit CLI, router and sleep mode.

1,337 153 Python Apache-2.0updated 13 days ago
View on GitHubDispute this mapping →
Curator's take

The missing piece when several models must share one GPU: KV cache normally pre-allocates a fixed slab per engine, so two models can't fit even when both are idle; kvcached brings OS-style virtual memory to the KV cache so allocation follows live load, idle models can sleep, and a CLI enforces per-model limits. Red Hat's Sardeenz builds multi-model K8s serving on it. Prefix caching and pipeline parallelism supported; MLA (DeepSeek) and GPT-OSS models on vLLM. NOT a throughput optimisation for a single busy model — that's the engine's job — and it patches the engine's allocator, so pin the vLLM/SGLang version it lists.

Mapped by ShipWithAI editors · links verified

Continue your stack

What teams reach for next — and why each earns a place beside kvcached. Ranked by curator confidence.

pairs wellpairs wellpairs wellpairs wellbuilt withLMCachellm-dagentic-apisievLLMkvcached
pairs wellalternativebuilt withpick a node for the why · open it from the panel
Weekly digest
README.md1 min read
kvcached logo

Python Engines Blog arXiv: GPU OS vision
arXiv: Multi LLM Serving Slack Join DeepWiki Homepage License

Make GPU Sharing Flexible and Easy

Make GPU Sharing Flexible and Easy

kvcached (KV cache daemon) is a KV cache library for LLM serving/training on shared GPUs. By bringing OS-style virtual memory abstraction to LLM systems, it enables elastic and demand-driven KV cache allocation, improving GPU utilization under dynamic workloads.

kvcached achieves this by decoupling GPU virtual addressing from physical memory allocation for KV caches. It allows serving engines to initially reserve virtual memory only and later back it with physical GPU memory when the cache is actively used. This decoupling enables on-demand allocation and flexible sharing, bringing better GPU memory utilization under dynamic and mixed workloads. Check out more details in the blog.

Key Features

  • Elastic KV cache: allocate and reclaim KV memory dynamically to match live load.
  • GPU virtual memory: decouple logical KV from physical GPU memory via runtime mapping.
  • Memory control CLI: enforce memory limits with kvcached CLI.
  • Frontend router and sleep mode: route requests to the target models and put models to sleep when idle.
  • Support mainstream serving engines: integrate with SGLang and vLLM.
  • Prefix caching: support automatic prefix caching (APC) with a configurable memory bound. See the example doc for details.

📢 Updates