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

通道级混合精度量化用于大语言模型

Channel-Wise Mixed-Precision Quantization for Large Language Models

Department of Electrical and Computer Engineering, University of Virginia(电气与计算机工程系,弗吉尼亚大学);Kneron Inc.(芯驰科技)

Zihan Chen, Bike Xie, Jundong Li, Cong Shen

AI总结:

本文提出通道级混合精度量化(CMPQ),通过根据激活分布分配不同精度级别来优化大语言模型的量化过程,从而在低比特范围内实现任意平均比特宽度,并在内存使用增加有限的情况下提升性能。

摘要:

大型语言模型(LLMs)在多种语言任务上表现出色,但其在边缘设备上的部署仍面临挑战,因为其大规模参数导致内存需求大。权重仅量化提供了一种减少LLM内存足迹的有希望的解决方案。然而,现有方法主要集中在整数比特量化上,限制了它们对分数比特量化任务的适应性,并阻碍了设备上可用存储空间的充分利用。在本文中,我们引入了通道级混合精度量化(CMPQ),一种新颖的混合精度量化方法,根据激活分布在通道级分配量化精度。通过将不同精度级别分配给不同的权重通道,CMPQ支持低比特范围(例如2到4比特)内的任意平均比特宽度。CMPQ采用非均匀量化策略,并结合两种异常值提取技术,共同保留关键信息,从而最小化量化损失。在九种不同LLM上的实验表明,CMPQ不仅在整数比特量化任务中提高了性能,而且通过以混合精度方式进行处理,在内存使用增加有限的情况下实现了显著的性能提升。CMPQ代表了一种适应性强且有效的LLM量化方法,在各种设备能力下提供了显著的好处。

英文摘要:

Large Language Models (LLMs) have demonstrated remarkable success across a wide range of language tasks, but their deployment on edge devices remains challenging due to the substantial memory requirements imposed by their large parameter sizes. Weight-only quantization presents a promising solution to reduce the memory footprint of LLMs. However, existing approaches primarily focus on integer-bit quantization, limiting their adaptability to fractional-bit quantization tasks and preventing the full utilization of available storage space on devices. In this paper, we introduce Channel-Wise Mixed-Precision Quantization (CMPQ), a novel mixed-precision quantization method that allocates quantization precision in a channel-wise pattern based on activation distributions. By assigning different precision levels to different weight channels, CMPQ supports arbitrary average bit-widths in the low-bit regime (e.g., between 2 and 4 bits). CMPQ employs a non-uniform quantization strategy and incorporates two outlier extraction techniques that collaboratively preserve the critical information, thereby minimizing the quantization loss. Experiments on nine different LLMs demonstrate that CMPQ not only enhances performance in integer-bit quantization tasks but also achieves significant performance gains with a modest increase in memory usage by performing in a mixed-precision way. CMPQ represents an adaptive and effective approach to LLM quantization, offering substantial benefits across diverse device capabilities.

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

↑