Exponentially Faster Language Modelling

要約

言語モデルが実際に必要とするのは、個々の推論にニューロンの指数関数的な部分だけを使用することです。
その証拠として、同様の BERT モデルと同等のパフォーマンスを示しながら、推論中にニューロンの 0.3% を使用する BERT のバリアントである UltraFastBERT を紹介します。
UltraFastBERT は、各層の推論で 4095 個のニューロンのうち 12 個だけを選択的に使用します。
これは、フィードフォワード ネットワークを高速フィードフォワード ネットワーク (FFF) に置き換えることによって実現されます。
条件付きニューラル実行の高速化の可能性を最大限に引き出す真に効率的な実装は現在存在しませんが、最適化されたベースライン フィードフォワード実装と比較して 78 倍の高速化を達成する高レベルの CPU コードと、同等のバッチ処理されたフィードフォワード推論と比較して 40 倍の高速化を実現する PyTorch 実装を提供します。
トレーニング コード、ベンチマーク設定、モデルの重みを公開しています。

要約(オリジナル)

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.

arxiv情報

著者 Peter Belcak,Roger Wattenhofer
発行日 2023-11-21 06:59:59+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL, cs.LG, cs.NE パーマリンク