RWKV: Reinventing RNNs for the Transformer Era

要約

トランスフォーマーは、ほぼすべての自然言語処理 (NLP) タスクに革命をもたらしましたが、シーケンスの長さに応じて二次関数的にスケールされるメモリと計算の複雑さに悩まされています。
対照的に、リカレント ニューラル ネットワーク (RNN) はメモリと計算要件において線形スケーリングを示しますが、並列化とスケーラビリティに制限があるため、Transformer と同じパフォーマンスに匹敵するのは困難です。
我々は、Transformer の効率的な並列化トレーニングと RNN の効率的な推論を組み合わせた、新しいモデル アーキテクチャである Receptance Weighted Key Value (RWKV) を提案します。
私たちのアプローチは線形アテンション メカニズムを活用し、モデルをトランスフォーマーまたは RNN として定式化することを可能にします。これにより、トレーニング中に計算が並列化され、推論中に一定の計算とメモリの複雑さが維持されます。これにより、トランスフォーマー以外のアーキテクチャが数十にスケールされる初の非トランスフォーマー アーキテクチャが実現します。
数十億のパラメータ。
私たちの実験では、RWKV が同様のサイズのトランスフォーマーと同等のパフォーマンスを発揮することが明らかになり、将来の研究ではこのアーキテクチャを活用してより効率的なモデルを作成できることが示唆されています。
この研究は、シーケンス処理タスクにおける計算効率とモデルのパフォーマンスの間のトレードオフを調整するための重要な一歩を示しています。

要約(オリジナル)

Transformers have revolutionized almost all natural language processing (NLP) tasks but suffer from memory and computational complexity that scales quadratically with sequence length. In contrast, recurrent neural networks (RNNs) exhibit linear scaling in memory and computational requirements but struggle to match the same performance as Transformers due to limitations in parallelization and scalability. We propose a novel model architecture, Receptance Weighted Key Value (RWKV), that combines the efficient parallelizable training of Transformers with the efficient inference of RNNs. Our approach leverages a linear attention mechanism and allows us to formulate the model as either a Transformer or an RNN, which parallelizes computations during training and maintains constant computational and memory complexity during inference, leading to the first non-transformer architecture to be scaled to tens of billions of parameters. Our experiments reveal that RWKV performs on par with similarly sized Transformers, suggesting that future work can leverage this architecture to create more efficient models. This work presents a significant step towards reconciling the trade-offs between computational efficiency and model performance in sequence processing tasks.

arxiv情報

著者 Bo Peng,Eric Alcaide,Quentin Anthony,Alon Albalak,Samuel Arcadinho,Huanqi Cao,Xin Cheng,Michael Chung,Matteo Grella,Kranthi Kiran GV,Xuzheng He,Haowen Hou,Przemyslaw Kazienko,Jan Kocon,Jiaming Kong,Bartlomiej Koptyra,Hayden Lau,Krishna Sri Ipsit Mantri,Ferdinand Mom,Atsushi Saito,Xiangru Tang,Bolun Wang,Johan S. Wind,Stansilaw Wozniak,Ruichong Zhang,Zhenyuan Zhang,Qihang Zhao,Peng Zhou,Jian Zhu,Rui-Jie Zhu
発行日 2023-05-22 13:57:41+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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