Retentive Network: A Successor to Transformer for Large Language Models

要約

この研究では、大規模な言語モデルの基礎アーキテクチャとして Retentive Network (RetNet) を提案し、同時にトレーニングの並列処理、低コストの推論、優れたパフォーマンスを実現します。
私たちは、再発と注意の関係を理論的に導き出します。
次に、並列、再帰、チャンクごとの再帰という 3 つの計算パラダイムをサポートするシーケンス モデリングの保持メカニズムを提案します。
具体的には、並列表現によりトレーニングの並列処理が可能になります。
再帰的表現により、低コストの $O(1)$ 推論が可能になり、パフォーマンスを犠牲にすることなくデコードのスループット、レイテンシ、GPU メモリが向上します。
チャンクごとの再帰表現により、線形複雑性を備えた効率的な長いシーケンスのモデリングが容易になります。各チャンクは再帰的に要約されながら並列的にエンコードされます。
言語モデリングに関する実験結果は、RetNet が良好なスケーリング結果、並列トレーニング、低コストの導入、および効率的な推論を達成することを示しています。
興味深い特性により、RetNet は大規模言語モデル用の Transformer の強力な後継者になります。
コードは https://aka.ms/retnet で入手できます。

要約(オリジナル)

In this work, we propose Retentive Network (RetNet) as a foundation architecture for large language models, simultaneously achieving training parallelism, low-cost inference, and good performance. We theoretically derive the connection between recurrence and attention. Then we propose the retention mechanism for sequence modeling, which supports three computation paradigms, i.e., parallel, recurrent, and chunkwise recurrent. Specifically, the parallel representation allows for training parallelism. The recurrent representation enables low-cost $O(1)$ inference, which improves decoding throughput, latency, and GPU memory without sacrificing performance. The chunkwise recurrent representation facilitates efficient long-sequence modeling with linear complexity, where each chunk is encoded parallelly while recurrently summarizing the chunks. Experimental results on language modeling show that RetNet achieves favorable scaling results, parallel training, low-cost deployment, and efficient inference. The intriguing properties make RetNet a strong successor to Transformer for large language models. Code will be available at https://aka.ms/retnet.

arxiv情報

著者 Yutao Sun,Li Dong,Shaohan Huang,Shuming Ma,Yuqing Xia,Jilong Xue,Jianyong Wang,Furu Wei
発行日 2023-07-25 06:47:43+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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