arXiv:2505.12988cs.LG2025-05被引 1

提出系统化权重量化格式设计方法,提升模型压缩效率。

Optimal Formats for Weight Quantisation

  • 基于信息论构建量化框架,用变长编码优化表示能力。
  • 新格式在多类分布数据上优于固定长度格式,减少量化误差。
  • 推导出各层参数最优比特分配,大模型可省0.25比特/参数。

权重量化是实现现代深度学习模型高效训练与部署的关键技术。然而,量化格式选择常依赖经验,缺乏系统依据。本文提出一个系统化设计与分析量化格式的框架,将格式设计问题与经典量化理论关联。研究发现,主流格式表现优异的原因在于其利用变长编码表示数值。通过最小化原始与量化模型输出间的KL散度(在模型大小约束下),可近似为最小化平方量化误差,而带熵约束的变长编码量化器在此问题中为最优解。我们为多种分布类型的块缩放数据设计了非线性量化曲线,并观察到这些格式与稀疏异常值格式均显著优于固定长度格式,表明它们同样利用了变长编码特性。进一步结合费舍尔信息与KL散度的关系,推导出大型语言模型中各层参数张量的最优比特分配方案,最多可节省0.25比特/参数。

原文摘要 · Abstract (English)

Weight quantisation is an essential technique for enabling efficient training and deployment of modern deep learning models. However, the recipe book of quantisation formats is large and formats are often chosen empirically. In this paper, we propose a framework for systematic design and analysis of quantisation formats. By connecting the question of format design with the classical quantisation theory, we show that the strong practical performance of popular formats comes from their ability to represent values using variable-length codes. We frame the problem as minimising the KL divergence between original and quantised model outputs under a model size constraint, which can be approximated by minimising the squared quantisation error, a well-studied problem where entropy-constrained quantisers with variable-length codes are optimal. We develop non-linear quantisation curves for block-scaled data across multiple distribution families and observe that these formats, along with sparse outlier formats, consistently outperform fixed-length formats, indicating that they also exploit variable-length encoding. Finally, by using the relationship between the Fisher information and KL divergence, we derive the optimal allocation of bit-widths to individual parameter tensors across the model's layers, saving up to 0.25 bits per parameter when applied to large language models.

权重量化信息论模型压缩变长编码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。