CLAQ: Pushing the Limits of Low-Bit Post-Training Quantization for LLMs

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wang, Haoyu, Liu, Bei, Shao, Hang, Xiao, Bo, Zeng, Ke, Wan, Guanglu, Qian, Yanmin
Natura: Preprint
Pubblicazione: 2024
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866913375043190784
author Wang, Haoyu
Liu, Bei
Shao, Hang
Xiao, Bo
Zeng, Ke
Wan, Guanglu
Qian, Yanmin
author_facet Wang, Haoyu
Liu, Bei
Shao, Hang
Xiao, Bo
Zeng, Ke
Wan, Guanglu
Qian, Yanmin
contents Parameter quantization for Large Language Models (LLMs) has attracted increasing attentions recently in reducing memory costs and improving computational efficiency. Early approaches have been widely adopted. However, the existing methods suffer from poor performance in low-bit (such as 2 to 3 bits) scenarios. In this paper, we present a novel and effective Column-Level Adaptive weight Quantization (CLAQ) framework by introducing three different types of adaptive strategies for LLM quantization. Firstly, a K-Means clustering based algorithm is proposed that allows dynamic generation of quantization centroids for each column of a parameter matrix. Secondly, we design an outlier-guided adaptive precision search strategy which can dynamically assign varying bit-widths to different columns. Finally, a dynamic outlier reservation scheme is developed to retain some parameters in their original float point precision, in trade off of boosted model performance. Experiments on various mainstream open source LLMs including LLaMA-1, LLaMA-2 and Yi demonstrate that our methods achieve the state-of-the-art results across different bit settings, especially in extremely low-bit scenarios. Code is available at https://github.com/fayuge/CLAQ.
format Preprint
id arxiv_https___arxiv_org_abs_2405_17233
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle CLAQ: Pushing the Limits of Low-Bit Post-Training Quantization for LLMs
Wang, Haoyu
Liu, Bei
Shao, Hang
Xiao, Bo
Zeng, Ke
Wan, Guanglu
Qian, Yanmin
Machine Learning
Parameter quantization for Large Language Models (LLMs) has attracted increasing attentions recently in reducing memory costs and improving computational efficiency. Early approaches have been widely adopted. However, the existing methods suffer from poor performance in low-bit (such as 2 to 3 bits) scenarios. In this paper, we present a novel and effective Column-Level Adaptive weight Quantization (CLAQ) framework by introducing three different types of adaptive strategies for LLM quantization. Firstly, a K-Means clustering based algorithm is proposed that allows dynamic generation of quantization centroids for each column of a parameter matrix. Secondly, we design an outlier-guided adaptive precision search strategy which can dynamically assign varying bit-widths to different columns. Finally, a dynamic outlier reservation scheme is developed to retain some parameters in their original float point precision, in trade off of boosted model performance. Experiments on various mainstream open source LLMs including LLaMA-1, LLaMA-2 and Yi demonstrate that our methods achieve the state-of-the-art results across different bit settings, especially in extremely low-bit scenarios. Code is available at https://github.com/fayuge/CLAQ.
title CLAQ: Pushing the Limits of Low-Bit Post-Training Quantization for LLMs
topic Machine Learning
url https://arxiv.org/abs/2405.17233