GradMAP: 更快的层剪枝与梯度度量和投影补偿
GradMAP: Faster Layer Pruning with Gradient Metric and Projection Compensation
AI总结:
GradMAP通过梯度度量和投影补偿实现更快的层剪枝,提升剪枝效率和性能。
摘要:
大型语言模型(LLMs)表现出强大的推理能力,但其高计算成本限制了实际部署。最近的研究揭示了LLMs层中存在显著的冗余性,使层剪枝成为活跃的研究课题。层剪枝研究主要集中在两个方面:测量层重要性以及剪枝后的性能恢复。不幸的是,现有工作未能同时维持剪枝性能和效率。在本研究中,我们提出GradMAP,一种更快的层剪枝方法,包含两个阶段。在第一阶段,我们引入基于梯度大小的新型度量标准,使能够对层重要性进行全局评估。需要注意的是,它只需要每个剪枝决策进行一次反向传播步骤,显著提高了剪枝效率。在第二阶段,我们首先分析由于剪枝而产生最大均值偏移的层,然后加入一个简单但有效的投影补偿矩阵来在一步内纠正这种漂移。通过这种方式,层剪枝导致的模型性能下降得到有效缓解。广泛实验显示,GradMAP在剪枝速度(实现平均4倍加速)和性能方面均优于先前的层剪枝方法。
英文摘要:
Large Language Models (LLMs) exhibit strong reasoning abilities, but their high computational costs limit their practical deployment. Recent studies reveal significant redundancy in LLMs layers, making layer pruning an active research topic. Layer pruning research primarily focuses on two aspects: measuring layer importance and recovering performance after pruning. Unfortunately, the present works fail to simultaneously maintain pruning performance and efficiency. In this study, we propose GradMAP, a faster layer pruning method with \textbf{Grad}ient \textbf{M}etric \textbf{A}nd \textbf{P}rojection compensation, which consists of two stages. In the first stage, we introduce a novel metric based on gradient magnitudes, enabling a global assessment of layer importance. Note that, it requires only a single backward propagation step per pruning decision, substantially enhancing pruning efficiency. In the second stage, we first analyze the layers with the largest mean shift resulting from pruning, and then incorporate a simple yet effective projection compensation matrix to correct this drift in one step. In this way, the degradation of model performance caused by layer pruning is effectively alleviated. Extensive experiments show that GradMAP outperforms previous layer pruning methods in both pruning speed (achieving an average $4\times$ speedup) and performance.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。