NarrowBERT: Accelerating Masked Language Model Pretraining and Inference
Haoxin Li, Phillip Keung, Daniel Cheng, Jungo Kasai, Noah A. Smith

TL;DR
NarrowBERT is a sparsified transformer model that significantly accelerates masked language model pretraining and inference by focusing computation on masked tokens, with minimal impact on downstream task performance.
Contribution
It introduces a novel sparsification technique for transformers that boosts pretraining and inference throughput without degrading accuracy.
Findings
Over 2x faster pretraining throughput
Up to 3.5x faster inference speed
Comparable performance on downstream NLP tasks
Abstract
Large-scale language model pretraining is a very successful form of self-supervised learning in natural language processing, but it is increasingly expensive to perform as the models and pretraining corpora have become larger over time. We propose NarrowBERT, a modified transformer encoder that increases the throughput for masked language model pretraining by more than . NarrowBERT sparsifies the transformer model such that the self-attention queries and feedforward layers only operate on the masked tokens of each sentence during pretraining, rather than all of the tokens as with the usual transformer encoder. We also show that NarrowBERT increases the throughput at inference time by as much as with minimal (or no) performance degradation on sentence encoding tasks like MNLI. Finally, we examine the performance of NarrowBERT on the IMDB and Amazon reviews…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Natural Language Processing Techniques · Speech Recognition and Synthesis
MethodsMulti-Head Attention · Attention Is All You Need · Adam · Residual Connection · Dense Connections · Layer Normalization · WordPiece · Attention Dropout · Weight Decay · Linear Layer
