FastBERT: a Self-distilling BERT with Adaptive Inference Time
By Weijie Liu, Peng Zhou, Zhe Zhao, Zhiruo Wang, Haotang Deng, Qi Ju. 2020
436 citations recorded by the source corpus.
Pre-trained language models like BERT have proven to be highly performant. However, they are often computationally expensive in many practical scenarios, for such heavy models can hardly be readily implemented with limited resources. To improve their efficiency with an assured model performance, we propose a novel speed-tunable FastBERT with adaptive inference time. The speed at inference can be flexibly adjusted under varying demands, while redundant calculation of samples is avoided. Moreover, this model adopts a unique self-distillation mechanism at fine-tuning, further enabling a greater computational efficacy with minimal loss in performance. Our model achieves promising results in twelve English and Chinese datasets. It is able to speed up by a wide range from 1 to 12 times than BERT if given different speedup thresholds to make a speed-performance tradeoff.
Subfields: Artificial Intelligence, Large Language Models, Efficiency & Compression
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
In Large Language Models
In Efficiency & Compression
Citations in the corpus
- TinyBERT: Distilling BERT for Natural Language Understanding (2019, background): “, 2020), knowledge distillation (Tang et al., 2019; Sanh et al., 2019; Turc et al., 2019; Sun et al., 2020; Liu et al., 2020; Wang et al., 2020), pruning (Cui et al.”
- It’s Not Just Size That Matters: Small Language Models Are Also Few-Shot Learners (2020, background): “, 2021) as well as early exit strategies for inference (Liu et al., 2020; Schwartz et al., 2020b; Xin et al., 2020).”
- Consistent Accelerated Inference via Confident Adaptive Transformers (2021, methodology): “[25] Weijie Liu, Peng Zhou, Zhiruo Wang, Zhe Zhao, Haotang Deng, and Qi Ju.”
- Dynamic Neural Networks: A Survey (2021, background): “, BERT [7]) for improving their efficiency on NLP tasks [57], [58], [59], [60].”
- Knowledge Distillation: A Survey (2020, methodology): “To address this problem, several lightweight variations of BERT (called BERT model compression) using knowledge distillation are proposed (Sun et al. 2019; Jiao et al. 2020; Tang et al. 2019; Sanh et al. 2019; Wang et al. 2020a; Liu et al. 2020b; Fu et al. 2021).”
- Pre-trained models for natural language processing: A survey (2020, background): “nce of the source model. 4.5.6 Others In addition to reducing model sizes, there are other ways to improve the computational eciency of PTMs in practical scenarios with limited resources. Liu et al. [112] proposed a practical speed-tunable BERT, namely FastBERT, which can dynamically reduce computat”
- TernaryBERT: Distillation-aware Ultra-low Bit BERT (2020, background): “…2020), knowledge distillation (Sanh et al., 2019; Sun et al., 2019; Jiao et al., 2019 pruning (Michel et al., 2019; Voita et al., 2019; Fan et al., 2019), adaptive depth and/or width (Liu et al., 2020; Hou et al., 2020), and quantization (Zafrir et al., 2019; Shen et al., 2020; Fan et al., 2020).”
- BinaryBERT: Pushing the Limit of BERT Quantization (2020, background): “, 2020), dynamic networks with adaptive depth and/or width (Liu et al., 2020; Hou et al., 2020; Xin et al., 2020; Zhou et al., 2020), and quantization (Zafrir et al.”
- DynaBERT: Dynamic BERT with Adaptive Width and Depth (2020, background): “In [4, 7, 6, 13, 29, 34], Transformerbased models with adaptive depth are proposed to dynamically select some of the Transformer layers during inference.”
- BERT Loses Patience: Fast and Robust Inference with Early Exit (2020, methodology): “Very recently, FastBERT [28] and DeeBERT [29] adapted confidence-based BranchyNet [25] for PLMs while RightTool [30] leveraged the same early-exit criterion as in the Shallow-Deep Network [5].”
- BERT-QE: Contextualized Query Expansion for Document Re-ranking (2020, methodology): “Akin to literature (Liu et al., 2020), we report FLOPs (floating point operations) which measures the computational complexity of models.”
- Compressing Large-Scale Transformer-Based Models: A Case Study on BERT (2020, neutral): “In this section, we compare the performance of BERT compression techniques based on their final model size and run-time speedup, as well as their accuracy/F1 scores on various NLP tasks.”
- SqueezeBERT: What can computer vision teach NLP about efficient neural networks? (2020, neutral): “, 2020), FastBERT (Liu et al., 2020), and Schwartz et al.”
- FastFormers: Highly Efficient Transformer Models for Natural Language Understanding (2020, methodology): “For future directions, some other methods such as early exiting (Xin et al., 2020; Liu et al., 2020; Schwartz et al., 2020; Zhou et al., 2020) and linear time complexity self-attention models (Shen et al., 2018; Wang et al., 2020) could be added to the proposed recipes and possibly improve the…”
- RomeBERT: Robust Training of Multi-Exit BERT (2021, methodology): “FastBERT (Liu et al., 2020) proposes a similar structure as DeeBERT by adding knowledge transfer from deep exits to shallow exits.”
- Early Exiting BERT for Efficient Document Ranking (2020, methodology): “, 2017), and is also applied to NLP tasks in several papers (Xin et al., 2020; Schwartz et al., 2020; Liu et al., 2020; Zhou et al., 2020).”
- Confident Adaptive Language Modeling (2022, positive): “Multiple early-exit techniques for encoder-only Transformers (e.g., BERT [20]) have been recently proposed [8; 34; 43; 44; 45; 60; 68; 83; 90; 92].”