[论文解读] Pruning as a Cooperative Game: Surrogate-Assisted Layer Contribution Estimation for Large Language Models
该论文将大语言模型的剪枝视为 Transformer 层之间的协作博弈,使用轻量级代理来通过分层蒙特卡罗掩码估计类似夏普利值的层贡献,并在 perplexity 和零样本准确率上相对于基线表现出一致改进,同时实现高效剪枝。
While large language models (LLMs) demonstrate impressive performance across various tasks, their deployment in real-world scenarios is still constrained by high computational demands. Layer-wise pruning, a commonly employed strategy to mitigate inference costs, can partially address this challenge. However, existing approaches generally depend on static heuristic rules and fail to account for the interdependencies among layers, thereby limiting the effectiveness of the pruning process. To this end, this paper proposes a game-theoretic framework that formulates layer pruning as a cooperative game in which each layer acts as a player and model performance serves as the utility. As computing exact Shapley values is computationally infeasible for large language models (LLMs), we propose using a lightweight surrogate network to estimate layer-wise marginal contributions. This network can predict LLM performance for arbitrary layer combinations at a low computational cost. Additionally, we employ stratified Monte Carlo mask sampling to further reduce the cost of Sharpley value estimation. This approach captures inter-layer dependencies and dynamically identifies critical layers for pruning. Extensive experiments demonstrate the consistent superiority of our method in terms of perplexity and zero-shot accuracy, achieving more efficient and effective layer-wise pruning for large language models.
研究动机与目标
- 通过考虑层间依赖而非静态启发式方法来推动对大语言模型的剪枝。
- 提出一种可扩展的两阶段近似方法,利用代理网络估计层贡献。
- 保留层间相互作用以识别对高效剪枝关键的层。
- 在多种模型与任务上展示语言建模性能和零样本能力的提升。
- 显示与量化兼容性及可应用于 Transformer 架构之外的情形。
提出的方法
- 将层剪枝形式化为一个协作博弈,每个 Transformer 层为一个参与者,模型性能为效用。
- 引入分层蒙特卡罗掩码抽样,以产生具有受控汉明权的多样化剪枝掩码。
- 训练一个轻量级代理网络,预测未见掩码的性能下降并近似夏普利值。
- 利用代理和聚合的掩码评估来估算层边际贡献并按夏普利值排序层。
- 通过移除估计贡献最低的层以达到目标压缩比进行剪枝。
- 可选地将剪枝与后训练量化结合以提升效率。
实验结果
研究问题
- RQ1能否有效捕捉层间依赖以指导大语言模型的层剪枝?
- RQ2代理模型是否能提供准确、可扩展的层贡献估计,从而利用基于夏普利值的剪枝?
- RQ3基于博弈论、情境感知的剪枝策略是否在不同架构与任务上超越静态启发式与现有基线?
主要发现
- 所提出的方法在多个模型和剪枝水平上相较于深度向剪枝和宽度向剪枝基线,表现出更低的困惑度和更高的零样本准确率。
- 在对较大规模的 Meta-LLaMA-3-8B 与 LLaMA-2-13B-hf 模型上,方法在强剪枝条件下仍能保持生成质量。
- 考虑层间依赖的剪枝决策提高了对抗性推理任务(ANLI)的鲁棒性。
- 该方法可推广至非 Transformer 架构(RWKV、Mamba),并且与后训练量化兼容,进一步提升内存和吞吐量。
- 实验表明该方法在不增加内存开销的前提下实现了有利的速度/吞吐/延迟权衡。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。