Lune

ACL2023Top-tier venue

Gradient-based Intra-attention Pruning on Pre-trained Language Models

Ziqing Yang, Yiming Cui, Xin Yao, Shijin Wang

Abstract

Pre-trained language models achieve superior performance but are computationally expensive. Techniques such as pruning and knowledge distillation have been developed to reduce their sizes and latencies. In this work, we propose a structured pruning method GRAIN (Gradientbased Intra-attention pruning), which performs task-specific pruning with knowledge distillation and yields highly effective models. Different from common approaches that prune each attention head as a whole, GRAIN inspects and prunes intra-attention structures, which greatly expands the structure search space and enables more flexible models. We also propose a gradient separation strategy that reduces the interference of distillation on pruning for a better combination of the two approaches. Experiments on GLUE, SQuAD, and CoNLL 2003 show that GRAIN notably outperforms other methods, especially in the high sparsity regime, and achieves 6 ∼ 7× speedups while maintaining 93% ∼ 99% performance. Under extreme compression where only 3% transformer weights remain, the pruned model is still competitive compared to larger models. 1 1 Code is available at https://github.com/airaria/ GRAIN . 2.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TinyBERT: Distilling BERT for Natural Language Understanding cites Reducing Transformer Depth on Demand with Structured Dropout
  • TinyBERT: Distilling BERT for Natural Language Understanding cites MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices
  • MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devices cites TinyBERT: Distilling BERT for Natural Language Understanding
  • TinyBERT: Distilling BERT for Natural Language Understanding cites DynaBERT: Dynamic BERT with Adaptive Width and Depth
  • DynaBERT: Dynamic BERT with Adaptive Width and Depth cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Pruner-Zero: Evolving Symbolic Pruning Metric From Scratch for Large Language Models cites Movement Pruning: Adaptive Sparsity by Fine-Tuning
  • LoRAP: Transformer Sub-Layers Deserve Differentiated Structured Compression for Large Language Models cites Movement Pruning: Adaptive Sparsity by Fine-Tuning
  • Movement Pruning: Adaptive Sparsity by Fine-Tuning cites TinyBERT: Distilling BERT for Natural Language Understanding
  • Movement Pruning: Adaptive Sparsity by Fine-Tuning cites Reducing Transformer Depth on Demand with Structured Dropout
  • DynaBERT: Dynamic BERT with Adaptive Width and Depth cites Reducing Transformer Depth on Demand with Structured Dropout
  • Elastic ViTs from Pretrained Models without Retraining cites Movement Pruning: Adaptive Sparsity by Fine-Tuning
  • Elastic ViTs from Pretrained Models without Retraining cites DynaBERT: Dynamic BERT with Adaptive Width and Depth
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Pruner-Zero: Evolving Symbolic Pruning Metric From Scratch for Large Language ModelsPeijie Dong, Lujun Li, Zhenheng Tang, Xiang Liu et al.ICML 2024 · 64 citations
  2. LoRAP: Transformer Sub-Layers Deserve Differentiated Structured Compression for Large Language ModelsGuangyan Li, Yongqiang Tang, Wensheng ZhangICML 2024 · 11 citations
  3. Elastic ViTs from Pretrained Models without RetrainingWalter Simoncini, Michael Dorkenwald, Tijmen Blankevoort, Cees G. M. Snoek et al.NeurIPS 2025 · 2 citations
  4. Neural Parameter Search for Slimmer Fine-Tuned Models and Better TransferGuodong Du, Zitao Fang, Jing Li, Junlin Li et al.ACL 2025

Builds on16

  1. TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang et al.EMNLP Findings 2020 · 1,787 citations
  2. Reducing Transformer Depth on Demand with Structured DropoutAngela Fan, Edouard Grave, Armand JoulinICLR 2020 · 695 citations
  3. MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited DevicesZhiqing Sun, Hongkun Yu, Xiaodan Song, Renjie Liu et al.ACL 2020 · 660 citations
  4. Movement Pruning: Adaptive Sparsity by Fine-TuningVictor Sanh, Thomas Wolf, Alexander M. RushNeurIPS 2020 · 656 citations
  5. DynaBERT: Dynamic BERT with Adaptive Width and DepthLu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang et al.NeurIPS 2020 · 401 citations

Related papers

  1. Structured Pruning Learns Compact and Accurate ModelsMengzhou Xia, Zexuan Zhong, Danqi ChenACL 2022 · 236 citations
  2. Length-Adaptive Distillation: Customizing Small Language Model for Dynamic Token PruningChang Liu, Chongyang Tao, Jianxin Liang, Jiazhan Feng et al.EMNLP Findings 2023
  3. Gradient-Free Structured Pruning with Unlabeled DataAzade Nova, Hanjun Dai, Dale SchuurmansICML 2023 · 38 citations
  4. Block Pruning For Faster TransformersFrançois Lagunas, Ella Charlaix, Victor Sanh, Alexander M. RushEMNLP 2021 · 2 citations
  5. MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained TransformersWenhui Wang, Furu Wei, Li Dong, Hangbo Bao et al.NeurIPS 2020 · 2,727 citations
Dusk over the sea between two cliffs drawn in fine vertical lines