arrow
Return

FINCH: Prompt-guided Key-Value Cache Compression for Large Language Models

delete2024-11-18
delete0
delete
OA
AI
G
Giulio Corallo *
P
Paolo Papotti
DOI:10.1162/tacl_a_00716delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
Recent large language model applications, such as Retrieval-Augmented Generation and chatbots, have led to an increased need to process longer input contexts. However, this requirement is hampered by inherent limitations. Architecturally, models are constrained by a context window defined during training. Additionally, processing extensive texts requires substantial GPU memory. We propose a novel approach, Finch, to compress the input context by leveraging the pre-trained model weights of the self-attention. Given a prompt and a long text, Finch iteratively identifies the most relevant Key (K) and Value (V) pairs over chunks of the text conditioned on the prompt. Only such pairs are stored in the KV cache, which, within the space constrained by the context window, ultimately contains a compressed version of the long text. Our proposal enables models to consume large inputs even with high compression (up to 93x) while preserving semantic integrity without the need for fine-tuning.

Journal

T
Transactions of the Association for Computational Linguistics
IF:
6.9
Papers:
486
Citations:
5.7K

Organization

I
imt - institut mines-telecom
Scholars:
7.4K
Papers: 6.4K
Citations: 5
EURECOM cover
EURECOM
Scholars:
250
Papers: 240
Citations: 62