arXiv:2412.12441cs.LGcs.AI2024-12中稿 · AAAI被引 37

不训练直接剪枝,让自回归模型更快更省内存。

Numerical Pruning for Efficient Autoregressive Models

  • 用牛顿法计算注意力与MLP层的数值得分进行剪枝。
  • 剪枝后通过补偿算法恢复性能,推理速度提升40%以上。
  • 适合需要高效生成的文本/图像生成场景。

Transformer已成为深度学习的主流架构,在语言、图像等多领域表现优异,但其庞大的模型规模带来了高昂的计算成本。本文针对仅解码器的Transformer自回归模型,提出一种无需训练的结构化权重剪枝方法,分别对注意力模块和MLP模块使用牛顿法计算数值评分。此外,还设计了一种补偿算法以恢复剪枝后的模型性能。实验验证了该方法的有效性:在保持语言与图像生成性能的同时,显著降低内存占用并提升GPU上的生成速度,达到当前最优效果。

原文摘要 · Abstract (English)

Transformers have emerged as the leading architecture in deep learning, proving to be versatile and highly effective across diverse domains beyond language and image processing. However, their impressive performance often incurs high computational costs due to their substantial model size. This paper focuses on compressing decoder-only transformer-based autoregressive models through structural weight pruning to improve the model efficiency while preserving performance for both language and image generation tasks. Specifically, we propose a training-free pruning method that calculates a numerical score with Newton's method for the Attention and MLP modules, respectively. Besides, we further propose another compensation algorithm to recover the pruned model for better performance. To verify the effectiveness of our method, we provide both theoretical support and extensive experiments. Our experiments show that our method achieves state-of-the-art performance with reduced memory usage and faster generation speeds on GPUs.

模型压缩自回归剪枝

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