一个模型支持多种精度推理,无需重训练。
Multi-Bitwidth Quantization for LLMs Using Additive Codebooks

- 用叠加码本实现多比特位量化,按需调整精度。
- 单个模型在不同位宽下保持低困惑度和高准确率。
- 适合资源受限设备部署,兼容Qwen、LLaMA等主流模型。
随着大语言模型(LLMs)在异构硬件上广泛部署,如何在不重新训练的情况下自适应地平衡性能与效率至关重要。本文提出一种名为Drop-by-Drop的新型多比特位后训练量化框架,可在推理时对模型权重进行精度调控。该方法基于信息论与逐次细化理论,证明了遵循高斯分布的模型权重在加权均方误差损失(由LLM损失函数驱动)下,可随比特数增加逐步提升重建质量。为实现这一目标,算法将马特里什卡式监督引入损失函数,利用叠加码本结构,使码本的有序子集在不同精度层级上生成高保真部分重构。该方法仅需一个检查点即可支持多种比特宽度,显著降低存储与内存开销,同时在Qwen、LLaMA、Gemma和Mistral等主流架构上保持竞争力的困惑度与准确率。
原文摘要 · Abstract (English)
As large language models (LLMs) are increasingly deployed across heterogeneous hardware with varying resource constraints, the ability to adaptively manage the trade-off between performance and efficiency without retraining is critical. We propose Drop-by-Drop, a novel multi-bitwidth post-training quantization framework that enables inference-time precision control over LLM weights from a single trained model. Our method is theoretically grounded in information theory and successive refinement. We establish that LLM weights, which commonly follow a Gaussian distribution, can be optimally reconstructed with increasing fidelity as additional bits are incorporated, under a weighted mean squared error distortion motivated by LLM loss functions. To realize this in practice, Drop-by-Drop incorporates Matryoshka-style supervision into the loss function, exploiting the structure of additive codebooks. Drop-by-Drop produces a single model where ordered subsets of codebooks yield accurate partial reconstructions at each precision level. This approach significantly reduces storage and memory overhead by allowing a single checkpoint to serve multiple bitwidths, while maintaining competitive perplexity and accuracy across major architectures, such as Qwen, LLaMA, Gemma, and Mistral.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。