FastBERT: a Self-distilling BERT with Adaptive Inference Time
arXiv:2004.02178
Abstract
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.
This manuscript has been accepted to appear at ACL 2020
References in corpus (8)
- Distilling the Knowledge in a Neural Network
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
- FitNets: Hints for Thin Deep Nets
- XLNet: Generalized Autoregressive Pretraining for Language Understanding
- Compressing Deep Convolutional Networks using Vector Quantization
- ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- ERNIE: Enhanced Representation through Knowledge Integration
- Adaptive Computation Time for Recurrent Neural Networks
Cited by in corpus (23)
- Knowledge Distillation: A Survey
- Pre-trained Models for Natural Language Processing: A Survey
- Split Computing and Early Exiting for Deep Learning Applications: Survey and Research Challenges
- TinyBERT: Distilling BERT for Natural Language Understanding
- Pretrained Transformers for Text Ranking: BERT and Beyond
- Adaptive Inference through Early-Exit Networks: Design, Challenges and Directions
- BERT Loses Patience: Fast and Robust Inference with Early Exit
- BinaryBERT: Pushing the Limit of BERT Quantization
- Dynamic Neural Networks: A Survey
- AutoFreeze: Automatically Freezing Model Blocks to Accelerate Fine-tuning
- Co-BERT: A Context-Aware BERT Retrieval Model Incorporating Local and Query-specific Context
- Length-Adaptive Transformer: Train Once with Length Drop, Use Anytime with Search
- Do We Need Online NLU Tools?
- HR-NAS: Searching Efficient High-Resolution Neural Architectures with Lightweight Transformers
- Pseudo Relevance Feedback with Deep Language Models and Dense Retrievers: Successes and Pitfalls
- IOT: Instance-wise Layer Reordering for Transformer Structures
- DS-Net++: Dynamic Weight Slicing for Efficient Inference in CNNs and Transformers
- Improving Task-Agnostic BERT Distillation with Layer Mapping Search
- Retraining DistilBERT for a Voice Shopping Assistant by Using Universal Dependencies
- Improving NER's Performance with Massive financial corpus
- When in Doubt, Summon the Titans: Efficient Inference with Large Models
- Elbert: Fast Albert with Confidence-Window Based Early Exit
- Learning Dynamic BERT via Trainable Gate Variables and a Bi-modal Regularizer