English

A Method for Building Large Language Models with Predefined KV Cache Capacity

Computation and Language 2024-11-28 v2

Abstract

This paper introduces a novel approach, the Bounded-Cache Transformer (BCT), for building large language models with a predefined Key-Value (KV) cache capacity. The BCT addresses the excessive memory consumption issue in traditional KV caches by implementing a bounded-length KV cache, which is particularly suitable for the attention layers in Transformer decode-only architectures. By dynamically updating the key-value vector sequences, the BCT achieves efficient inference within limited cache capacity, significantly reducing memory usage while maintaining model performance and system throughput. Experimental results demonstrate that the BCT significantly reduces memory usage while maintaining the model's inference quality, offering a new solution for efficient inference in large language models.

Keywords

Cite

@article{arxiv.2411.15785,
  title  = {A Method for Building Large Language Models with Predefined KV Cache Capacity},
  author = {Zhonghua Yi and Ge Niu and Lei Wang and Wei Tang and Liqiu Zhang},
  journal= {arXiv preprint arXiv:2411.15785},
  year   = {2024}
}
R2 v1 2026-06-28T20:10:24.564Z