Exponentially Faster Language Modelling
Peter Belcak, Roger Wattenhofer

TL;DR
This paper introduces UltraFastBERT, a highly efficient language model variant that uses only 0.3% of neurons during inference, achieving significant speedups while maintaining performance.
Contribution
The paper presents UltraFastBERT, a novel BERT variant with selective neuron engagement and fast feedforward networks, enabling exponential inference speed improvements.
Findings
UltraFastBERT uses 0.3% of neurons during inference.
Achieves up to 78x speedup on CPU and 40x on GPU.
Maintains comparable performance to standard BERT models.
Abstract
Language models only really need to use an exponential fraction of their neurons for individual inferences. As proof, we present UltraFastBERT, a BERT variant that uses 0.3% of its neurons during inference while performing on par with similar BERT models. UltraFastBERT selectively engages just 12 out of 4095 neurons for each layer inference. This is achieved by replacing feedforward networks with fast feedforward networks (FFFs). While no truly efficient implementation currently exists to unlock the full acceleration potential of conditional neural execution, we provide high-level CPU code achieving 78x speedup over the optimized baseline feedforward implementation, and a PyTorch implementation delivering 40x speedup over the equivalent batched feedforward inference. We publish our training code, benchmarking setup, and model weights.
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 · Advanced Neural Network Applications · Natural Language Processing Techniques
MethodsRefunds@Expedia|||How do I get a full refund from Expedia? · Multi-Head Attention · Attention Is All You Need · Linear Layer · WordPiece · Residual Connection · Fast Feedforward Networks · Layer Normalization · Adam · Linear Warmup With Linear Decay
