Summary of Residual Vector Quantization For Kv Cache Compression in Large Language Model, by Ankur Kumar
Residual vector quantization for KV cache compression in large language model
by Ankur Kumar
First submitted to arxiv on: 21 Oct 2024
Categories
- Main: Machine Learning (cs.LG)
- Secondary: None
GrooveSquid.com Paper Summaries
GrooveSquid.com’s goal is to make artificial intelligence research accessible by summarizing AI papers in simpler terms. Each summary below covers the same AI paper, written at different levels of difficulty. The medium difficulty and low difficulty versions are original summaries written by GrooveSquid.com, while the high difficulty version is the paper’s original abstract. Feel free to learn from the version that suits you best!
Summary difficulty | Written by | Summary |
---|---|---|
High | Paper authors | High Difficulty Summary Read the original abstract here |
Medium | GrooveSquid.com (original content) | Medium Difficulty Summary The authors propose a novel approach to compressing KV caches in large language models using residual vector quantization, which has been successful in audio compression. They adapt the technique to compress key and value projection matrices in pre-trained LLMs by scaling, grouping, and quantizing the output vectors. The codebook is learned using exponential moving average, with no other learnable parameters. Experiments show that a residual depth of 8 recovers most of the unquantized model’s performance, while grouping non-contiguous channels works better for compressing key matrices. Finetuning LLMs with quantization also improves results. The proposed method is competitive with existing techniques and achieves 5.5x compression compared to half-precision. |
Low | GrooveSquid.com (original content) | Low Difficulty Summary Large language models can store lots of data in their KV caches, but this takes up a lot of memory. The authors came up with a new way to compress these caches using an idea that works well for audio files. They took the same basic approach and adjusted it so it works better for language models. It’s really simple, which is great because it makes it easier to use. When they tested it, they found that most of the time, it recovered almost as well as not compressing at all. The way they grouped channels together also made a big difference. Overall, this new method is pretty good and can even shrink the size of the data by 5.5 times compared to using half-precision. |
Keywords
* Artificial intelligence * Precision * Quantization