让大模型微调更高效:通过稀疏+低秩结合,节省一半存储并提速1.7倍。
Sparsity-Aware Low-Rank Representation for Efficient Fine-Tuning of Large Language Models
- 将低秩适配与稀疏剪枝融合,在均方误差框架下优化
- 实现50%稀疏度,模型大小减半,推理速度提升1.7倍
- 适合资源受限环境下的大模型部署与快速微调
将大规模预训练语言模型适配到下游任务通常需要微调数百万参数或部署昂贵的稠密权重更新,限制了其在资源受限环境中的应用。低秩适配(LoRA)通过分解权重更新减少可训练参数,但底层稠密权重仍带来高存储和计算开销。基于幅度的剪枝可生成稀疏模型,但直接应用会降低LoRA性能。本文提出SALR(Sparsity-Aware Low-Rank Representation),一种新的微调范式,将低秩适配与稀疏剪枝统一于严格的均方误差框架下。我们证明:仅对冻结的基础权重进行静态剪枝能最小化剪枝误差上界,并通过截断SVD低秩适配器恢复被丢弃的残差信息,可使每个条目均方误差降低至$(1 - r/ ext{min}(d,k))$倍。为最大化硬件效率,我们将多个低秩适配器融合为单个拼接GEMM,采用基于位图的编码与两级流水解码+GEMM设计,实现真正压缩与加速。实验表明,SALR在多种LLM上实现50%稀疏度,保持与LoRA相当的GSM8K与MMLU性能,模型尺寸缩小2倍,推理速度最高提升1.7倍。
原文摘要 · Abstract (English)
Adapting large pre-trained language models to downstream tasks often entails fine-tuning millions of parameters or deploying costly dense weight updates, which hinders their use in resource-constrained environments. Low-rank Adaptation (LoRA) reduces trainable parameters by factorizing weight updates, yet the underlying dense weights still impose high storage and computation costs. Magnitude-based pruning can yield sparse models but typically degrades LoRA's performance when applied naively. In this paper, we introduce SALR (Sparsity-Aware Low-Rank Representation), a novel fine-tuning paradigm that unifies low-rank adaptation with sparse pruning under a rigorous mean-squared-error framework. We prove that statically pruning only the frozen base weights minimizes the pruning error bound, and we recover the discarded residual information via a truncated-SVD low-rank adapter, which provably reduces per-entry MSE by a factor of $(1 - r/\min(d,k))$. To maximize hardware efficiency, we fuse multiple low-rank adapters into a single concatenated GEMM, and we adopt a bitmap-based encoding with a two-stage pipelined decoding + GEMM design to achieve true model compression and speedup. Empirically, SALR attains 50\% sparsity on various LLMs while matching the performance of LoRA on GSM8K and MMLU, reduces model size by $2\times$, and delivers up to a $1.7\times$ inference speedup.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。