提出简单高效的低比特量化方法,显著提升大模型压缩效果。
SEPTQ: A Simple and Effective Post-Training Quantization Paradigm for Large Language Models
- 基于权重重要性静态确定量化位置,分步更新权重矩阵
- 在低比特(如4位)下仍保持高质量生成能力,性能超越现有方法
- 适合资源受限设备部署,尤其适用于追求高效压缩的场景
大型语言模型在多个领域表现出色,但其巨大的计算与存储开销限制了在资源受限设备上的应用。量化是压缩模型以适配低资源环境的有效技术,主要分为量化感知训练(QAT)和后训练量化(PTQ)。QAT需额外微调,成本高,不适用于大模型;因此,PTQ成为当前研究热点。然而,现有PTQ方法通常依赖复杂计算流程,在低比特设置下性能下降明显。为此,本文提出一种名为SEPTQ的简单高效后训练量化范式。首先,通过静态全局方式计算权重矩阵中每个元素的重要性得分,确定量化位置;随后,利用掩码矩阵按列逐次量化并更新相关权重,直至获得合适的量化权重矩阵。相比以往方法,SEPTQ将过程简化为仅两步,兼顾有效性与效率。在涵盖数百万至数十亿参数的多种模型上,不同数据集和比特位下的实验结果表明,SEPTQ显著优于现有强基线,尤其在低比特(如4位)量化场景下表现突出。
原文摘要 · Abstract (English)
Large language models (LLMs) have shown remarkable performance in various domains, but they are constrained by massive computational and storage costs. Quantization, an effective technique for compressing models to fit resource-limited devices while preserving generative quality, encompasses two primary methods: quantization aware training (QAT) and post-training quantization (PTQ). QAT involves additional retraining or fine-tuning, thus inevitably resulting in high training cost and making it unsuitable for LLMs. Consequently, PTQ has become the research hotspot in recent quantization methods. However, existing PTQ methods usually rely on various complex computation procedures and suffer from considerable performance degradation under low-bit quantization settings. To alleviate the above issues, we propose a simple and effective post-training quantization paradigm for LLMs, named SEPTQ. Specifically, SEPTQ first calculates the importance score for each element in the weight matrix and determines the quantization locations in a static global manner. Then it utilizes the mask matrix which represents the important locations to quantize and update the associated weights column-by-column until the appropriate quantized weight matrix is obtained. Compared with previous methods, SEPTQ simplifies the post-training quantization procedure into only two steps, and considers the effectiveness and efficiency simultaneously. Experimental results on various datasets across a suite of models ranging from millions to billions in different quantization bit-levels demonstrate that SEPTQ significantly outperforms other strong baselines, especially in low-bit quantization scenarios.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。