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.


翻译:权重量化是实现现代深度学习模型高效训练与部署的关键技术。然而,量化格式的种类繁多,其选择往往依赖于经验。本文提出了一种用于系统化设计与分析量化格式的框架。通过将格式设计问题与经典量化理论相联系,我们证明了流行格式之所以具有优异的实际性能,源于其利用变长编码表示数值的能力。我们将该问题形式化为在模型大小约束下最小化原始模型与量化模型输出之间的KL散度,该问题可近似为最小化平方量化误差——这是一个已有深入研究的课题,其中采用变长编码的熵约束量化器是最优的。我们针对多种分布族开发了适用于块缩放数据的非线性量化曲线,并观察到这些格式(连同稀疏异常值格式)始终优于定长格式,表明它们同样利用了变长编码机制。最后,通过利用费舍尔信息与KL散度之间的关系,我们推导出模型中各层参数张量的最优位宽分配方案,将其应用于大型语言模型时,可节省高达每参数0.25比特的存储开销。

0
下载
关闭预览

相关内容

【干货书】决策优化模型,640页pdf
专知会员服务
79+阅读 · 2023年5月4日
南大《优化方法 (Optimization Methods》课程,推荐!
专知会员服务
80+阅读 · 2022年4月3日
专知会员服务
21+阅读 · 2021年8月17日
多因素问题分析时,如何确立各因素权重?
人人都是产品经理
75+阅读 · 2020年3月4日
神经网络中的权重初始化一览:从基础到Kaiming
大数据文摘
12+阅读 · 2019年4月18日
机器学习中的最优化算法总结
人工智能前沿讲习班
22+阅读 · 2019年3月22日
量化投资精品书籍
平均机器
18+阅读 · 2018年12月21日
超全总结:神经网络加速之量化模型 | 附带代码
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月12日
Arxiv
0+阅读 · 2月5日
VIP会员
最新内容
《无人机革命:来自俄乌战场的启示》(报告)
专知会员服务
0+阅读 · 14分钟前
《实现联合作战能力所需的技术》58页报告
专知会员服务
0+阅读 · 32分钟前
以色列运用人工智能优化空袭警报系统
专知会员服务
0+阅读 · 42分钟前
以色列在多条战线部署AI智能体
专知会员服务
0+阅读 · 50分钟前
2025年大语言模型进展报告
专知会员服务
12+阅读 · 4月25日
多智能体协作机制
专知会员服务
11+阅读 · 4月25日
非对称优势:美海军开发低成本反无人机技术
专知会员服务
9+阅读 · 4月25日
《美战争部小企业创新研究(SBIR)计划》
专知会员服务
8+阅读 · 4月25日
《军事模拟:将军事条令与目标融入AI智能体》
专知会员服务
12+阅读 · 4月25日
【NTU博士论文】3D人体动作生成
专知会员服务
9+阅读 · 4月24日
相关基金
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员