PreprintCited by 64Advanced Neural Network ApplicationsTopic ModelingDomain Adaptation and Few-Shot Learning

A Fast Post-Training Pruning Framework for Transformers

Open access
Kwon, Woosuk, Kim, Sehoon, Mahoney, Michael W., Hassoun, Joseph, Keutzer, Kurt, Gholami, Amir·2022·arXiv

Abstract

Pruning is an effective way to reduce the huge inference cost of Transformer models. However, prior work on pruning Transformers requires retraining the models. This can add high training cost and high complexity to model deployment, making it difficult to use in many practical situations. To address this, we propose a fast post-training pruning framework for Transformers that does not require any retraining. Given a resource constraint and a sample dataset, our framework automatically prunes the Transformer model using structured sparsity methods. To retain high accuracy without retraining, we introduce three novel techniques: (i) a lightweight mask search algorithm that finds which heads and filters to prune based on the Fisher information; (ii) mask rearrangement that complements the search algorithm; and (iii) mask tuning that reconstructs the output activations for each layer. We apply our method to BERT-base and DistilBERT, and we evaluate its effectiveness on GLUE and SQuAD benchmarks. Our framework achieves up to 2.0x reduction in FLOPs and 1.56x speedup in inference latency, while maintaining < 1% loss in accuracy. Importantly, our framework prunes Transformers in less than 3 minutes on a single GPU, which is over two orders of magnitude faster than existing pruning approaches that retrain the models.

Integrity signals

Registry

DataCite · 10.48550/arxiv.2204.09656

Cites

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Kwon et al.'s method achieves a 1.56x speedup on inference latency for BERT with less than 1% accuracy loss.

    “It achieves a 1.56x speedup on inference latency for BERT with less than 1% accuracy loss.”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [114]

  • Kwon et al.'s framework requires only 3 minutes on a single GPU to remove heads in MHA and filters in FFN layers.

    “The framework requires only 3 minutes on a single GPU to remove heads in MHA and filters in FFN layers.”

    From A Survey of Techniques for Optimizing Transformer Inference (2023) · cites this paper as [114]

Cited by

Sorted by citations

Authors
Kwon, W., Kim, S., Mahoney, M. W., Hassoun, J., Keutzer, K., & Gholami, A.
Venue
arXiv
Publisher
arXiv
Published
2022
Pages
24101-24116
ISSN
1049-5258 (ISSN-L)
OpenAlex
W7133186778
Cited by
64
References
0
Citations by year
2026: 6 · 2025: 21 · 2024: 28 · 2023: 9
FWCI
5.26
Type
conference paper
Language
en
Open access
Locations
  • neural information processing systems (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • National Science Foundation
  • Intel Corporation
  • Samsung Advanced Institute of Technology
  • Korea Foundation for Advanced Studies
  • Samsung
  • Center for Long-Term Cybersecurity, University of California Berkeley
  • Office of Naval Research
  • Army Research Office
Topics
  • Physical Sciences › Computer Science › Computer Vision and Pattern Recognition › Advanced Neural Network Applications
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
Keywords
post-training pruning, neural network compression, inference efficiency

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review