arXiv:2412.15127cs.CLcs.AI2024-12被引 2

通过结构重要性感知实现大模型自适应剪枝,兼顾性能与效率

Adaptive Pruning for Large Language Models with Structural Importance Awareness

  • 基于同方差不确定性设计自适应重要性融合指标,评估模块重要性
  • 在多个模型上实现最高2.39%的准确率提升,生成速度加快5%
  • 适合边缘设备部署,尤其适用于资源受限场景下的模型压缩

大语言模型(LLMs)虽显著提升了语言理解与生成能力,但其高计算与存储需求难以在资源受限的边缘设备上部署。为此,本文提出一种新型自适应剪枝方法——结构重要性感知剪枝(SAAP),可在保持性能的同时大幅降低计算与内存开销。首先,通过考虑同方差不确定性,定义自适应重要性融合指标来评估模型中所有耦合结构的重要性;其次,依据重要性排序确定需剪枝的具体层,以满足特定性能要求;此外,设计了一种新的组微调策略,提升推理效率。在零样本分类与文本生成两个任务上对多种LLM进行评估,实验结果表明,SAAP在LLaMA-7B、Vicuna-7B和LLaMA-13B上分别取得2.17%、2.37%和2.39%的准确率提升,同时将生成速度提高5%,展现出在资源受限场景下的实际优势。

原文摘要 · Abstract (English)

The recent advancements in large language models (LLMs) have significantly improved language understanding and generation capabilities. However, it is difficult to deploy LLMs on resource-constrained edge devices due to their high computational and storage resource demands. To address this issue, we propose a novel LLM model pruning method, namely structurally-aware adaptive pruning (SAAP), to significantly reduce the computational and memory costs while maintaining model performance. We first define an adaptive importance fusion metric to evaluate the importance of all coupled structures in LLMs by considering their homoscedastic uncertainty. Then, we rank the importance of all modules to determine the specific layers that should be pruned to meet particular performance requirements. Furthermore, we develop a new group fine-tuning strategy to improve the inference efficiency of LLMs. Finally, we evaluate the proposed SAAP method on multiple LLMs across two common tasks, i.e., zero-shot classification and text generation. Experimental results show that our SAAP method outperforms several state-of-the-art baseline methods, achieving 2.17%, 2.37%, and 2.39% accuracy gains on LLaMA-7B, Vicuna-7B, and LLaMA-13B. Additionally, SAAP improves the token generation speed by 5%, showcasing its practical advantages in resource-constrained scenarios.

大模型剪枝边缘计算结构重要性高效推理

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。