NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

SwiftCache: Efficient LLM Serving for Multi-turn Conversations with Heterogeneous KV Cache Sharing

Jianmin Hu, Minxian Xu, Sa Wang, Chong Ma, Min Shen, Kejiang Ye, Lin Qu, Chengzhong XuarXiv 2026

TL;DR

SwiftCache is a collaborative Large Language Model (LLM) serving system that allows heterogeneous models co-located on the same server to share underutilized GPU memory and high-speed NVLink bandwidth. By offloading Key-Value (KV) caches from high-demand "master" models to low-demand "worker" models and streaming them layer-by-layer, it slashes time-to-first-token (TTFT) latency by up to 69% and extends maximum context length by up to 3.98×.

What Problem Does This Paper Address?

In multi-turn conversations (like chatbots or AI agents), the history of the conversation grows with each turn. To avoid recomputing past tokens, LLM serving systems cache their Key-Value (KV) pairs in the GPU's High Bandwidth Memory (HBM). However, as the conversation extends to tens or hundreds of thousands of tokens, HBM quickly runs out.

Existing frameworks handle this by offloading excess KV caches to CPU memory or SSDs. The catch? Fetching these caches back via relatively slow PCIe links creates a massive latency bottleneck during the prefill stage, causing the Time-to-First-Token (TTFT) to skyrocket as the context grows. Furthermore, strict HBM limits cap the maximum conversation length a model can handle.

Figure 1. Latency breakdown for computing 256 new tokens and loading KV cache with varying numbers of historical tokens on two 96 GB H20 GPUs using the LWM-1M-Text [23]. The system uses PCIe 4.0 with a peak bandwidth of 32 GB/s and NVLink with a peak bandwidth of 400 GB/s.

Methods

SwiftCache introduces a master-worker architecture designed to exploit the resource imbalances within a single multi-GPU server. A "master" model (handling long-context, cache-heavy tasks) collaborates with "worker" models (running shorter, less cache-intensive tasks).

The system relies on three core techniques:

  1. Layer Stream Cache (LSC): Instead of keeping the KV caches for all layers resident in the master GPU's local memory, SwiftCache allocates space for only the currently active layer. It asynchronously streams the KV cache of the next layer from a worker GPU over high-speed NVLink just before it's needed, drastically reducing the local memory footprint.
  2. Elastic Cache with Block-Major Layout: Worker models dynamically donate idle memory blocks to the master and reclaim them when their own workloads spike. Traditional serving systems use a layer-major memory layout, making dynamic resizing slow ($O(\text{layers} \times \text{blocks})$) due to necessary data shifting. SwiftCache proposes a block-major layout where all layer data for a single block is stored contiguously, enabling instant $O(1)$ allocation adjustments.
  3. Master-Worker Coordination: To prevent memory alignment issues and waste between different co-located models, SwiftCache establishes a shared alignment unit based on the Least Common Multiple (LCM) of the master and worker block sizes.
Figure 4. SwiftCache system overview.

Datasets

The authors evaluated SwiftCache using two real-world datasets:

  • ShareGPT: A dataset of ~90K multi-turn user interactions with ChatGPT, featuring session lengths ranging from 12 to 602K tokens.
  • L-Eval: A long-context benchmark containing over 500 tasks covering multi-turn conversations, question answering, and summarization, with sequence lengths up to 195K tokens.

Key Insights and Ideas

  • Heterogeneous Workload Synergy: In production environments, different models co-located on a server have vastly different cache demands (e.g., a chat model vs. a code completion model). SwiftCache turns this imbalance into an optimization opportunity.
  • Hijacking Idle Interconnects: Because co-located models usually run independently, high-bandwidth GPU-to-GPU links (NVLink/NVSwitch) sit largely idle. SwiftCache repurposes this massive bandwidth to bypass slow PCIe-to-CPU transfers.
  • Temporal Sparsity of Layers: During LLM inference, only one transformer layer executes at any given millisecond. Keeping all layers' KV caches in local HBM simultaneously is a massive waste of peak memory capacity.

Key Results

SwiftCache was tested against state-of-the-art baselines like vLLM (with LMCache) and SGLang (with HiCache) using Qwen3 and LWM models on NVIDIA H20, A100, V100, and L4 GPUs.

  • Latency Reduction: SwiftCache reduced P99 TTFT by up to 69% compared to SGLang (HiCache) and up to 58% compared to vLLM (LMCache) on long-context workloads.
  • Context Window Extension: By streaming layers on demand, the system extended the maximum context length by 1.58× to 3.98× compared to vLLM with chunked prefill.
  • Minimal Worker Interference: Because KV cache transfers over NVLink bypass the GPU's main compute cores, the worker models experienced negligible performance degradation (a maximum TTFT increase of $\le 9.7\%$).

Limitations and Future Work

SwiftCache is strictly designed for a single multi-GPU server because it relies on the ultra-high bandwidth of physical NVLink connections. Extending this architecture to multi-server distributed clusters would introduce severe network bottlenecks over standard ethernet or InfiniBand links. The authors note that adapting SwiftCache to multi-server environments without sacrificing latency remains a challenge for future work.

Summary updated

BibTeX
@misc{hu2026swiftcache,
  author = {Jianmin Hu and Minxian Xu and Sa Wang and Chong Ma and Min Shen and Kejiang Ye and Lin Qu and Chengzhong Xu},
  title = {{SwiftCache: Efficient LLM Serving for Multi-turn Conversations with Heterogeneous KV Cache Sharing}},
  year = {2026},
  eprint = {2606.16135},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.16135},
}
Figure