AAAC: 面向4位LLM权重量化的激活感知自适应码本
AAAC: Activation-Aware Adaptive Codebooks for 4-bit LLM Weight Quantization
AI总结:
提出AAAC方法,通过每层两个小型学习码本(64字节)替代固定标量码本,以激活加权重建误差最小化选择码本,实现零额外存储开销的4位权重量化,在3-30分钟内完成量化,精度优于现有方法。
摘要:
训练后仅权重量化至4位被广泛用于减少大语言模型推理的内存和计算成本。现有的PTQ方法,如AWQ和GPTQ,通过缩放、裁剪或误差补偿改进权重映射到固定4位网格的方式。为进一步提高精度,OmniQuant和QuIP#等方法使用梯度辅助算法,但需要数小时的量化时间。在这项工作中,我们提出AAAC(激活感知自适应码本),一种用于4位LLM权重量化的轻量级方法。AAAC用每层两个小型学习标量码本(64字节)替换标准量化中使用的固定标量码本。每组权重选择使激活加权重建误差最小的码本,将选择编码在组正缩放的未使用符号位中,并增加零存储开销。AAAC在单个GPU上3-30分钟内完成,且不增加模型本身之外的额外内存。我们跨模型族与AWQ、GPTQ、IF4、GPTVQ、OmniQuant、SqueezeLLM和QuIP#进行评估。AAAC在量化时间少几个数量级的情况下优于基线方法。
英文摘要:
Post-training weight-only quantization to 4 bits is widely used to reduce the memory and compute costs of large language model inference. Existing PTQ methods, such as AWQ and GPTQ, improve how weights are mapped onto a fixed 4-bit grid through scaling, clipping, or error compensation. To further improve accuracy, methods such as OmniQuant and QuIP\# uses gradient-assisted algorithms at the cost of hours of quantization time. In this work, we propose AAAC (Activation-Aware Adaptive Codebooks), a lightweight method for 4-bit LLM weight quantization. AAAC replaces the fixed scalar codebook used in standard quantization with two small learned scalar codebooks (64 bytes) per layer. Each group of weights selects the codebook that minimizes activation-weighted reconstruction error, encoding the choice in the unused sign bit of the group's positive scale and adding zero storage overhead. AAAC completes in 3--30 minutes on a single GPU, and adds no memory beyond the model itself. We evaluate against AWQ, GPTQ, IF4, GPTVQ, OmniQuant, SqueezeLLM, and QuIP\# across model families. AAAC outperforms baselines at orders-of-magnitude less quantization time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。