ChatPaper.aiChatPaper

RWKV: 트랜스포머 시대를 위한 RNN의 재창조

RWKV: Reinventing RNNs for the Transformer Era

May 22, 2023
저자: 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
cs.AI

초록

트랜스포머(Transformers)는 거의 모든 자연어 처리(NLP) 작업에 혁명을 일으켰지만, 시퀀스 길이에 따라 제곱으로 증가하는 메모리 및 계산 복잡성 문제를 안고 있습니다. 반면, 순환 신경망(RNNs)은 메모리와 계산 요구 사항이 선형적으로 증가하지만, 병렬화 및 확장성의 한계로 인해 트랜스포머와 동일한 성능을 내기 어렵습니다. 우리는 트랜스포머의 효율적인 병렬화 학습과 RNN의 효율적인 추론을 결합한 새로운 모델 아키텍처인 Receptance Weighted Key Value(RWKV)를 제안합니다. 우리의 접근 방식은 선형 어텐션 메커니즘을 활용하여 모델을 트랜스포머 또는 RNN으로 공식화할 수 있게 하며, 학습 중에는 계산을 병렬화하고 추론 중에는 일정한 계산 및 메모리 복잡도를 유지함으로써 수백억 개의 파라미터로 확장된 최초의 비-트랜스포머 아키텍처를 구현합니다. 우리의 실험 결과, RWKV는 동일한 크기의 트랜스포머와 비슷한 성능을 보여주며, 이 아키텍처를 활용하여 더 효율적인 모델을 만들 수 있는 가능성을 제시합니다. 이 연구는 시퀀스 처리 작업에서 계산 효율성과 모델 성능 간의 트레이드오프를 조화시키는 데 있어 중요한 진전을 이루었습니다.
English
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.
PDF191December 15, 2024