DualDecoder: Accelerate Long Context LLM Inference by Predictive Prefetch
Zuning Liang, Zhiyi Yao, Qi Chen, Yuedong Xu, Hao Dai, Zhiqiang Ding, Tongkai Yang, Jinlong Hou, Yuan Cheng
Abstract
Long-context inference is becoming a fundamental capability for modern LLM serving, especially driven by emerging agentic applications. Yet it faces a severe memory wall that the KV cache scales proportionally with increasing context length and request concurrency. Existing sparse KV cache methods offload most KV entries to host memory and retrieve only the critical KV entries needed by each decoding step. However, they commonly introduce substantial auxiliary states in GPU memory for KV retrieval management. Our measurements show that these often-overlooked auxiliary states introduce significant memory overhead and become a new bottleneck under high-concurrency workloads. In this paper, we present DualDecoder, a lightweight serving system for long-context LLM inference that enables efficient sparse KV cache retrieval from host memory. Our key insight is that the critical KV entries required for decoding the next token can be accurately predicted from the preceding speculated token. This predictability enables KV retrieval to be proactively prefetched and overlapped with decoding computation, effectively eliminating the GPU memory overhead of auxiliary states. To achieve this prefetching efficiently, DualDecoder leverages a novel dual-token decoding pipeline that accurately identifies critical KV entries with negligible computational overhead, and designs a layer-aware transfer schedule to overlap KV prefetching with model computation and a layer-scoped memory manager to reduce the GPU runtime buffer. Experimental results show that DualDecoder improves decoding throughput by up to 2.62 over state-of-the-art systems while preserving decoding latency and model quality.
Create a lesson
Related papers
Same Seed, Different Top Prediction: Cross-Platform Reproducibility of AlphaFold 3 Inference on TPUs, GPUs, and CPUs
Shared title terminologycs.DCLorenzo Pazienza
Norn: Context-Length-Aware Optimization of Weight and KV Cache Placement for Offloaded LLM Inference
Shared title terminologycs.DCNaoto Sugiura, Hiroki Matsutani
AscMLA: Unlocking FP4 Efficiency for Long-Context MLA Decoding through Asymmetric Scaling
Shared title terminologycs.DCZechun Zhou, Zhiyong Zheng, Xiaomin Zhang et al.
TripleKV: Predict, Prefetch, Protect - KV Cache Management for AI Agents
Shared title terminologycs.DCShashwat Jaiswal, Chloe Alverti, Mengmei Ye et al.
Twindex: Index Cache Offloading with Coarse-to-Fine Selection for Long-Context Sparse-Attention Serving
Shared title terminologycs.DCYuxuan Xia, Jiakun Fan, Han Meng et al.
StateFlow: Sequence Pipeline Parallelism for Long-Context Modeling with Linear Recurrence
Shared title terminologycs.DCWenxuan Zhao, Yingfa Chen, Xu Han et al.