Saved in:
Bibliographic Details
Main Authors: Yang, Huan, Zhang, Renji, Huang, Mingzhe, Wang, Weijun, Tang, Yin, Li, Yuanchun, Liu, Yunxin, Zhang, Deyu
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2503.16525
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918021906300928
author Yang, Huan
Zhang, Renji
Huang, Mingzhe
Wang, Weijun
Tang, Yin
Li, Yuanchun
Liu, Yunxin
Zhang, Deyu
author_facet Yang, Huan
Zhang, Renji
Huang, Mingzhe
Wang, Weijun
Tang, Yin
Li, Yuanchun
Liu, Yunxin
Zhang, Deyu
contents Recent advances in long-text understanding have pushed the context length of large language models (LLMs) up to one million tokens. It boosts LLMs's accuracy and reasoning capacity but causes exorbitant computational costs and unsatisfactory Time to First Token (TTFT). KV cache reuse, which reuses the exact same KV cache of prefixes and templates or shares similar ones but with extra selective recomputation, offers a promising way to tackle this issue. However, prior studies overlook the cross-request KV reuse and the attention deviations introduced by new tokens during the decoding stage. In this paper, we present a KV cache management module that shares the KV cache across requests under multi-tenant scenarios without sacrificing model accuracy. Our system, KVShare, enables accurate and efficient LLM serving by 1) a Dual-Stage High Deviation algorithm (DHD) that conditionally selects a small portion of KV cache to be recomputed during both prefill and decode phases, and 2) a cache-aware scheduler that prioritizes requests based on their KV cache hit rates and orchestrates continuous batching to achieve enhanced system efficiency and faster TTFT. Multi-task experiments conducted on models such as Qwen2.5-7B,Llama3.1-8B and Yi1.5-9B demonstrate that KVShare reduces TTFT by up to 9.39x and increases 1.2x of the throughput compared to the full KV recompute. Moreover, KVShare achieves 20.38% boost in terms of accuracy compared to SOTA methods.
format Preprint
id arxiv_https___arxiv_org_abs_2503_16525
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle KVShare: An LLM Service System with Efficient and Effective Multi-Tenant KV Cache Reuse
Yang, Huan
Zhang, Renji
Huang, Mingzhe
Wang, Weijun
Tang, Yin
Li, Yuanchun
Liu, Yunxin
Zhang, Deyu
Computation and Language
Artificial Intelligence
Recent advances in long-text understanding have pushed the context length of large language models (LLMs) up to one million tokens. It boosts LLMs's accuracy and reasoning capacity but causes exorbitant computational costs and unsatisfactory Time to First Token (TTFT). KV cache reuse, which reuses the exact same KV cache of prefixes and templates or shares similar ones but with extra selective recomputation, offers a promising way to tackle this issue. However, prior studies overlook the cross-request KV reuse and the attention deviations introduced by new tokens during the decoding stage. In this paper, we present a KV cache management module that shares the KV cache across requests under multi-tenant scenarios without sacrificing model accuracy. Our system, KVShare, enables accurate and efficient LLM serving by 1) a Dual-Stage High Deviation algorithm (DHD) that conditionally selects a small portion of KV cache to be recomputed during both prefill and decode phases, and 2) a cache-aware scheduler that prioritizes requests based on their KV cache hit rates and orchestrates continuous batching to achieve enhanced system efficiency and faster TTFT. Multi-task experiments conducted on models such as Qwen2.5-7B,Llama3.1-8B and Yi1.5-9B demonstrate that KVShare reduces TTFT by up to 9.39x and increases 1.2x of the throughput compared to the full KV recompute. Moreover, KVShare achieves 20.38% boost in terms of accuracy compared to SOTA methods.
title KVShare: An LLM Service System with Efficient and Effective Multi-Tenant KV Cache Reuse
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2503.16525