accelerating bert inference
r/MachineLearning - [R] DeeBERT: Dynamic Early Exiting for Accelerating BERT Inference
Abstract: Large-scale pre-trained language models such as BERT have brought significant improvements to NLP applications. However, they are also notorious for being slow in inference, which makes them difficult to deploy in real-time applications. We propose a simple but effective method, DeeBERT, to accelerate BERT inference. Our approach allows samples to exit earlier without passing through the entire model. Experiments show that DeeBERT is able to save up to 40% inference time with minimal degradation in model quality.