paper-with-me

Papers

ShadowKV: KV Cache in Shadows for High-Throughput Long-Context LLM Inference

2024-10-28 · Hanshi Sun, Li-Wen Chang, Wenlei Bao, Size Zheng, Ningxin Zheng, Xin Liu, Harry Dong, Yuejie Chi, Beidi Chen

With the widespread deployment of long-context large language models (LLMs), there has been a growing demand for efficient support of high-throughput inference. However, as the key-value (KV) cache expands with the sequence length, the increasing memory footprint and the need to access it for each token generation both result in low throughput when serving long-context LLMs. While various dynamic sparse attention methods have been proposed to speed up inference while maintaining generation quality, they either fail to sufficiently reduce GPU memory consumption or introduce significant decoding latency by offloading the KV cache to the CPU. We present ShadowKV, a high-throughput long-context LLM inference system that stores the low-rank key cache and offloads the value cache to reduce the memory footprint for larger batch sizes and longer sequences. To minimize decoding latency, ShadowKV employs an accurate KV selection strategy that reconstructs minimal sparse KV pairs on-the-fly. By evaluating ShadowKV on a broad range of benchmarks, including RULER, LongBench, and Needle In A Haystack, and models like Llama-3.1-8B, Llama-3-8B-1M, GLM-4-9B-1M, Yi-9B-200K, Phi-3-Mini-128K, and Qwen2-7B-128K, we demonstrate that it can support up to 6$\times$ larger batch sizes and boost throughput by up to 3.04$\times$ on an A100 GPU without sacrificing accuracy, even surpassing the performance achievable with infinite batch size under the assumption of infinite GPU memory. The code is available at https://github.com/bytedance/ShadowKV.

📄 PDF Abstract BibTeX arXiv:2410.21465

Code (1)

bytedance/ShadowKV 공식 구현 pytorch

Tasks

CPUGPU

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음
SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…

Similar Papers 제목 키워드 기반

NOSA: Native and Offloadable Sparse Attention

2025-10-15 · Yuxiang Huang, Pengjie Wang, Jicheng Han, Weilin Zhao 외 arxiv

Decoding throughput improvements from larger inference batches are limited by GPU memory, which is largely consumed by the key-value (KV) cache. Prior training-free KV cache offloading alleviates this by keeping redundan…

ShadowServe: Interference-Free KV Cache Fetching for Distributed Prefix Caching

2025-09-21 · Xingyu Xiang, Raj Joshi, Yuhan Liu, Jiayi Yao 외 arxiv

Distributed prefix caching accelerates long-context LLM serving by reusing KV cache entries for common context prefixes. However, KV cache fetches can become a bottleneck when network bandwidth is limited. Compression mi…

Batch-Max: Higher LLM Throughput using Larger Batch Sizes and KV Cache Compression

2024-12-07 · Michael R. Metel, Boxing Chen, Mehdi Rezagholizadeh

Several works have developed eviction policies to remove key-value (KV) pairs from the KV cache for more efficient inference. The focus has been on compressing the KV cache after the input prompt has been processed for f…

GPU

PackKV: Reducing KV Cache Memory Footprint through LLM-Aware Lossy Compression

2025-12-30 · Bo Jiang, Taolue Yang, Youyuan Liu, Xubin He 외 arxiv

Transformer-based large language models (LLMs) have demonstrated remarkable potential across a wide range of practical applications. However, long-context inference remains a significant challenge due to the substantial …

Computational Efficiency

ReasonCache: Accelerating Large Reasoning Model Serving through KV Cache Sharing

2025-07-29 · Kaiwen Chen, Xin Tan, Minchen Yu, Jingzong Li 외 arxiv

Large Reasoning Models (LRMs) are becoming integral to many AI inference systems, enhancing their capabilities with advanced reasoning. However, deploying these models in production environments presents a significant Qo…

Collaborative Filtering