EBERT: Efficient BERT Inference with Dynamic Structured Pruning.

Zejian Liu,Fanrong Li,Gang Li,Jian Cheng
DOI: https://doi.org/10.18653/v1/2021.findings-acl.425
2021-01-01
Abstract:Pruning has been demonstrated as an effective way of reducing computational complexity for deep networks, especially CNNs for computer vision tasks. In this paper, we investigate the opportunity to accelerate the inference of large-scale pre-trained language model via pruning. We propose EBERT, a dynamic structured pruning algorithm for efficient BERT inference. Unlike previous methods that randomly prune the model weights for static inference, EBERT dynamically determines and prunes the unimportant heads in multi-head self-attention layers and the unimportant structured computations in feed-forward network for each input sample at run-time. Experimental results show that our proposed EBERT outperforms other state-of-the-art methods on different tasks.
What problem does this paper attempt to address?