paper-with-me

홈 › Papers

TR-BERT: Dynamic Token Reduction for Accelerating BERT Inference

2021-05-25 · NAACL 2021 4 · Deming Ye, Yankai Lin, Yufei Huang, Maosong Sun

Existing pre-trained language models (PLMs) are often computationally expensive in inference, making them impractical in various resource-limited real-world applications. To address this issue, we propose a dynamic token reduction approach to accelerate PLMs' inference, named TR-BERT, which could flexibly adapt the layer number of each token in inference to avoid redundant calculation. Specially, TR-BERT formulates the token reduction process as a multi-step token selection problem and automatically learns the selection strategy via reinforcement learning. The experimental results on several downstream NLP tasks show that TR-BERT is able to speed up BERT by 2-5 times to satisfy various performance demands. Moreover, TR-BERT can also achieve better performance with less computation in a suite of long-text tasks since its token-level layer number adaption greatly accelerates the self-attention operation in PLMs. The source code and experiment details of this paper can be obtained from https://github.com/thunlp/TR-BERT.

📄 PDF Abstract BibTeX arXiv:2105.11618

Code (1)

thunlp/TR-BERT 공식 구현 pytorch

Tasks

Token Reduction

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.
WordPiece 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Layer Normalization Unlike batch normalization, Layer Normalization directly estimates the normalization statistics from the summed inputs…
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Attention Dropout Attention Dropout is a type of dropout used in attention-based architectures, where elements are randomly dropped out of the…
Residual Connection 설명 없음

Similar Papers 제목 키워드 기반

PoWER-BERT: Accelerating BERT Inference via Progressive Word-vector Elimination

2020-01-24 · ICML 2020 1 · Saurabh Goyal, Anamitra R. Choudhury, Saurabh M. Raje, Venkatesan T. Chakaravarthy 외

We develop a novel method, called PoWER-BERT, for improving the inference time of the popular BERT model, while maintaining the accuracy. It works by: a) exploiting redundancy pertaining to word-vectors (intermediate enc…

General ClassificationNatural Language Understanding

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

NarrowBERT: Accelerating Masked Language Model Pretraining and Inference

2023-01-11 · Haoxin Li, Phillip Keung, Daniel Cheng, Jungo Kasai 외

Large-scale language model pretraining is a very successful form of self-supervised learning in natural language processing, but it is increasingly expensive to perform as the models and pretraining corpora have become l…

Language ModelingLanguage ModellingmodelNER+2

Introducing Neural Bag of Whole-Words with ColBERTer: Contextualized Late Interactions using Enhanced Reduction

2022-03-24 · Sebastian Hofstätter, Omar Khattab, Sophia Althammer, Mete Sertkan 외

Recent progress in neural information retrieval has demonstrated large gains in effectiveness, while often sacrificing the efficiency and interpretability of the neural model compared to classical approaches. This paper …

Information RetrievalRetrieval

ExtremeBERT: A Toolkit for Accelerating Pretraining of Customized BERT

2022-11-30 · Rui Pan, Shizhe Diao, Jianlin Chen, Tong Zhang

In this paper, we present ExtremeBERT, a toolkit for accelerating and customizing BERT pretraining. Our goal is to provide an easy-to-use BERT pretraining toolkit for the research community and industry. Thus, the pretra…

Molecular System PredictionSentence Classification