SkipBERT: Efficient Inference with Shallow Layer Skipping

28Citations
Citations of this article
52Readers
Mendeley users who have this article in their library.

Abstract

In this paper, we propose SkipBERT to accelerate BERT inference by skipping the computation of shallow layers. To achieve this, our approach encodes small text chunks into independent representations, which are then materialized to approximate the shallow representation of BERT. Since the use of such approximation is inexpensive compared with transformer calculations, we leverage it to replace the shallow layers of BERT to skip their run-time overhead. With off-the-shelf early exit mechanisms, we also skip redundant computation from the highest few layers to further improve inference efficiency. Results on GLUE show that our approach can reduce latency by 65% without sacrificing performance. By using only two-layer transformer calculations, we can still maintain 95% accuracy of BERT.

Cite

CITATION STYLE

APA

Wang, J., Chen, K., Chen, G., Shou, L., & McAuley, J. (2022). SkipBERT: Efficient Inference with Shallow Layer Skipping. In Proceedings of the Annual Meeting of the Association for Computational Linguistics (Vol. 1, pp. 7287–7301). Association for Computational Linguistics (ACL). https://doi.org/10.18653/v1/2022.acl-long.503

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free