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

Zhonghua Yi, Ge Niu, Lei Wang, Wei Tang, Liqiu Zhang
11/24/2024
cs.CL

No confident code implementation found for this paper.

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{yi2024method,
  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},
  year   = {2024},
  eprint = {2411.15785},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.15785v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.15785.svg)](https://codeofpaper.com/paper/2411.15785)

Discussion