We present STAT: a simple algorithm to prune transformer models without any fine-tuning. STAT eliminates both attention heads and neurons from the network, while preserving accuracy by calculating a correction to the weights of the next layer. Each layer block in the network is compressed using a series of principled matrix factorizations that preserve the network structure. Our entire algorithm takes minutes to compress BERT, and less than three hours to compress models with 7B parameters using a single GPU. Using only several hundred data examples, STAT preserves the output of the network and improves upon existing gradient-free pruning methods. It is even competitive with methods that include significant fine-tuning. We demonstrate our method on both encoder and decoder architectures, including BERT, DistilBERT, and Llama-2 using benchmarks such as GLUE, Squad, WikiText2.
Shrinking the Giant : Quasi-Weightless Transformers for Low Energy Inference
The University of Texas at Austin(德克萨斯大学奥斯汀分校);NVIDIA Research(英伟达研究院);The University of Texas at San Antonio(德克萨斯大学圣安东尼奥分校);IBM T.J. Watson Research Center(IBM T.J.沃森研究中心);Federal University of Rio de Janeiro(里约热内卢联邦大学);Universidade do Porto(波尔图大学);Instituto de Telecomunicações(电信研究所)
Repeat After Me: Transformers are Better than State Space Models at Copying
Harvard University(哈佛大学);Kempner Institute for the Study of Natural and Artificial Intelligence(坎普纳自然与人工智能研究所);Departments of Computer Science and Statistics(计算机科学与统计学系)