提出3BASiL框架,高效压缩大模型且保持高精度。
3BASiL: An Algorithmic Framework for Sparse plus Low-Rank Compression of LLMs
- 用三块交替方向乘子法优化稀疏与低秩分解,保证收敛。
- 在LLaMA-8B上使困惑度差距降低30%以上,优于现有方法。
- 兼容多种压缩方式,适合追求快速部署的工程师。
稀疏加低秩(S + LR)分解是大语言模型压缩的有前景方向,旨在将预训练模型权重分解为稀疏矩阵与低秩矩阵之和(W ≈ S + LR)。尽管已有进展,现有方法常导致显著性能下降。本文提出3BASiL-TM,一种高效的单次后训练压缩方法,解决该问题。首先引入新型三块交替方向乘子法(3BASiL),最小化层内重建误差并提供收敛性保证;随后设计高效的Transformer匹配(TM)精炼步骤,联合优化各Transformer层的稀疏与低秩成分,通过新型内存高效损失函数对齐层级输出。此过程具有通用性,可提升任意S + LR分解,包括纯稀疏方案。数值实验表明,在(2:4稀疏 + 64低秩)配置下,3BASiL-TM相较于密集模型在WikiText2上的困惑度差距降低超30%,且压缩速度比当前最优方法快2.5倍以上(基于A100 GPU)。代码已开源:https://github.com/mazumder-lab/3BASiL。
原文摘要 · Abstract (English)
Sparse plus Low-Rank $(\mathbf{S} + \mathbf{LR})$ decomposition of Large Language Models (LLMs) has emerged as a promising direction in model compression, aiming to decompose pre-trained model weights into a sum of sparse and low-rank matrices $(\mathbf{W} \approx \mathbf{S} + \mathbf{LR})$. Despite recent progress, existing methods often suffer from substantial performance degradation compared to dense models. In this work, we introduce 3BASiL-TM, an efficient one-shot post-training method for $(\mathbf{S} + \mathbf{LR})$ decomposition of LLMs that addresses this gap. Our approach first introduces a novel 3-Block Alternating Direction Method of Multipliers (ADMM) method, termed 3BASiL, to minimize the layer-wise reconstruction error with convergence guarantees. We then design an efficient transformer-matching (TM) refinement step that jointly optimizes the sparse and low-rank components across transformer layers. This step minimizes a novel memory-efficient loss that aligns outputs at the transformer level. Notably, the TM procedure is universal as it can enhance any $(\mathbf{S} + \mathbf{LR})$ decomposition, including pure sparsity. Our numerical experiments show that 3BASiL-TM reduces the WikiText2 perplexity gap relative to dense LLaMA-8B model by over 30% under a (2:4 Sparse + 64 LR) configuration, compared to prior methods. Moreover, our method achieves over 2.5x faster compression runtime on an A100 GPU compared to SOTA $(\mathbf{S} + \mathbf{LR})$ method. Our code is available at https://github.com/mazumder-lab/3BASiL.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。