Valkey in LMCache: Building a Fast, Shared Memory Fabric

Architecture drawing. On the left, three identical LMCache server boxes stand in a column; each holds an L1 arena, a strip of host memory shaded in orange. Two lines leave each server and run right to one shared Valkey node. The upper line is dashed and labeled RESP over TCP: commands; it ends at the edge of the Valkey node. The lower line is solid orange and labeled RDMA over EFA: KV bytes; it runs from each L1 arena straight into the fabric engine, a tall box inside the node's Large Object module. Beside the fabric engine sit two storage tiers shaded teal: DRAM, drawn solid, and NVMe, drawn with a dashed outline and marked tiered mode. Commands and KV bytes travel on separate channels, and all three servers share the one node.

LMCache’s Valkey adapter now has an RDMA transport. The Valkey node moves KV cache chunks straight into and out of LMCache’s memory, with no copies on either end, and four worker threads reach line rate on a single 200 Gbit/s EFA.

LMCache & xPU-IO: LMCache Meets GPU Direct Storage

Whiteprint general arrangement in blue linework on pale paper, with three columns headed NVMe, HOST DRAM, and GPU HBM. The top row, labeled TODAY · 2 HOPS, shows a teal-dotted NVMe drive, an orange-red arrow into an orange-dotted bounce buffer in host DRAM, and a second orange-red arrow from host DRAM into a slot in GPU memory. Each arrow crosses a pair of bus lines, so the data crosses the bus twice. A box labeled CPU sits above host DRAM with dotted control lines to both arrows. The bottom row, labeled PHOENIX · 1 HOP, shows an identical drive and GPU. A single orange-red arrow crosses one pair of bus lines and runs from the drive straight into GPU memory. The host DRAM position in that row is empty and no CPU is involved other than issuing the direct memory access (DMA) transfer. No durations are shown.

Overview Agents are now a major inference workload, and inference contexts have stretched into the million-token range. A single session’s KV cache can run to tens of gigabytes. HBM and DRAM are both limited in capacity and getting more expensive, so moving the KV cache down to NVMe SSDs is the better economic choice: one […]

Raw Block in LMCache: Building a Fast, Recoverable NVMe Tier for KV Cache

TL;DR LMCache’s Raw Block backend turns an unmounted block device (or a pre-sized file for development) into a server-owned KV cache tier. It stores KV objects in fixed-size slots, bypasses the filesystem and page cache when configured with O_DIRECT, keeps recovery metadata on the same device, and supports the LMCache multiprocess (MP) L2 path. The […]

From Research Paper to Real Workload: KV-Cache Editing with the LMCache SDK

A whiteprint-style engineering drawing in violet-blue line on bone paper, laid out in two horizontal lanes. The upper lane, labeled INFERENCE ENGINE — GPU, is a long open housing holding two blocks filled with vermilion halftone: one at the left, one at the right. Between them the lane is empty paper. A dashed rule runs the full width below the housing, marking the device boundary. The lower lane, labeled LMCACHE — CPU, is a second housing holding three parts. At the left, a block filled with teal halftone is the request’s KV cache at rest after prefill; a dimension line below it, with slash tick terminators, is labeled T. In the center, drawn in double-weight line and left as bare paper with 45-degree hatched flanges top and bottom like a sectioned die plate, is the editing stage, labeled edit_kv(). At the right, a second teal block of the same footprint is the cache after editing, dimensioned T-prime. Thin open-V arrows carry the flow: down from the left vermilion block, across the boundary and into the first teal block; right into the plate; right out of the plate into the second teal block; then up across the boundary into the right vermilion block. A leader ending in a dot marks the first of those arrows with the note max_tokens=1. Three headings run along the foot of the sheet beneath their columns: 1 PREFILL, 2 MODIFY, 3 DECODE. A ruled title block at bottom right reads LMCACHE, LMCACHE SDK — CACHE EDITING, SHEET 1 GENERAL ARRANGEMENT, SCALE NTS, REV A.

Calling ML engineers and researchers: benchmark your KV-cache editing ideas with LMCache! 🔬 Large language models are powerful, and as Jensen Huang pointed out at GTC 2026, KV cache is the key to making large language models run fast. There are many different ways to optimize KV cache, such as token dropping and KV cache […]

Encrypting KV cache at rest using LMCache

A whiteprint cross-section of the LMCache tier stack. L0 and L1 are drawn as two warm bands, each carrying an irregular signal trace. Below them a plate labeled aesgcm is pierced by five feed slots; four arrows pass down through it on store and one returns upward on load. Under the plate, L2 holds five identical sealed chunks, each divided into a version bar, an IV bar, a ciphertext panel and a tag bar, dimensioned at 29 bytes of fixed overhead. A scale down the left margin runs from hot at the top to cold at the bottom.

TL;DR LMCache can now encrypt KV cache at rest in the L2 tier (S3, fs, RESP, …) in vLLM or SGLang deployments with AES-GCM, keyed per cache_salt so each tenant’s ciphertext is distinct. It is implemented as a serde — the same pluggable transform layer used by the fp8 and turboquant quantizers — so it […]

Device-DAX in LMCache: Bringing Byte-Addressable Memory Into the KV Cache Path

Promotional banner for "Device-DAX in LMCache: Bringing Byte-Addressable Memory Into the KV Cache Path." An illustrated beaver mascot wearing an LMCache hard hat and glasses stands in a forest stream holding a wrench and glowing circuit board. A diagram shows GPU Memory → DRAM → Device-DAX (CXL Memory) → Storage, with callouts for faster restores, MP mode support, live reconfiguration, and programmatic management.

TL;DR LMCache can use byte-addressable memory exposed through Device-DAX as part of its KV cache hierarchy. The original /dev/dax backend has since expanded to cover optimized non-MP retrieval, MP DAX L2 with HTTP reconfiguration, and Device-DAX L1 with programmatic add and drain-remove operations. This post covers the implementation, the differences between the L1 and L2 […]

LMCache’s New Architecture Boosts MoE Inference Performance by 10×

Modern LLM serving workloads are defined by strict latency requirements, high concurrency, and rapidly growing context lengths. Applications such as multi-turn chat, AI agents, and retrieval-augmented generation continuously build on prior context, leading to substantial reuse of previously computed states. In production, systems must minimize time-to-first-token (TTFT) while maintaining stable decoding throughput under heavy concurrent […]