arXiv:2510.10467cs.LGcs.AI2025-10被引 7

提出可灵活支持多精度推理的高效二值量化方法,显著提升低比特下大模型性能。

AnyBCQ: Hardware Efficient Flexible Binary-Coded Quantization for Multi-Precision LLMs

  • 将权重编码为二值位平面,支持按需激活不同精度
  • 2比特时准确率下降小,吞吐最高提升3.0倍
  • 适合需要动态精度调节的边缘部署场景

大语言模型部署受内存与延迟瓶颈制约,亟需灵活平衡精度与效率的量化技术。现有工作引入多精度模型,可在单个模型中根据运行时约束选择不同精度进行推理。为支持此灵活性,量化权重常以位平面形式存储,当计算直接在位平面层面进行并仅激活所需精度时,硬件效率更高。本文提出AnyBCQ,一种面向硬件优化的多精度二值编码量化扩展,支持直接位平面运算。通过将权重表示为带缩放因子的二值位平面,实现位平面级计算,并自然适配加速器友好的位并行算术。其渐进式精度扩展机制在重用已有二值编码的同时逐步优化缩放因子,使精度随启用位数单调提升。此外,我们协同设计专用内核,利用BCQ结构实现按请求动态选择精度,开销极低。在近期大语言模型上的实验表明,AnyBCQ显著缩小了低比特(如2比特)下的准确率损失,在高精度下仍具竞争力,相比半精度吞吐提升达3.0倍,较当前最优多精度方法提升1.2倍。通过算法灵活性与硬件效率的对齐,AnyBCQ为多精度大模型部署提供了实用基础。

原文摘要 · Abstract (English)

The deployment of large language models (LLMs) is increasingly constrained by memory and latency bottlenecks, motivating the need for quantization techniques that flexibly balance accuracy and efficiency. Recent work has introduced multi-precision models, which enable inference at multiple precisions within a single model depending on runtime constraints. To support such flexibility, quantized weights are often stored as bit-planes, where hardware efficiency improves when the compute operates directly at the bit-plane level and activates only the precision required by each request. In this work, we present AnyBCQ, a hardware-friendly multi-precision extension of Binary-Coded Quantization (BCQ) that supports direct bit-plane operations. By representing weights as binary bit-planes with corresponding scale factors, AnyBCQ enables bit-plane-level computation and maps naturally to accelerator-friendly, bit-parallel arithmetic. Our progressive precision expansion mechanism incrementally refines scaling factors while reusing previously assigned binary codes, yielding monotonic improvements in accuracy as additional bits are enabled. We further co-design a specialized kernel that exploits the BCQ structure to support dynamic per-request precision selection with negligible overhead. Experiments on recent LLMs demonstrate that AnyBCQ significantly narrows the accuracy drop in the low-bit regime (e.g. 2-bit), remains competitive at higher precision, and achieves throughput gains of up to 3.0x over half precision and 1.2x over state-of-the-art multi-precision methods. By aligning algorithmic flexibility with hardware efficiency, AnyBCQ provides a practical foundation for multi-precision LLM deployment across diverse service-level objectives.

量化多精度高效推理二值编码

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