RPTQ:面向大型语言模型的基于重排序的训练后量化
RPTQ: Reorder-based Post-training Quantization for Large Language Models
AI总结:
针对LLMs激活量化中通道范围差异的挑战,提出基于重排序的RPTQ方法,通过通道聚类量化并融合操作降低开销,首次实现3位激活量化,最高减少80%内存。
摘要:
大型语言模型(LLMs)展示了出色的性能,但其部署因显著的内存占用而面临挑战。通过量化可以缓解这一问题。在本文中,我们发现量化LLMs中激活值的挑战源于不同通道间范围的差异,而不仅仅是异常值的存在。为应对这一挑战,我们引入了一种名为RPTQ的量化方法,该方法采用基于重排序的方法。通过重新排列通道并以簇为单位进行量化,RPTQ有效缓解了通道间范围差异的影响。为了最小化重排序操作的开销,我们将其融合到层归一化操作和线性层的权重中。在我们的实验中,RPTQ首次在LLMs中利用3位激活值取得了重大突破,显著减少了内存使用。例如,量化OPT-175b可使内存消耗减少高达80%。
英文摘要:
Large-scale language models (LLMs) have demonstrated impressive performance, but their deployment presents challenges due to their significant memory usage. This issue can be alleviated through quantization. In this paper, we identify that the challenge in quantizing activations in LLMs arises from varying ranges across channels, rather than solely the presence of outliers. To address this challenge, we introduce a quantization method called RPTQ, which utilizes a reorder-based approach. By rearranging the channels and quantizing them in clusters, RPTQ effectively mitigates the impact of range differences between channels. To minimize the overhead of the reorder operation, we fuse it into the layer norm operation and weights in linear layers. In our experiments, RPTQ achieved a significant breakthrough by utilizing 3-bit activation in LLMs for the first time, resulting in a substantial reduction in memory usage. For instance, quantizing OPT-175b can lead to a memory consumption reduction of up to 80%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。