Weight-only quantization has become a standard approach for efficiently serving large language models (LLMs). However, existing methods fail to efficiently compress models to binary (1-bit) levels, as they either require large amounts of data and compute or incur additional storage. In this work, we propose NanoQuant, the first post-training quantization (PTQ) method to compress LLMs to both binary and sub-1-bit levels. NanoQuant formulates quantization as a low-rank binary factorization problem, and compresses full-precision weights to low-rank binary matrices and scales. Specifically, it utilizes an efficient alternating direction method of multipliers (ADMM) solver to precisely initialize latent binary matrices and scales, and then tunes the initialized parameters through a block and model reconstruction process. Consequently, NanoQuant establishes a new Pareto frontier in low-memory post-training quantization, and enables sub-1-bit compression. NanoQuant makes large-scale deployment feasible on consumer hardware. For example, it compresses Llama2-70B by 25.8$\times$ in just 13 hours on a single H100, enabling a 70B model to operate on a consumer 8 GB GPU. Code is available at https://github.com/SamsungLabs/NanoQuant.


翻译:权重量化已成为高效部署大语言模型的标准方法。然而,现有方法无法有效将模型压缩至二进制(1比特)层级,因其或需消耗大量数据与计算资源,或导致额外存储开销。本文提出NanoQuant——首个能将大语言模型压缩至二进制及亚1比特层级的训练后量化方法。NanoQuant将量化问题建模为低秩二进制分解,将全精度权重压缩为低秩二进制矩阵与缩放因子。具体而言,该方法利用高效的交替方向乘子法求解器精确初始化潜在二进制矩阵与缩放因子,随后通过逐块与逐模型重构过程对初始化参数进行调优。由此,NanoQuant在低内存训练后量化领域建立了新的帕累托前沿,并实现了亚1比特压缩。该方法使大规模部署在消费级硬件上成为可能。例如,在单个H100 GPU上,NanoQuant仅用13小时便将Llama2-70B压缩25.8倍,使70B模型得以在8GB显存的消费级GPU上运行。代码已开源至https://github.com/SamsungLabs/NanoQuant。

0
下载
关闭预览

相关内容

【CMU博士论文】大型语言模型的隐性特性
专知会员服务
15+阅读 · 2025年10月18日
低比特大语言模型综述:基础、系统与算法
专知会员服务
28+阅读 · 2024年10月6日
科学语言建模:大型语言模型在分子科学中的量化综述
专知会员服务
31+阅读 · 2024年2月8日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
超全总结:神经网络加速之量化模型 | 附带代码
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
6+阅读 · 6月17日
定向能反无人机系统最新发展动态
专知会员服务
7+阅读 · 6月17日
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
4+阅读 · 6月17日
相关基金
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
8+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员