arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2411.00850cs.LGcs.AIcs.CL
收藏

GWQ:面向大型语言模型的梯度感知权重量化

GWQ: Gradient-Aware Weight Quantization for Large Language Models

PKU(北京大学);CASIA(中国科学院自动化研究所);THU(清华大学);USTB(中国矿业大学);UNITN(意大利那不勒斯);ETHz(苏黎世联邦理工学院);PolyU(香港理工大学);UCAS(中国科学院大学)

Yihua Shao, Yan Gu, Siyu Chen, Haiyang Liu, Zixian Zhu, Zijian Ling, Minxi Yan, Ziyang Yan, Chenyu Zhang, Michele Magno, Haotong Qin, Yan Wang, Jingcai Guo, Ling Shao, Hao Tang

AI总结:

针对大型语言模型部署困难的问题,提出梯度感知权重量化方法(GWQ),利用梯度和少量校准数据定位异常值,保留前1%异常值为FP16精度,其余低比特存储,在多任务上优于其他方法并实现1.2倍推理加速。

摘要:

大型语言模型(LLMs)在解决复杂语言任务中展现出卓越的性能。然而,其庞大的参数量给部署带来了重大挑战。因此,将LLMs压缩至低比特能够使其部署在资源受限的设备上。为解决此问题,我们提出了梯度感知权重量化(GWQ),这是首个利用梯度来定位异常值的低比特权重量化方法,仅需极少量的校准数据即可进行异常值检测。GWQ将前1%的异常值优先保留为FP16精度,而其余非异常权重则以低比特存储。我们在不同任务上广泛评估了GWQ,包括语言建模、基础检测、大规模多任务语言理解以及视觉语言问答。结果表明,由GWQ量化的模型性能优于其他量化方法。在量化过程中,GWQ仅需一个校准集即可实现有效量化。此外,与原始模型相比,GWQ实现了1.2倍的推理加速,并有效降低了推理内存。

英文摘要:

Large language models (LLMs) show impressive performance in solving complex language tasks. However, its large number of parameters presents significant challenges for the deployment. So, compressing LLMs to low bits can enable to deploy on resource-constrained devices. To address this problem, we propose gradient-aware weight quantization (GWQ), the first quantization approach for low-bit weight quantization that leverages gradients to localize outliers, requiring only a minimal amount of calibration data for outlier detection. GWQ retains the top 1\% outliers preferentially at FP16 precision, while the remaining non-outlier weights are stored in a low-bit. We widely evaluate GWQ on different task include language modeling, grounding detection, massive multitask language understanding and vision-language question and answering. Results show that models quantified by GWQ performs better than other quantization method. During quantization process, GWQ only need one calibration set to realize effective quant. Also, GWQ achieves 1.2x inference speedup in comparison to the original model and effectively reduces the inference memory.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑