Qinghua Zhou
2023
RWKV: Reinventing RNNs for the Transformer Era
Bo Peng
|
Eric Alcaide
|
Quentin Anthony
|
Alon Albalak
|
Samuel Arcadinho
|
Stella Biderman
|
Huanqi Cao
|
Xin Cheng
|
Michael Chung
|
Leon Derczynski
|
Xingjian Du
|
Matteo Grella
|
Kranthi Gv
|
Xuzheng He
|
Haowen Hou
|
Przemyslaw Kazienko
|
Jan Kocon
|
Jiaming Kong
|
Bartłomiej Koptyra
|
Hayden Lau
|
Jiaju Lin
|
Krishna Sri Ipsit Mantri
|
Ferdinand Mom
|
Atsushi Saito
|
Guangyu Song
|
Xiangru Tang
|
Johan Wind
|
Stanisław Woźniak
|
Zhenyuan Zhang
|
Qinghua Zhou
|
Jian Zhu
|
Rui-Jie Zhu
Findings of the Association for Computational Linguistics: EMNLP 2023
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, thus parallelizing computations during training and maintains constant computational and memory complexity during inference. We scale our models as large as 14 billion parameters, by far the largest dense RNN ever trained, and find RWKV performs on par with similarly sized Transformers, suggesting future work can leverage this architecture to create more efficient models. This work presents a significant step towards reconciling trade-offs between computational efficiency and model performance in sequence processing tasks.
Search
Co-authors
- Bo Peng 1
- Eric Alcaide 1
- Quentin Anthony 1
- Alon Albalak 1
- Samuel Arcadinho 1
- show all...
- Stella Biderman 1
- Huanqi Cao 1
- Xin Cheng 1
- Michael Chung 1
- Leon Derczynski 1
- Xingjian Du 1
- Matteo Grella 1
- Kranthi Gv 1
- Xuzheng He 1
- Haowen Hou 1
- Przemyslaw Kazienko 1
- Jan Kocoń 1
- Jiaming Kong 1
- Bartłomiej Koptyra 1
- Hayden Lau 1
- Jiaju Lin 1
- Krishna Sri Ipsit Mantri 1
- Ferdinand Mom 1
- Atsushi Saito 1
- Guangyu Song 1
- Xiangru Tang 1
- Johan Wind 1
- Stanisław Woźniak 1
- Zhenyuan Zhang 1
- Jian Zhu 1
- Rui-Jie Zhu 1