LGCLJul 4, 2024

QET: Enhancing Quantized LLM Parameters and KV cache Compression through Element Substitution and Residual Clustering

arXiv:2407.03637v4h-index: 3
Originality Incremental advance
AI Analysis

This work addresses storage and efficiency challenges in LLMs by improving quantization for parameters and KV cache, though it appears incremental as it builds on existing matrix compression methods.

The paper tackles the problem of minimizing quantization error in matrix compression for large language models (LLMs) by proposing Quantum Entanglement Trees (QET), which reduces mean squared error (MSE) to 5.05%, 13.33%, and 11.89% of the current best method on LLM datasets, K cache, and V cache, respectively.

The matrix quantization entails representing matrix elements in a more space-efficient form to reduce storage usage, with dequantization restoring the original matrix for use. We formulate the Quantization Error Minimization (QEM) problem as minimizing the distance between a matrix before and after quantization, under the condition that the quantized matrix occupies the same memory space. Matrix quantization is crucial in various applications, including Large Language Models (LLMs) weight quantization, vector databases, KV cache quantization, graph compression, and image compression. Recent advancements in LLMs, such as GPT-4 and BERT, have highlighted the importance of matrix compression due to the large size of parameters and KV cache, which are stored as matrices. We propose Quantum Entanglement Trees (QET) to address the QEM problem by leveraging the local orderliness of matrix elements, involving iterative element swapping to form a locally ordered matrix. This matrix is then grouped and quantized by columns. To enhance QET, we introduce two optimizations: further quantizing residuals to reduce MSE, and using masking and batch processing to accelerate the algorithm. Experimental results demonstrate that QET can effectively reduce MSE to 5.05%, 13.33%, and 11.89% of the current best method on the LLM dataset, K cache, and V cache, respectively. Our contributions include the abstraction of the QEM problem, the design of the QET algorithm, and the proposal of two optimizations to improve accuracy and speed.

Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes