Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Qian, Yousefijamarani, Zahra, Heisler, Morgan Lindsay, Gu, Rongzhi, Xiaolong, Bai, Yizhou, Shan, Zhang, Wei, Lan, Wang, Xiong, Ying, Zhang, Yong, Fan, Zhenan
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:https://arxiv.org/abs/2512.16822
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866912774204948480
author Wang, Qian
Yousefijamarani, Zahra
Heisler, Morgan Lindsay
Gu, Rongzhi
Xiaolong, Bai
Yizhou, Shan
Zhang, Wei
Lan, Wang
Xiong, Ying
Zhang, Yong
Fan, Zhenan
author_facet Wang, Qian
Yousefijamarani, Zahra
Heisler, Morgan Lindsay
Gu, Rongzhi
Xiaolong, Bai
Yizhou, Shan
Zhang, Wei
Lan, Wang
Xiong, Ying
Zhang, Yong
Fan, Zhenan
contents Modern LLM applications such as deep-research assistants, coding agents, and Retrieval-Augmented Generation (RAG) systems, repeatedly process long prompt histories containing shared document or code chunks, creating significant pressure on the Key Value (KV) cache, which must operate within limited memory while sustaining high throughput and low latency. Prefix caching partially alleviates some of these costs by reusing KV cache for previously processed tokens, but limited by strict prefix matching. Position-independent caching (PIC) enables chunk-level reuse at arbitrary positions, but requires selective recomputation and positional-encoding (PE) adjustments. However, because these operations vary across queries, KV for the same chunk diverges across requests. Moreover, without page alignment, chunk KV layouts diverge in memory, preventing page sharing. These issues result in only modest HBM savings even when many requests reuse the same content. We present MEPIC, a memory-efficient PIC system that enables chunk KV reuse across positions, requests, and batches. MEPIC aligns chunk KV to paged storage, shifts recomputation from token- to block-level so only the first block is request-specific, removes positional encodings via Rotary Position Embedding (RoPE) fusion in the attention kernel, and makes remaining blocks fully shareable. These techniques eliminate most duplicate chunk KV in HBM, reducing usage by up to 2x over state-of-the-art PIC at comparable latency and accuracy, and up to 5x for long prompts, without any model changes.
format Preprint
id arxiv_https___arxiv_org_abs_2512_16822
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle MEPIC: Memory Efficient Position Independent Caching for LLM Serving
Wang, Qian
Yousefijamarani, Zahra
Heisler, Morgan Lindsay
Gu, Rongzhi
Xiaolong, Bai
Yizhou, Shan
Zhang, Wei
Lan, Wang
Xiong, Ying
Zhang, Yong
Fan, Zhenan
Machine Learning
Modern LLM applications such as deep-research assistants, coding agents, and Retrieval-Augmented Generation (RAG) systems, repeatedly process long prompt histories containing shared document or code chunks, creating significant pressure on the Key Value (KV) cache, which must operate within limited memory while sustaining high throughput and low latency. Prefix caching partially alleviates some of these costs by reusing KV cache for previously processed tokens, but limited by strict prefix matching. Position-independent caching (PIC) enables chunk-level reuse at arbitrary positions, but requires selective recomputation and positional-encoding (PE) adjustments. However, because these operations vary across queries, KV for the same chunk diverges across requests. Moreover, without page alignment, chunk KV layouts diverge in memory, preventing page sharing. These issues result in only modest HBM savings even when many requests reuse the same content. We present MEPIC, a memory-efficient PIC system that enables chunk KV reuse across positions, requests, and batches. MEPIC aligns chunk KV to paged storage, shifts recomputation from token- to block-level so only the first block is request-specific, removes positional encodings via Rotary Position Embedding (RoPE) fusion in the attention kernel, and makes remaining blocks fully shareable. These techniques eliminate most duplicate chunk KV in HBM, reducing usage by up to 2x over state-of-the-art PIC at comparable latency and accuracy, and up to 5x for long prompts, without any model changes.
title MEPIC: Memory Efficient Position Independent Caching for LLM Serving
topic Machine Learning
url https://arxiv.org/abs/2512.16822