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

Preprint · Zhonghua Yi, Ge Niu, Lei Wang, Wei Tang, Liqiu Zhang

- Archive id: arxiv:2411.15785
- Published: 2024-11-24
- arXiv: https://arxiv.org/abs/2411.15785
- Citations: 0
- Source URL: https://arxiv.org/abs/2411.15785
- PDF: https://arxiv.org/pdf/2411.15785
- Provenance: arxiv

## 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.

_Abstract reproduced under CC0-1.0 (arXiv descriptive metadata)._

Topics: [Efficient Training & Inference](https://space-kitty.com/topics/efficient-ai)

---
Space Kitty Archive · https://space-kitty.com · API: https://space-kitty.com/api/v1 · MCP: https://space-kitty.com/mcp · Premium: $0.20/request via x402 (Base Sepolia (testnet)). Metadata: arXiv (CC0), OpenAlex (CC0), Europe PMC (CC BY/CC0 works), ClinicalTrials.gov.
