Skip to main content
QUICK REVIEW

[论文解读] Pruner-Zero: Evolving Symbolic Pruning Metric from scratch for Large Language Models

Peijie Dong, Lujun Li|arXiv (Cornell University)|Jun 5, 2024
Natural Language Processing Techniques被引用 4
一句话总结

Pruner-Zero 引入了一种基于遗传编程的框架,可在不微调的情况下自动演化大型语言模型的符号化剪枝度量。通过在精心设计的权重、梯度和激活操作空间中搜索,它发现了高性能、无需人工干预的度量,其在 LLaMA 和 LLaMA-2 上的 50% 稀疏度下,于语言建模和零样本任务中均优于当前最先进(SOTA)的微调后剪枝方法。

ABSTRACT

Despite the remarkable capabilities, Large Language Models (LLMs) face deployment challenges due to their extensive size. Pruning methods drop a subset of weights to accelerate, but many of them require retraining, which is prohibitively expensive and computationally demanding. Recently, post-training pruning approaches introduced novel metrics, enabling the pruning of LLMs without retraining. However, these metrics require the involvement of human experts and tedious trial and error. To efficiently identify superior pruning metrics, we develop an automatic framework for searching symbolic pruning metrics using genetic programming. In particular, we devise an elaborate search space encompassing the existing pruning metrics to discover the potential symbolic pruning metric. We propose an opposing operation simplification strategy to increase the diversity of the population. In this way, Pruner-Zero allows auto-generation of symbolic pruning metrics. Based on the searched results, we explore the correlation between pruning metrics and performance after pruning and summarize some principles. Extensive experiments on LLaMA and LLaMA-2 on language modeling and zero-shot tasks demonstrate that our Pruner-Zero obtains superior performance than SOTA post-training pruning methods. Code at: \url{https://github.com/pprp/Pruner-Zero}.

研究动机与目标

  • 解决在设计大型语言模型有效剪枝度量时所需的人工投入高和试错过程多的问题。
  • 通过自动化发现最优剪枝度量,消除对专家知识和微调的依赖。
  • 探索剪枝度量与微调后模型性能之间的结构和功能相关性。
  • 为微调后剪枝中的符号化度量演化开发一种可扩展、格式鲁棒且多样化的搜索空间。
  • 通过自动化符号化度量生成,实现高效且高性能的大型语言模型压缩。

提出的方法

  • 设计了一种遗传编程框架,从预定义的操作和输入搜索空间中演化符号化剪枝度量。
  • 搜索空间包括权重(W)、梯度(G)和激活(X)作为输入,以及绝对值、乘法、最小-最大缩放和逐元素函数等一元操作(UOP)和二元操作(BOP)。
  • 引入一种反向操作简化策略,以增强种群多样性并避免过早收敛。
  • 通过在校准数据上的验证损失评估候选度量,引导演化过程向高性能度量发展。
  • 通过选择、交叉和变异演化符号表达式,其适应度由微调后的模型性能决定。
  • 最终度量来自演化过程中表现最佳的个体,随后在不进行微调的情况下应用于剪枝大型语言模型。
Figure 1: Overview of the Automatic Symbolic Pruning Metric Discovery Process in our Pruner-Zero framework. This process employs genetic programming to iteratively generate and refine symbolic pruning metrics via tournament selection, subtree crossover, and node mutation. Upon generating offspring,
Figure 1: Overview of the Automatic Symbolic Pruning Metric Discovery Process in our Pruner-Zero framework. This process employs genetic programming to iteratively generate and refine symbolic pruning metrics via tournament selection, subtree crossover, and node mutation. Upon generating offspring,

实验结果

研究问题

  • RQ1能否通过自动化框架在无需人工设计启发式方法的情况下发现更优的大型语言模型剪枝度量?
  • RQ2不同组合的权重、梯度和激活操作如何影响剪枝性能?
  • RQ3符号化度量的哪些结构特性与高微调后模型准确率相关?
  • RQ4遗传编程能否有效探索并优化高维空间中复杂且非线性的剪枝度量?
  • RQ5与现有 SOTA 微调后剪枝方法相比,所演化度量在准确率和稀疏度方面表现如何?

主要发现

  • Pruner-Zero 发现了一种符号化剪枝度量:||W| × |W|| × σ(|G|),在 LLaMA 和 LLaMA-2 上 50% 稀疏度下实现了最先进的性能。
  • 所演化度量在语言建模和零样本任务中均优于现有微调后剪枝方法,包括 SparseGPT、Wanda 和 GBLM-Pruner。
  • 该框架发现,结合权重幅值和梯度幅值并进行归一化(σ)的度量表现更优,表明梯度敏感性与剪枝有效性之间存在强相关性。
  • 反向操作简化策略提高了种群多样性并改善了收敛性,从而实现了更稳健的度量发现。
  • 搜索过程表明,使用全面的操作集合可降低对格式的敏感性,验证了搜索空间设计的有效性。
  • 大量消融实验表明,所演化度量在多个数据集和任务上均保持强性能,证实了其泛化能力。
Figure 2: Comparison between Evolution Search and Random Search Processes. Notably, the individual perplexity is lower in the evolution search method, leading to significant improvements in the search efficiency and overall stability.
Figure 2: Comparison between Evolution Search and Random Search Processes. Notably, the individual perplexity is lower in the evolution search method, leading to significant improvements in the search efficiency and overall stability.

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。