GQSA通过联合量化与稀疏化,显著提升大模型推理速度和压缩率。
GQSA: Group Quantization and Sparsity for Accelerating Large Language Model Inference
- 融合量化与结构化稀疏,实现高效模型压缩。
- 在W4S50%设置下,精度高于2:4剪枝和W2量化。
- 支持权重仅量化,适合部署于GPU加速场景。
模型压缩已成为降低内存占用和计算开销的主流方案。本文提出一种专为大语言模型设计的新型压缩技术——分组量化与稀疏加速(GQSA)。传统方法通常只采用量化或稀疏化单一策略,高压缩率下常导致性能显著下降。相比之下,GQSA以紧密耦合的方式结合量化与稀疏化,利用面向GPU优化的结构化分组稀疏性和量化机制实现高效加速。基于软硬件协同设计,提出两阶段稀疏优化策略,保障压缩模型的性能优势。在引擎端,首次引入‘任务中心’并行策略,提升稀疏计算效率。相较于传统的2:4稀疏方法,GQSA具备更灵活可调的稀疏率与更高的权重压缩率,并能高效兼容仅权重量化方法。实验表明,在W4S50%压缩设置下,模型精度优于2:4剪枝和W2量化;推理层面,GQSA相较W2提速1.26倍,较2:4剪枝提速2.35倍。
原文摘要 · Abstract (English)
Model compression has emerged as a mainstream solution to reduce memory usage and computational overhead. This paper presents Group Quantization and Sparse Acceleration (GQSA), a novel compression technique tailored for LLMs. Traditional methods typically focus exclusively on either quantization or sparsification, but relying on a single strategy often results in significant performance loss at high compression rates. In contrast, GQSA integrates quantization and sparsification in a tightly coupled manner, leveraging GPU-friendly structured group sparsity and quantization for efficient acceleration. Building upon system-algorithm co-design principles, we propose a two-stage sparse optimization strategy that ensures the performance superiority of the compressed model. On the engine side, we introduce a "task-centric" parallel strategy, which, to the best of our knowledge, is the first application in the domain of sparse computing. Compared to the traditional 2:4 sparse method, the GQSA offers a more flexible and adjustable sparsity rate, as well as a higher weight compression rate, and is efficiently compatible with weight-only quantization methods. Experimental results demonstrate that, under the GQSA W4S50% compression setting, the model's accuracy surpasses that of both 2:4 pruning and W2 quantization. Furthermore, at the inference level, GQSA outperforms W2 by 1.26$\times$ and 2:4 pruning by 2.35$\times$ in terms of speed.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。