arXiv:2611.07542cs.AINov 2026

Manuscript Offprint

arXiv:2611.07542

FlashOffloading: Low-Latency KV Cache Offloading for Long-Context LLM Serving

Xuan Wang, Zhuanhao Wu, Tingzhu Fang, Xushi Li, Sicheng Zhang, Zhenyu Yang, Feng Liu, Zhaohui Fan, Qiang Xie, Huayi Zou, Yuncong Liu, Zeyu Song, Ke Zhu, Yanjia Zeng, Jingchun Gao, Yan Shi, Kui Luo, Gezi Li, Liangjun Feng, Cheng Li

ABSTRACT

In large language model (LLM) serving systems, the key-value (KV) cache grows linearly with sequence length and concurrency, so long-context inference easily hits the high-bandwidth memory (HBM) capacity wall and results in low concurrency. Offloading the KV cache to host dynamic random-access memory (DRAM) frees HBM space and raises concurrency, but the additional cache management and host-to-device (H2D) load overhead inflates inference latency, higher concurrency fails to translate into effective throughput. We present FlashOffloading, a host-DRAM-centric inference architecture that fully offloads the KV cache in both the prefill and decode phases. FlashOffloading builds rolling HBM cache for prefill, a hot cache for decode, a reverse sparse index with zero extra miss-lookup overhead, and a compute-load overlapped kernel, optimizing KV offloading latency across the entire pipeline and delivering throughput gains under a time-per-output-token (TPOT) service-level objective (SLO). In experiments deploying GLM-5.2 with multi-token prediction (MTP3) speculative decoding on an Ascend910C prefill-decode (PD)-disaggregated platform, FlashOffloading improves prefill throughput by up to 1.38× and decode throughput by up to 1.91× under a 30 ms TPOT constraint. FlashOffloading is integrated into an open-source serving framework: https://github.com/vllm-project/vllm-ascend/tree/releases/v0.30.0.

1 INTRODUCTION

Long-document understanding, repository-scale code analysis, and long-horizon agent interactions are driving LLM context windows toward millions of tokens. Mainstream online serving systems widely adopt PD disaggregation: P nodes perform chunked prefill and D nodes autoregressive decoding. To avoid recomputation, both stages retain full keys and values for every historical token and attention layer (KV cache), creating substantial memory pressure; a typical 1M-token sequence requires 10–100 GB of KV cache. With finite HBM on graphics processing units (GPUs) and neural processing units (NPUs), this limits concurrency and throughput and can make ultra-long requests unservice.

Tiered KV cache offloading extends available memory with host DRAM or storage, offering a direct way around the HBM capacity wall (Xiong et al., 2024; Luo et al., 2025; Zheng et al., 2026). However, these devices provide much lower bandwidth than HBM, so early work targets offline inference or merely makes long sequences servable. Flex-Gen achieves high-throughput, latency-insensitive inference through layerwise KV cache offloading and loading (Sheng et al., 2023); subsequent systems stream KV state (Strati

et al., 2024) or offload attention computation and state to tiered memory (Pan et al., 2024; Jiang et al., 2025b; Zhang et al., 2026a), enabling longer sequences and larger batches. Nevertheless, repeated KV transfers still incur substantial bandwidth and latency overheads for online serving (Jiang et al., 2025a; Meng et al., 2025).

Reducing transfer volume is therefore essential for online tiered-memory serving. Prior work exploits attention sparsity and approximate selection (Zhang et al., 2023; Tang et al., 2024; Zhang et al., 2024; Liu et al., 2025a; Chen et al., 2026; Bocharnikov et al., 2026) to retain only a small set of KV cache blocks for attention. ShadowKV uses low-rank key representations (Sun et al., 2025), FreeKV employs speculative retrieval and correction (Liu et al., 2026b), and SparseServe and SAC coordinate hierarchical cache management (Zhou et al., 2025; Ma et al., 2026). These methods reduce bandwidth demand but often degrade model quality by at least 1%, limiting their deployment in real online systems.

Native sparse attention, exemplified by DeepSeek Sparse Attention (DSA), changes this premise. Models such as DeepSeek-V3.2 and GLM-5.2 use learned indexers to select top-kk KV entries (DeepSeek-AI, 2025; GLM-5-Team, 2026): the full history must be retained, but each decode step accesses only a small, fine-grained KV cache subset. ESS

¹Huawei Technologies Co., Ltd ²Huawei Ascend Computing Technology Development ³Shanghai Jiao Tong University. Correspondence to: Cheng Li licheng56@huawei.com.

(Chen et al., 2025), HiSparse (Xie et al., 2026), ECHO (Liu et al., 2026a), and AVSG (Kuang et al., 2026) therefore use HBM-DRAM two-level caches to reduce load volume and offload decode KV cache without degrading model quality. However, cache indexing and fine-grained host-to-device (H2D) loads still substantially increase inference latency.

We observe that prefill and decode differ markedly in computation and KV cache access. Prefill offers ample layer-computation windows and coarse accesses, making bulk transfers easier to overlap with computation. Decode needs only indexer-selected entries: the total H2D volume is small, but accesses are fine-grained (~1 KB) and cannot start until indexing completes, making them difficult to overlap with computation.

Motivated by this observation, we present FlashOffloading, an architecture that offloads the KV cache in both prefill and decode for real-world LLM serving. For prefill, a pool of four layer buffers keeps the first layer resident and rotates the other three buffers across subsequent layers, overlapping H2D loads with layer computation. For decode, a reverse sparse index supports a large hot cache to reduce misses and load volume; miss-lookups are fused into top-kk to eliminate extra miss-lookup latency; and fine-grained fused kernels overlap H2D loads with sparse attention.

This work makes the following contributions:

  1. A phase-specialized host-backed KV architecture. We combine layerwise prefill offloading and exact token-selective decode retrieval under a unified host-backed KV architecture.

  2. A bounded-memory layerwise pipeline for prefill. A resident first-layer buffer and three rotating buffers overlap loading, computation, and writeback to overlap transfers with layer computation.

  3. A low-latency, exact decode-offloading engine. A reverse sparse index, cache-management kernels with no additional miss-lookup overhead, and compute-load overlap kernels substantially reduce the added cache management and H2D-load latency.

  4. An end-to-end implementation and evaluation. We integrate both paths into vLLM-Ascend and deploy GLM-5.2 with MTP3 speculative decoding on an Ascend910C PD-disaggregated platform, improving prefill throughput by up to 1.38×1.38\times and decode throughput by up to 1.91×1.91\times under a 30 ms TPOT constraint.

References (35)