STAT: Shrinking Transformers After Training
Megan Flynn, Alexander Wang, Dean Edward Alvarez, Christopher De Sa,, Anil Damle

TL;DR
STAT is a fast, fine-tuning-free pruning algorithm for transformer models that effectively reduces model size while maintaining accuracy, applicable to various architectures and benchmarks.
Contribution
We introduce a novel, gradient-free pruning method that compresses transformers post-training using principled matrix factorizations, without fine-tuning.
Findings
Preserves accuracy after pruning with minimal data.
Compresses large models in hours on a single GPU.
Outperforms existing gradient-free pruning methods.
Abstract
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.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSimulation Techniques and Applications
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Attention Is All You Need · Layer Normalization · Dense Connections · Linear Warmup With Linear Decay · WordPiece · Attention Dropout · Adam · Residual Connection · Dropout
