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

大语言模型的统计无损量化

Statistically-Lossless Quantization of Large Language Models

ETH Zürich(苏黎世联邦理工学院);Red Hat AI(红帽人工智能部门);ISTA(奥地利科学技术研究所)

Michael Helcig, Eldar Kurtic, Dan Alistarh

AI总结:

本文提出统计无损压缩的中间路径,定义任务无损与分布无损的量化标准,证明对称与非对称量化的方差差异,通过SLQ方法实现大语言模型的任务无损、分布无损压缩及1.7-3.7倍推理加速。

摘要:

模型量化对于高效部署大语言模型已至关重要,但现有方法存在明显权衡:GPTQ、AWQ等方法实现了实用压缩,但属于有损压缩;而无损技术能保持保真度,但缺乏推理加速。本文探索统计无损压缩这一中间路径,研究量化大语言模型“无损”的三个互补方面。第一,任务无损压缩要求零样本基准精度保持在自然采样方差范围内,且可在激进位宽下实现。第二,我们形式化了更严格的分布无损压缩概念,要求量化模型的下一个token分布与原模型实际不可区分,并提出期望接受率(EAR),即最优耦合下的最大token一致概率,作为可直接解释的保真度指标;例如,EAR≥0.99表示99%的一致性。第三,我们证明了伽马平方方差定律,表明对称量化相比非对称量化会使噪声方差放大γ²倍,这使得非对称量化成为分布无损保真度的必要条件,但并非任务级保存的必要条件。通过SLQ(一种采用非对称量化和宽位宽搜索的分层非均匀方法),我们实现了每参数远低于4比特的任务无损压缩,低至3.3比特(具体取决于模型),平均每参数5-6比特的分布无损压缩,且使用优化内核相比FP16实现了1.7-3.7倍的推理加速。源代码可在[该URL](该URL)获取。

英文摘要:

Model quantization has become essential for efficient large language model deployment, yet existing approaches present clear trade-offs: methods such as GPTQ and AWQ achieve practical compression but are lossy, while lossless techniques preserve fidelity but lack inference acceleration. This paper explores the middle ground of statistically-lossless compression, examining three complementary aspects of what losslessness means for quantized LLMs. First, task-lossless compression preserves zero-shot benchmark accuracy within natural sampling variance and is achievable at aggressive bitwidths. Second, we formalize the stricter notion of distribution-lossless compression, requiring the quantized model's next-token distribution to be practically indistinguishable from the original, and propose the Expected Acceptance Rate (EAR), the maximum token-agreement probability under optimal coupling, as a directly interpretable fidelity metric. For example, EAR >= 0.99 means 99% agreement. Third, we prove a gamma-squared variance law showing that symmetric quantization inflates noise variance by gamma^2 relative to asymmetric quantization, making asymmetric quantization a prerequisite for distribution-lossless fidelity but not for task-level preservation. Through SLQ, a layer-wise non-uniform method with asymmetric quantization and wide bitwidth search, we obtain task-lossless compression at well below 4 bits per parameter, as low as 3.3 bits depending on the model, distribution-lossless compression at 5-6 bits per parameter on average, and inference speedups of 1.7-3.7x compared to FP16 using optimized kernels. Source code is available at [https://github.com/IST-DASLab/SLQ](https://github.com/IST-DASLab/SLQ).

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

↑