Towards More Economical Context-Augmented LLM Generation by Reusing Stored KV Cache

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Li, Hanchen, Liu, Yuhan, Cheng, Yihua, Du, Kuntai, Jiang, Junchen
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908274413010944
author Li, Hanchen
Liu, Yuhan
Cheng, Yihua
Du, Kuntai
Jiang, Junchen
author_facet Li, Hanchen
Liu, Yuhan
Cheng, Yihua
Du, Kuntai
Jiang, Junchen
contents Across large language model (LLM) applications, we observe an emerging trend for reusing KV caches to save the prefill delays of processing repeated input texts in different LLM inputs. This has led to a broad design space, including colocating stored KV caches with (or close to) GPUs to various KV cache compression. However, a key question remains unanswered: can these delay reductions also be economically favorable? Specifically, we ask whether a developer can use public cloud services to store precomputed KV caches and reuse them to save delay without incurring more costs in terms of compute, storage, and network. To answer this question, we propose an validated analytical model for the cloud cost (in compute, storage, and network) of storing and reusing KV caches based on various workload parameters, such as reuse frequency, generated text lengths, model sizes, etc. Preliminary results show that KV cache reusing is able to save both delay and cloud cost across a range of workloads with long context. And we call more efforts on building more economical context augmented LLM by KV cache reusing.
format Preprint
id arxiv_https___arxiv_org_abs_2503_14647
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Towards More Economical Context-Augmented LLM Generation by Reusing Stored KV Cache
Li, Hanchen
Liu, Yuhan
Cheng, Yihua
Du, Kuntai
Jiang, Junchen
Networking and Internet Architecture
Across large language model (LLM) applications, we observe an emerging trend for reusing KV caches to save the prefill delays of processing repeated input texts in different LLM inputs. This has led to a broad design space, including colocating stored KV caches with (or close to) GPUs to various KV cache compression. However, a key question remains unanswered: can these delay reductions also be economically favorable? Specifically, we ask whether a developer can use public cloud services to store precomputed KV caches and reuse them to save delay without incurring more costs in terms of compute, storage, and network. To answer this question, we propose an validated analytical model for the cloud cost (in compute, storage, and network) of storing and reusing KV caches based on various workload parameters, such as reuse frequency, generated text lengths, model sizes, etc. Preliminary results show that KV cache reusing is able to save both delay and cloud cost across a range of workloads with long context. And we call more efforts on building more economical context augmented LLM by KV cache reusing.
title Towards More Economical Context-Augmented LLM Generation by Reusing Stored KV Cache
topic Networking and Internet Architecture
url https://arxiv.org/abs/2503.14647