Numerical Pruning for Efficient Autoregressive Models
Xuan Shen, Zhao Song, Yufa Zhou, Bo Chen, Jing Liu, Ruiyi Zhang, Ryan A. Rossi, Hao Tan, Tong Yu, Xiang Chen, Yufan Zhou, Tong Sun, Pu Zhao, Yanzhi Wang, Jiuxiang Gu
TL;DR
This work addresses the high computational and memory burden of decoder-only autoregressive transformers by introducing a training-free, structural pruning framework that computes a globally optimal pruning mask via Newton's method for Attention and MLP modules. It further includes a lightweight compensation step to recover performance using a small calibration set, and demonstrates state-of-the-art results on both language and image-generation tasks (LLaMA family and LlamaGen) with notable speedups and memory savings on GPUs. The approach is theoretically grounded and empirically validated across diverse models and tasks, highlighting robust cross-domain applicability from language to image generation. Overall, the method provides a practical, hardware-friendly means to compress autoregressive models without major retraining requirements.
Abstract
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.
