paper-with-me

Papers

Accelerating BERT Inference for Sequence Labeling via Early-Exit

2021-05-28 · ACL 2021 5 · Xiaonan Li, Yunfan Shao, Tianxiang Sun, Hang Yan, Xipeng Qiu, Xuanjing Huang

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 sequence-level tasks, rather than sequence labeling. In this paper, we first propose a simple extension of sentence-level early-exit for sequence labeling tasks. To further reduce the computational cost, we also propose 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 early-exit 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 2X, 3X, and 4X.

📄 PDF Abstract BibTeX arXiv:2105.13878

Code (1)

LeeSureman/Sequence-Labeling-Early-Exit 공식 구현 pytorch

Tasks

Sentence

Methods 이 논문이 사용한 방법론

Refunds@Expedia|||How do I get a full refund from Expedia? “How do I get a full refund from Expedia? How do I get a full refund from Expedia? – Call ☎️ +1-(888) 829 (0881) or +1-805-330-4056 or +1-805-330-4056 for Quick Help &…
Multi-Head Attention 설명 없음
Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
Early exiting Exit whenever the model is confident enough allowing early exiting from hidden layers
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Linear Warmup With Linear Decay Linear Warmup With Linear Decay is a learning rate schedule in which we increase the learning rate linearly for $n$ updates and then linearly decay afterwards.
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…

Similar Papers 제목 키워드 기반

VEE-BERT: Accelerating BERT Inference for Named Entity Recognition via Vote Early Exiting

2022-01-16 · ACL ARR January 2022 1 · Anonymous

Named entity recognition (NER) is of great importance for a wide range of tasks, such as medical health record understanding, document analysis, dialogue understanding. BERT and its variants are the most performing model…

Dialogue Understandingnamed-entity-recognitionNamed Entity RecognitionNamed Entity Recognition (NER)+1

Elbert: Fast Albert with Confidence-Window Based Early Exit

2021-07-01 · Keli Xie, Siyuan Lu, Meiqi Wang, Zhongfeng Wang

Despite the great success in Natural Language Processing (NLP) area, large pre-trained language models like BERT are not well-suited for resource-constrained or real-time applications owing to the large number of paramet…

Decision Making

Magic Pyramid: Accelerating Inference with Early Exiting and Token Pruning

2021-10-30 · Xuanli He, Iman Keivanloo, Yi Xu, Xiang He 외

Pre-training and then fine-tuning large language models is commonly used to achieve state-of-the-art performance in natural language processing (NLP) tasks. However, most pre-trained models suffer from low inference spee…

text-classificationText Classification

Magic Pyramid: Accelerating Inference with Early Exiting and Token Pruning

2022-01-16 · ACL ARR January 2022 1 · Anonymous

Pre-training and then fine-tuning large language models is commonly used to achieve state-of-the-art performance in natural language processing (NLP) tasks. However, most pre-trained models suffer from low inference spe…

text-classificationText Classification

SmartBERT: A Promotion of Dynamic Early Exiting Mechanism for Accelerating BERT Inference

2023-03-16 · Boren Hu, Yun Zhu, Jiacheng Li, Siliang Tang

Dynamic early exiting has been proven to improve the inference speed of the pre-trained language model like BERT. However, all samples must go through all consecutive layers before early exiting and more complex samples …

Contrastive LearningLanguage ModellingRTEWNLI