BERT Loses Patience: Fast and Robust Inference with Early Exit
Wangchunshu Zhou, Canwen Xu, Tao Ge, Julian J. McAuley, Ke Xu, Furu Wei
Abstract
In this paper, we propose Patience-based Early Exit, a straightforward yet effective inference method that can be used as a plug-and-play technique to simultaneously improve the efficiency and robustness of a pretrained language model (PLM). To achieve this, our approach couples an internal-classifier with each layer of a PLM and dynamically stops inference when the intermediate predictions of the internal classifiers remain unchanged for a pre-defined number of steps. Our approach improves inference efficiency as it allows the model to make a prediction with fewer layers. Meanwhile, experimental results with an ALBERT model show that our method can improve the accuracy and robustness of the model by preventing it from overthinking and exploiting multiple classifiers for prediction, yielding a better accuracy-speed trade-off compared to existing early exit methods. 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.
111 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- FastBERT: a Self-distilling BERT with Adaptive Inference Time cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- A Fast Post-Training Pruning Framework for Transformers cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- A Fast Post-Training Pruning Framework for Transformers cites Reducing Transformer Depth on Demand with Structured Dropout
- A Fast Post-Training Pruning Framework for Transformers cites Language Models are Few-Shot Learners
- A-ViT: Adaptive Tokens for Efficient Vision Transformer cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- A-ViT: Adaptive Tokens for Efficient Vision Transformer cites FastBERT: a Self-distilling BERT with Adaptive Inference Time
- A-ViT: Adaptive Tokens for Efficient Vision Transformer cites Language Models are Few-Shot Learners
- Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs cites Language Models are Few-Shot Learners
- DynaBERT: Dynamic BERT with Adaptive Width and Depth cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- DynaBERT: Dynamic BERT with Adaptive Width and Depth cites FastBERT: a Self-distilling BERT with Adaptive Inference Time
- DynaBERT: Dynamic BERT with Adaptive Width and Depth cites Reducing Transformer Depth on Demand with Structured Dropout
- DynaBERT: Dynamic BERT with Adaptive Width and Depth cites Once-for-All: Train One Network and Specialize it for Efficient Deployment
- Confident Adaptive Language Modeling cites FastBERT: a Self-distilling BERT with Adaptive Inference Time
- Confident Adaptive Language Modeling cites Reducing Transformer Depth on Demand with Structured Dropout
- Confident Adaptive Language Modeling cites Language Models are Few-Shot Learners
- Confident Adaptive Language Modeling cites DynaBERT: Dynamic BERT with Adaptive Width and Depth
Cited by top-tier papers111
- Model Tells You What to Discard: Adaptive KV Cache Compression for LLMsSuyu Ge, Yunan Zhang, Liyuan Liu, Minjia Zhang et al.ICLR 2024 · 432 citations
- DynaBERT: Dynamic BERT with Adaptive Width and DepthLu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang et al.NeurIPS 2020 · 401 citations
- Confident Adaptive Language ModelingTal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani et al.NeurIPS 2022 · 394 citations
- A-ViT: Adaptive Tokens for Efficient Vision TransformerHongxu Yin, Arash Vahdat, José M. Álvarez, Arun Mallya et al.CVPR 2022 · 288 citations
- A Fast Post-Training Pruning Framework for TransformersWoosuk Kwon, Sehoon Kim, Michael W. Mahoney, Joseph Hassoun et al.NeurIPS 2022 · 247 citations
Builds on8
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
- Once-for-All: Train One Network and Specialize it for Efficient DeploymentHan Cai, Chuang Gan, Tianzhe Wang, Zhekai Zhang et al.ICLR 2020 · 1,522 citations
- Reducing Transformer Depth on Demand with Structured DropoutAngela Fan, Edouard Grave, Armand JoulinICLR 2020 · 695 citations
- FastBERT: a Self-distilling BERT with Adaptive Inference TimeWeijie Liu, Peng Zhou, Zhiruo Wang, Zhe Zhao et al.ACL 2020 · 257 citations
Related papers
- CascadeBERT: Accelerating Inference of Pre-trained Language Models via Calibrated Complete Models CascadeLei Li, Yankai Lin, Deli Chen, Shuhuai Ren et al.EMNLP Findings 2021 · 33 citations
- ConsistentEE: A Consistent and Hardness-Guided Early Exiting Method for Accelerating Language Models InferenceZiqian Zeng, Yihuai Hong, Hongliang Dai, Huiping Zhuang et al.AAAI 2024 · 26 citations
- COSEE: Consistency-Oriented Signal-Based Early Exiting via Calibrated Sample Weighting MechanismJianing He, Qi Zhang, Hongyun Zhang, Xuanjing Huang et al.AAAI 2025 · 3 citations
- PALBERT: Teaching ALBERT to PonderNikita Balagansky, Daniil GavrilovNeurIPS 2022 · 10 citations
- CeeBERT: Cross-Domain Inference in Early Exit BERTDivya Jyoti Bajpai, Manjesh K. HanawalACL Findings 2024 · 11 citations
