StagQ: Constraint-Driven Multi-Precision Weight Quantization for LLMs
作者: Zhe Wei, Mengqi Guo, Yuan Yuan, Jiunn Bin Lim, Boyi Pan, Michael Bi Mi
分类: cs.LG, cs.CL
发布日期: 2026-10-05
备注: 17 pages, 4 figures, 8 tables
💡 一句话要点
提出StagQ以解决大语言模型的多精度权重量化问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 多精度量化 大语言模型 权重优化 计算效率 自然语言处理
📋 核心要点
- 现有方法在服务大型语言模型时面临多种权重精度的存储和计算效率问题,导致资源浪费和性能瓶颈。
- StagQ通过设计一种主流为2位的组-wise仿射基和可配置的1位细化平面,提供高效的多精度权重格式,优化了存储和计算。
- 实验结果显示,StagQ在多个基准模型上超越了现有多精度基线,尤其在2位和3位配置中表现出显著的性能提升。
📝 摘要(中文)
在多个部署中服务大型语言模型(LLM)需要多种权重精度操作点。多精度格式通过一个流提供所有精度,前缀为有效的低精度代码,避免存储多个副本。本文提出StagQ,一种多精度权重格式,其主流为2位组-wise仿射基,后跟可配置数量的1位细化平面,采用二进制步长调度。每个支持的精度都是可读前缀,通过共享的元数据解码,无需每个权重查找。稀疏侧记录在网格拟合前后填充,保存最差的少量权重。实验表明,在Llama-3.1-8B、Phi-4和OLMo-2-7B上,2位配置的性能优于最强的多精度基线,提升3.1到7.0 MMLU点。
🔬 方法详解
问题定义:本文旨在解决在多个部署中服务大型语言模型时,权重精度多样性带来的存储和计算效率问题。现有方法通常需要存储多个权重副本,导致资源浪费和性能下降。
核心思路:StagQ提出了一种新的多精度权重格式,主流为2位组-wise仿射基,后续通过1位细化平面进行精度提升。通过共享元数据,避免了每个权重的查找,提高了效率。
技术框架:整体架构包括主流的2位仿射基和多个1位细化平面,采用二进制步长调度。每个精度通过可读前缀解码,稀疏侧记录用于保存最差的权重。
关键创新:StagQ的主要创新在于其多精度格式的设计,允许在不增加存储负担的情况下,灵活调整权重精度,显著提升了计算效率。
关键设计:在参数设置上,StagQ采用了2位和1位的组合,损失函数设计上优化了精度与效率的平衡,确保在不同模型上均能实现优异表现。实验中使用的NVIDIA A100 GPU也为性能提升提供了硬件支持。
🖼️ 关键图片
📊 实验亮点
实验结果显示,StagQ在Llama-3.1-8B、Phi-4和OLMo-2-7B上,2位配置的性能超越了最强的多精度基线,提升幅度达到3.1到7.0 MMLU点。在NVIDIA A100 GPU上,StagQ的矩阵-向量乘法性能在大多数情况下优于两个基线内核。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、机器翻译和对话系统等大型语言模型的部署。通过优化权重精度,StagQ能够在资源受限的环境中实现高效的模型推理,具有重要的实际价值和广泛的应用前景。
📄 摘要(原文)
Serving a large language model (LLM) across a fleet of deployments requires several weight-precision operating points. Multi-precision formats serve them all from one stream whose prefixes are valid lower-precision codes, instead of storing multiple copies. We present StagQ, a multi-precision weight format whose main stream is a 2-bit group-wise affine base followed by a configurable number of 1-bit refinement planes on a dyadic step schedule. Every supported precision is a readable prefix, decoded by an affine map derived from metadata shared across all precisions, with no per-weight lookup. A sparse side record, filled both before and after the grid is fitted, holds out the few weights the grid serves worst. We report two configurations of the encoder. At two bits the cheaper one leads the strongest multi-precision baseline on Llama-3.1-8B, Phi-4, and OLMo-2-7B by 3.1 to 7.0 MMLU points, at a slightly lower logical rate. At three bits it leads on Llama-3.1-8B, leads on Phi-4 at a higher rate, and ties on OLMo-2-7B. At four bits it ties on all three, at a higher rate. In a batch-one matrix-vector product on an NVIDIA A100 GPU, timed on synthetic weights, our kernel is faster than the two baseline kernels in most shape-precision cases.