arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.17809cs.LG
收藏

自适应层级变换用于大语言模型的后训练量化

Adaptive Layer-Wise Transformations for Post-Training Quantization of Large Language Models

Department of Data Science and AI, Monash University, Australia(墨尔本大学数据科学与人工智能系);Centre for Vision, Speech and Signal Processing, University of Surrey, UK(萨里大学视觉、语音和信号处理中心)

Cuong Pham, Hoang Anh Dung, Cuong C. Nguyen, Trung Le, Gustavo Carneiro, Jianfei Cai, Thanh-Toan Do

AI总结:

本文提出自适应层级变换方法,通过优化每层变换类型,提升大语言模型在低比特量化下的性能。

摘要:

大语言模型需要大量的计算资源进行部署,这使得量化对于实际应用至关重要。然而,有效量化的主要障碍在于激活和权重中的系统性异常值,这些异常值导致LLM性能显著下降,尤其是在低比特设置下。虽然现有的基于变换的方法,如仿射和旋转变换,能够有效减轻异常值,但它们应用了同质变换设置,即在所有层上使用相同的变换类型,忽略了LLM内部的异质分布特性。在本文中,我们提出了一种自适应变换选择框架,系统地确定每层的最佳变换。为此,我们首先将变换选择建模为一个可微优化问题,以实现每层的准确变换类型。然而,为每个模型搜索最优的层级变换是计算上昂贵的。为此,我们建立了权重分布峰度与准确变换类型之间的联系。具体来说,我们提出了一种基于异常值的层选择方法,使用稳健的z分数标准化,以实现与可微搜索相当的性能,但计算开销显著减少。在LLaMA家族模型上的全面实验表明,我们的自适应方法在固定变换设置下始终表现更优。例如,我们的方法在激进的W3A3K2V2量化设置下,对于LLaMA-3-8B模型,相比当前最佳方法FlatQuant,实现了高达4.58个perplexity点的改进,并在平均六任务零样本准确率上提高了2.11%,证明了异质变换选择对于最优LLM量化的重要性。

英文摘要:

Large language models require significant computational resources for deployment, making quantization essential for practical applications. However, the main obstacle to effective quantization lies in systematic outliers in activations and weights, which cause substantial LLM performance degradation, especially at low-bit settings. While existing transformation-based methods like affine and rotation transformations successfully mitigate outliers, they apply the homogeneous transformation setting, i.e., using the same transformation types across all layers, ignoring the heterogeneous distribution characteristics within LLMs. In this paper, we propose an adaptive transformation selection framework that systematically determines optimal transformations on a per-layer basis. To this end, we first formulate transformation selection as a differentiable optimization problem to achieve the accurate transformation type for each layer. However, searching for optimal layer-wise transformations for every model is computationally expensive. To this end, we establish the connection between weight distribution kurtosis and accurate transformation type. Specifically, we propose an outlier-guided layer selection method using robust $z$-score normalization that achieves comparable performance to differentiable search with significantly reduced overhead. Comprehensive experiments on LLaMA family models demonstrate that our adaptive approach consistently outperforms the widely-used fixed transformation settings. For example, our method achieves an improvement of up to 4.58 perplexity points and a 2.11% gain in average six-task zero-shot accuracy under aggressive W3A3KV2 quantization settings for the LLaMA-3-8B model compared to the current best existing method, FlatQuant, demonstrating the necessity of heterogeneous transformation selection for optimal LLM quantization.

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

↑