ACL 2022long26 citations

SkipBERT: Efficient Inference with Shallow Layer Skipping

Jue Wang, Ke Chen, Gang Chen, Lidan Shou, Julian McAuley

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 runtime 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.

BibTeX
@inproceedings{wang-etal-2022-skipbert,
    title = "{S}kip{BERT}: Efficient Inference with Shallow Layer Skipping",
    author = "Wang, Jue  and
      Chen, Ke  and
      Chen, Gang  and
      Shou, Lidan  and
      McAuley, Julian",
    editor = "Muresan, Smaranda  and
      Nakov, Preslav  and
      Villavicencio, Aline",
    booktitle = "Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
    month = may,
    year = "2022",
    address = "Dublin, Ireland",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2022.acl-long.503/",
    doi = "10.18653/v1/2022.acl-long.503",
    pages = "7287--7301"
}
SkipBERT: Efficient Inference with Shallow Layer Skipping · ACL 2022