arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2308.15987cs.CLcs.AIcs.LG
收藏

FPTQ:大型语言模型的细粒度训练后量化

FPTQ: Fine-grained Post-Training Quantization for Large Language Models

Meituan(美团);Nanjing University(南京大学)

Qingyuan Li, Yifan Zhang, Liang Li, Peng Yao, Bo Zhang, Xiangxiang Chu, Yerui Sun, Li Du, Yuchen Xie

AI总结:

针对大型语言模型部署难题,提出FPTQ方法,结合W4A8量化与逐层对数均衡激活量化及细粒度权重量化,无需微调即在BLOOM、LLaMA等模型上达到最先进性能。

摘要:

在大规模语言模型时代,庞大的参数量给部署带来了重大挑战。作为一种流行的压缩技术,量化已成为解决该问题的主流实践,主要集中在两种方案上:W8A8和W4A16(即权重和激活分别采用这样的位宽)。在本研究中,我们针对可用的开源大型语言模型提出了一种新颖的W4A8训练后量化方法,该方法结合了两种方案的优点。因此,我们能够利用4位权重量化在I/O利用率上的优势以及8位矩阵计算带来的加速。然而,W4A8面临着众所周知的性能下降问题。作为补救措施,我们引入了逐层激活量化策略,该策略针对大多数难以处理的层采用了新颖的对数均衡方法,并将其与细粒度权重量化相结合。无需额外技巧,我们消除了进一步微调的必要性,并在标准基准上针对BLOOM、LLaMA和LLaMA-2获得了最先进的W4A8量化性能。我们确认W4A8量化对于大型语言模型的部署是可行的,从而促进其在现实世界中的广泛应用。

英文摘要:

In the era of large-scale language models, the substantial parameter size poses significant challenges for deployment. Being a prevalent compression technique, quantization has emerged as the mainstream practice to tackle this issue, which is mainly centered on two recipes W8A8 and W4A16 (i.e. weights and activations in such bit widths). In this study, we propose a novel W4A8 post-training quantization method for the available open-sourced LLMs, which combines the advantages of both two recipes. Therefore, we can leverage the benefit in the I/O utilization of 4-bit weight quantization and the acceleration due to 8-bit matrix computation. Nevertheless, the W4A8 faces notorious performance degradation. As a remedy, we involve layerwise activation quantization strategies which feature a novel logarithmic equalization for most intractable layers, and we combine them with fine-grained weight quantization. Without whistles and bells, we eliminate the necessity for further fine-tuning and obtain the state-of-the-art W4A8 quantized performance on BLOOM, LLaMA, and LLaMA-2 on standard benchmarks. We confirm that the W4A8 quantization is achievable for the deployment of large language models, fostering their wide-spreading real-world applications.

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

↑