Toward Adaptive Large Language Models Structured Pruning via Hybrid-grained Weight Importance Assessment
作者: Jun Liu, Zhenglun Kong, Pu Zhao, Changdi Yang, Hao Tang, Xuan Shen, Geng Yuan, Wei Niu, Wenbin Zhang, Xue Lin, Dong Huang, Yanzhi Wang
分类: cs.CL, cs.AI, cs.LG
发布日期: 2024-03-16 (更新: 2026-03-11)
备注: AAAI 2025
🔗 代码/项目: GITHUB
💡 一句话要点
提出混合粒度权重重要性评估以优化大语言模型的结构化剪枝
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大语言模型 结构化剪枝 权重重要性评估 混合粒度 注意力机制 模型压缩 性能优化
📋 核心要点
- 现有的结构化剪枝方法通常依赖单一粒度评估权重重要性,导致下游任务性能下降。
- 提出的HyWIA方法结合细粒度和粗粒度的权重重要性评估,利用注意力机制自适应调整评估粒度。
- HyWIA在多个基准测试中表现优异,相较于最先进的LLM-Pruner,准确率提升平均达2.82%。
📝 摘要(中文)
结构化剪枝在大语言模型(LLMs)中引起了广泛关注,因为它能够通过消除冗余权重组来高效压缩和加速LLMs。然而,现有方法通常依赖单一粒度评估权重重要性,导致下游任务性能显著下降。我们的实证研究表明,采用无结构剪枝可以在更细粒度上保留更好的性能。基于此,我们提出了混合粒度权重重要性评估(HyWIA),该方法结合了细粒度和粗粒度的权重重要性评估,利用注意力机制自适应地确定最佳评估粒度。大量实验表明,HyWIA在多个基准测试中有效提升了LLMs的剪枝效果。
🔬 方法详解
问题定义:当前大语言模型的结构化剪枝方法在评估权重重要性时通常依赖单一粒度,导致在下游任务中性能显著下降。
核心思路:本研究提出的HyWIA方法通过结合细粒度和粗粒度的权重重要性评估,旨在提高剪枝后的模型性能。通过注意力机制,HyWIA能够自适应地选择最佳的评估粒度,从而优化剪枝效果。
技术框架:HyWIA的整体架构包括两个主要模块:细粒度评估模块和粗粒度评估模块。细粒度模块针对单个权重进行评估,而粗粒度模块则评估权重组的整体重要性。最终,结合这两个模块的评估结果进行剪枝决策。
关键创新:HyWIA的核心创新在于其混合粒度评估方法,这与传统的单一粒度评估方法本质上不同,能够更全面地捕捉权重的重要性。
关键设计:在设计中,HyWIA采用了注意力机制来动态调整评估粒度,确保在剪枝过程中能够最大限度地保留模型性能。
🖼️ 关键图片
📊 实验亮点
在多个基准测试中,HyWIA在剪枝LLaMA-7B模型时,准确率平均提升2.82%,超越了当前最先进的LLM-Pruner。这一结果表明,HyWIA在剪枝大语言模型时具有显著的性能优势。
🎯 应用场景
该研究的潜在应用领域包括自然语言处理、对话系统和机器翻译等大语言模型相关任务。通过优化剪枝方法,HyWIA能够在保持模型性能的同时,显著降低计算资源消耗,具有重要的实际价值和广泛的应用前景。
📄 摘要(原文)
Structured pruning for large language models (LLMs) has garnered significant academic interest due to its ability to efficiently compress and accelerate LLMs by eliminating redundant weight groups at a coarse-grained granularity. Current structured pruning methods for LLMs typically depend on a singular granularity for assessing weight importance, resulting in notable performance degradation in downstream tasks. Intriguingly, our empirical investigations reveal that utilizing unstructured pruning, which achieves better performance retention by pruning weights at a finer granularity, \emph{i.e.}, individual weights, yields significantly varied sparse LLM structures when juxtaposed to structured pruning. This suggests that evaluating both holistic and individual assessment for weight importance is essential for LLM pruning. Building on this insight, we introduce the Hybrid-grained Weight Importance Assessment (HyWIA), a novel method that merges fine-grained and coarse-grained evaluations of weight importance for the pruning of LLMs. Leveraging an attention mechanism, HyWIA adaptively determines the optimal blend of granularity in weight importance assessments in an end-to-end pruning manner. Extensive experiments on LLaMA-V1/V2, Vicuna, Baichuan, and Bloom across various benchmarks demonstrate the effectiveness of HyWIA in pruning LLMs. For example, HyWIA surpasses the cutting-edge LLM-Pruner by an average margin of 2.82% in accuracy across seven downstream tasks when pruning LLaMA-7B by 50%. Code:https://github.com/azuryl/LLM-HWIA