1比特大模型量化新方法,动态调节采样率实现高效推理
SDQ-LLM: Sigma-Delta Quantization for 1-bit LLMs of any size
- 通过Sigma-Delta量化与可调过采样率,将模型权重压缩至1比特
- 在低采样率下仍保持高精度,支持任意规模大模型部署
- 适合资源受限场景下的大模型高效推理,如移动端或边缘设备
大型语言模型(LLMs)面临严重的计算与内存挑战,因此极低比特量化对高效部署至关重要。本文提出SDQ-LLM:一种适用于任意规模的1比特大模型量化框架,通过连续可调的过采样比(OSR),在模型大小与精度间实现动态平衡。该方法结合上采样与Sigma-Delta量化器,将权重二值化或三值化,将线性层中的乘法操作替换为加法,显著提升极低比特下的推理效率。为减少量化精度损失,引入基于Hadamard的权重平滑预处理,增强权重表示的稳定性。进一步针对量化敏感性与权重方差的相关性,提出细粒度的分层与逐线性层分配策略MultiOSR,按权重方差和参数尺度分布OSR。在OPT与LLaMA模型族上的大量实验表明,即使在极激进的低OSR设置下,SDQ-LLM仍能实现更高效率与高精度性能。代码已开源。
原文摘要 · Abstract (English)
Large language models (LLMs) face significant computational and memory challenges, making extremely low-bit quantization crucial for their efficient deployment. In this work, we introduce SDQ-LLM: Sigma-Delta Quantization for 1-bit LLMs of any size, a novel framework that enables extremely low-bit quantization of LLMs while preserving their linguistic reasoning capabilities. A distinctive feature of SDQ-LLM is the continuous adjustability of the Over-Sampling Ratio (OSR), enabling dynamic adaptation to memory or VRAM constraints by selecting fractional OSR (e.g. 2.5 times) for an optimal trade-off between model size and accuracy. SDQ-LLM uses upsampling combined with Sigma-Delta Quantizer to binarize or ternarize LLMs weights, encoding high-precision parameters into 1-bit or 1.58-bit representations, replacing the multiplication operations within linear layers with addition. This approach significantly enhances inference efficiency under extremely low-bit quantization. To further reduce the loss of quantization precision, we incorporate Hadamard-based weight smoothing prior to quantization, improving the stability and robustness of the weight representations. Furthermore, to fully leverage the continuity of the OSR and reduce precision loss, recognizing the correlation between quantization sensitivity and weight variance, we propose a fine-grained, layer- and linear-wise OSR allocation strategy, MultiOSR. This strategy distributes OSR both across layers and within each layer, based on weight variance and parameter scale. Finally, extensive experiments on OPT and LLaMA model families demonstrate that SDQ-LLM achieves a more efficient and high-precision performance even under highly aggressive low-OSR settings. Our code is available at https://github.com/Dreamlittlecat/LLM-Quant-Factory.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。