about
Exponentially Faster Language Modelling (arxiv.org)
2 points by fgfm on Nov 21, 2023 | hide | past | pdf | 1 comment on HN

In plain words: A new BERT text model wakes up only a tiny handful of neurons in each layer's middle part, skipping the rest to answer faster. It scored the same as similar BERT models, and its core step ran 78 times faster than the usual version.

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.

Peter Belcak, Roger Wattenhofer
arXiv:2311.10770 · cs.CL, cs.AI, cs.LG, cs.NE · submitted Nov 15, 2023 · updated Nov 21, 2023
abstract · pdf · html

add comment on HN
Also discussed: Nov 2023 (237 points, 1 comment) · Nov 2023 (301 points, 137 comments)

Comments moved to https://news.ycombinator.com/item?id=38364084, which was posted earlier...