SPQ:一种用于大语言模型压缩的集成技术
SPQ: An Ensemble Technique for Large Language Model Compression
AI总结:
SPQ通过结合SVD、剪枝和量化技术,实现大语言模型的有效压缩,提升推理效率并保持模型性能。
摘要:
本研究提出了一种集成技术SPQ(SVD-Pruning-Quantization),用于大语言模型(LLM)压缩,结合了保留方差的奇异值分解(SVD)、基于激活的剪枝和后训练线性量化。每个组件针对不同的低效源:i)剪枝移除MLP层中的冗余神经元,ii)SVD将注意力投影压缩成紧凑的低秩因子,iii)8位量化均匀压缩所有线性层。在匹配的压缩比下,SPQ在困惑度上优于单独的方法(仅SVD、仅剪枝或仅量化),证明了结合互补技术的好处。应用于LLaMA-2-7B时,SPQ实现了高达75%的内存减少,同时保持或提高困惑度(例如,WikiText-2 5.47到4.91),并在下游基准如C4、TruthfulQA和GSM8K上保持准确性。与强大的基线如GPTQ和SparseGPT相比,SPQ在困惑度和准确性上具有竞争力,同时使用更少的内存(6.86 GB vs. 7.16 GB for GPTQ)。此外,SPQ在GPTQ之上提高了推理吞吐量,达到最高1.9倍的加速,进一步增强了其在实际部署中的实用性。SPQ通过层感知和互补压缩技术实现的稳健压缩可能为内存受限环境中的LLM实际部署提供实用方案。代码可在:https://github.com/JiaminYao/SPQ_LLM_Compression/上获得。
英文摘要:
This study presents an ensemble technique, SPQ (SVD-Pruning-Quantization), for large language model (LLM) compression that combines variance-retained singular value decomposition (SVD), activation-based pruning, and post-training linear quantization. Each component targets a different source of inefficiency: i) pruning removes redundant neurons in MLP layers, ii) SVD reduces attention projections into compact low-rank factors, iii) and 8-bit quantization uniformly compresses all linear layers. At matched compression ratios, SPQ outperforms individual methods (SVD-only, pruning-only, or quantization-only) in perplexity, demonstrating the benefit of combining complementary techniques. Applied to LLaMA-2-7B, SPQ achieves up to 75% memory reduction while maintaining or improving perplexity (e.g., WikiText-2 5.47 to 4.91) and preserving accuracy on downstream benchmarks such as C4, TruthfulQA, and GSM8K. Compared to strong baselines like GPTQ and SparseGPT, SPQ offers competitive perplexity and accuracy while using less memory (6.86 GB vs. 7.16 GB for GPTQ). Moreover, SPQ improves inference throughput over GPTQ, achieving up to a 1.9x speedup, which further enhances its practicality for real-world deployment. The effectiveness of SPQ's robust compression through layer-aware and complementary compression techniques may provide practical deployment of LLMs in memory-constrained environments. Code is available at: https://github.com/JiaminYao/SPQ_LLM_Compression/
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。