Accelerating BERT Inference for Sequence Labeling via Early-Exit
Xiaonan Li, Yunfan Shao, Tianxiang Sun, Hang Yan, Xipeng Qiu, Xuanjing Huang
Abstract
Both performance and efficiency are crucial factors for sequence labeling tasks in many real-world scenarios. Although the pre-trained models (PTMs) have significantly improved the performance of various sequence labeling tasks, their computational cost is expensive. To alleviate this problem, we extend the recent successful early-exit mechanism to accelerate the inference of PTMs for sequence labeling tasks. However, existing early-exit mechanisms are specifically designed for sequencelevel tasks, rather than sequence labeling. In this paper, we first propose SENTEE: a simple extension of SENTence-level Early-Exit for sequence labeling tasks. To further reduce computational cost, we also propose TOKEE: a TOKen-level Early-Exit mechanism that allows partial tokens to exit early at different layers. Considering the local dependency inherent in sequence labeling, we employed a window-based criterion to decide for a token whether or not to exit. The token-level earlyexit brings the gap between training and inference, so we introduce an extra self-sampling fine-tuning stage to alleviate it. The extensive experiments on three popular sequence labeling tasks show that our approach can save up to 66%∼75% inference cost with minimal performance degradation. Compared with competitive compressed models such as DistilBERT, our approach can achieve better performance under the same speed-up ratios of 2×, 3×, and 4×. 1
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.
7 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
- TinyBERT: Distilling BERT for Natural Language Understanding cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- TinyBERT: Distilling BERT for Natural Language Understanding cites Q-BERT: Hessian Based Ultra Low Precision Quantization of BERT
- TinyBERT: Distilling BERT for Natural Language Understanding cites Reducing Transformer Depth on Demand with Structured Dropout
- DeeCap: Dynamic Early Exiting for Efficient Image Captioning cites BERT Loses Patience: Fast and Robust Inference with Early Exit
- BERT Loses Patience: Fast and Robust Inference with Early Exit cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- BERT Loses Patience: Fast and Robust Inference with Early Exit cites Reducing Transformer Depth on Demand with Structured Dropout
- The Efficiency vs. Accuracy Trade-off: Optimizing RAG-Enhanced LLM Recommender Systems Using Multi-Head Early Exit cites BERT Loses Patience: Fast and Robust Inference with Early Exit
- The Efficiency vs. Accuracy Trade-off: Optimizing RAG-Enhanced LLM Recommender Systems Using Multi-Head Early Exit cites EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism
- EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D Parallelism cites BERT Loses Patience: Fast and Robust Inference with Early Exit
- Dynamic Transformers Provide a False Sense of Efficiency cites TinyBERT: Distilling BERT for Natural Language Understanding
- Dynamic Transformers Provide a False Sense of Efficiency cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Dynamic Transformers Provide a False Sense of Efficiency cites BERT Loses Patience: Fast and Robust Inference with Early Exit
- Towards the Law of Capacity Gap in Distilling Language Models cites TinyBERT: Distilling BERT for Natural Language Understanding
Cited by top-tier papers7
- EE-LLM: Large-Scale Training and Inference of Early-Exit Large Language Models with 3D ParallelismYanxi Chen, Xuchen Pan, Yaliang Li, Bolin Ding et al.ICML 2024 · 73 citations
- DeeCap: Dynamic Early Exiting for Efficient Image CaptioningZhengcong Fei, Xu Yan, Shuhui Wang, Qi TianCVPR 2022 · 39 citations
- Towards the Law of Capacity Gap in Distilling Language ModelsChen Zhang, Qiuchi Li, Dawei Song, Zheyu Ye et al.ACL 2025 · 39 citations
- The Efficiency vs. Accuracy Trade-off: Optimizing RAG-Enhanced LLM Recommender Systems Using Multi-Head Early ExitHuixue Zhou, Hengrui Gu, Zaifu Zhan, Xi Liu et al.ACL 2025 · 8 citations
- Dynamic Transformers Provide a False Sense of EfficiencyYiming Chen, Simin Chen, Zexin Li, Wei Yang et al.ACL 2023 · 5 citations
Builds on13
- 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
- TinyBERT: Distilling BERT for Natural Language UnderstandingXiaoqi Jiao, Yichun Yin, Lifeng Shang, Xin Jiang et al.EMNLP Findings 2020 · 1,787 citations
- Reducing Transformer Depth on Demand with Structured DropoutAngela Fan, Edouard Grave, Armand JoulinICLR 2020 · 695 citations
- Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTSheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma et al.AAAI 2020 · 656 citations
- BERT Loses Patience: Fast and Robust Inference with Early ExitWangchunshu Zhou, Canwen Xu, Tao Ge, Julian J. McAuley et al.NeurIPS 2020 · 473 citations
Related papers
- 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
- 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
- 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
- LeeBERT: Learned Early Exit for BERT with cross-level optimizationWei ZhuACL 2021
- Finding the SWEET Spot: Analysis and Improvement of Adaptive Inference in Low Resource SettingsDaniel Rotem, Michael Hassid, Jonathan Mamou, Roy SchwartzACL 2023 · 1 citation
