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

Rotated Runtime Smooth:用于准确INT4推理的免训练激活平滑器

Rotated Runtime Smooth: Training-Free Activation Smoother for accurate INT4 inference

Alibaba group(阿里巴巴集团);ISCAS(中国科学院软件研究所)

Ke Yi, Zengke Liu, Jianwei Zhang, Chengyuan Li, Tong Zhang, Junyang Lin, Jingren Zhou

AI总结:

本文提出了一种即插即用的免训练激活平滑器RRS,通过Runtime Smooth消除通道级异常值并结合旋转操作缓解尖峰异常值影响,有效解决了LLM的INT4量化问题,在LLaMA和Qwen系列上显著提升了精度并降低了困惑度。

摘要:

大型语言模型在扩大参数规模后展现出了令人瞩目的能力。然而,由于规模庞大,服务大型语言模型会带来巨大的计算和内存传输开销。量化方法已被用于降低服务成本和延迟。尽管如此,激活值中的异常值阻碍了INT4权重-激活量化的发展。现有方法将异常值和正常值分离到两个矩阵中,或将异常值从激活值迁移到权重中,这会导致高延迟或精度下降。基于对大型语言模型激活值的观察,异常值可分为通道级异常值和尖峰异常值。在本工作中,我们提出了Rotated Runtime Smooth(RRS),这是一种即插即用的量化激活平滑器,由Runtime Smooth和旋转操作组成。引入Runtime Smooth(RS)是为了在运行时利用通道最大值平滑激活值,从而消除通道级异常值。旋转操作可以缩小尖峰异常值与正常值之间的差距,减轻通道级平滑造成的受害者效应。所提出的方法在LLaMA和Qwen系列中优于最先进的方法,并将INT4推理的WikiText-2困惑度从57.33降至6.66。

英文摘要:

Large language models have demonstrated promising capabilities upon scaling up parameters. However, serving large language models incurs substantial computation and memory movement costs due to their large scale. Quantization methods have been employed to reduce service costs and latency. Nevertheless, outliers in activations hinder the development of INT4 weight-activation quantization. Existing approaches separate outliers and normal values into two matrices or migrate outliers from activations to weights, suffering from high latency or accuracy degradation. Based on observing activations from large language models, outliers can be classified into channel-wise and spike outliers. In this work, we propose Rotated Runtime Smooth (RRS), a plug-and-play activation smoother for quantization, consisting of Runtime Smooth and the Rotation operation. Runtime Smooth (RS) is introduced to eliminate channel-wise outliers by smoothing activations with channel-wise maximums during runtime. The rotation operation can narrow the gap between spike outliers and normal values, alleviating the effect of victims caused by channel-wise smoothing. The proposed method outperforms the state-of-the-art method in the LLaMA and Qwen families and improves WikiText-2 perplexity from 57.33 to 6.66 for INT4 inference.

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

↑