WKVQuant: Quantizing Weight and Key/Value Cache for Large Language Models Gains More

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Yue, Yuxuan, Yuan, Zhihang, Duanmu, Haojie, Zhou, Sifan, Wu, Jianlong, Nie, Liqiang
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866909111785881600
author Yue, Yuxuan
Yuan, Zhihang
Duanmu, Haojie
Zhou, Sifan
Wu, Jianlong
Nie, Liqiang
author_facet Yue, Yuxuan
Yuan, Zhihang
Duanmu, Haojie
Zhou, Sifan
Wu, Jianlong
Nie, Liqiang
contents Large Language Models (LLMs) face significant deployment challenges due to their substantial memory requirements and the computational demands of auto-regressive text generation process. This paper addresses these challenges by focusing on the quantization of LLMs, a technique that reduces memory consumption by converting model parameters and activations into low-bit integers. We critically analyze the existing quantization approaches, identifying their limitations in balancing the accuracy and efficiency of the quantized LLMs. To advance beyond these limitations, we propose WKVQuant, a PTQ framework especially designed for quantizing weights and the key/value (KV) cache of LLMs. Specifically, we incorporates past-only quantization to improve the computation of attention. Additionally, we introduce two-dimensional quantization strategy to handle the distribution of KV cache, along with a cross-block reconstruction regularization for parameter optimization. Experiments show that WKVQuant achieves almost comparable memory savings to weight-activation quantization, while also approaching the performance of weight-only quantization.
format Preprint
id arxiv_https___arxiv_org_abs_2402_12065
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle WKVQuant: Quantizing Weight and Key/Value Cache for Large Language Models Gains More
Yue, Yuxuan
Yuan, Zhihang
Duanmu, Haojie
Zhou, Sifan
Wu, Jianlong
Nie, Liqiang
Machine Learning
Artificial Intelligence
Computation and Language
Large Language Models (LLMs) face significant deployment challenges due to their substantial memory requirements and the computational demands of auto-regressive text generation process. This paper addresses these challenges by focusing on the quantization of LLMs, a technique that reduces memory consumption by converting model parameters and activations into low-bit integers. We critically analyze the existing quantization approaches, identifying their limitations in balancing the accuracy and efficiency of the quantized LLMs. To advance beyond these limitations, we propose WKVQuant, a PTQ framework especially designed for quantizing weights and the key/value (KV) cache of LLMs. Specifically, we incorporates past-only quantization to improve the computation of attention. Additionally, we introduce two-dimensional quantization strategy to handle the distribution of KV cache, along with a cross-block reconstruction regularization for parameter optimization. Experiments show that WKVQuant achieves almost comparable memory savings to weight-activation quantization, while also approaching the performance of weight-only quantization.
title WKVQuant: Quantizing Weight and Key/Value Cache for Large Language Models Gains More
topic Machine Learning
Artificial Intelligence
Computation and Language
url https://arxiv.org/abs/2402.12065