LongNet: Scaling Transformers to 1,000,000,000 Tokens

要約

大規模な言語モデルの時代では、シーケンスの長さをスケーリングすることが重要な要求になっています。
ただし、既存の方法では計算の複雑さまたはモデルの表現力に問題があり、シーケンスの最大長が制限されています。
この問題に対処するために、短いシーケンスのパフォーマンスを犠牲にすることなく、シーケンスの長さを 10 億トークンを超えるトークンに拡張できる Transformer のバリアントである LongNet を導入します。
具体的には、距離が伸びるにつれて注意のフィールドを指数関数的に拡大する拡張型注意を提案します。
LongNet には大きな利点があります。1) 線形計算の複雑さと、シーケンス内の任意の 2 つのトークン間の対数依存性があります。
2) 非常に長いシーケンスの分散トレーナーとして機能します。
3) その拡張された注意は、標準的な注意のドロップイン代替品であり、既存の Transformer ベースの最適化とシームレスに統合できます。
実験結果は、LongNet が長いシーケンスのモデリングと一般的な言語タスクの両方で優れたパフォーマンスを発揮することを示しています。
私たちの研究は、コーパス全体やインターネット全体をシーケンスとして扱うなど、非常に長いシーケンスをモデル化するための新たな可能性を切り開きます。

要約(オリジナル)

Scaling sequence length has become a critical demand in the era of large language models. However, existing methods struggle with either computational complexity or model expressivity, rendering the maximum sequence length restricted. To address this issue, we introduce LongNet, a Transformer variant that can scale sequence length to more than 1 billion tokens, without sacrificing the performance on shorter sequences. Specifically, we propose dilated attention, which expands the attentive field exponentially as the distance grows. LongNet has significant advantages: 1) it has a linear computation complexity and a logarithm dependency between any two tokens in a sequence; 2) it can be served as a distributed trainer for extremely long sequences; 3) its dilated attention is a drop-in replacement for standard attention, which can be seamlessly integrated with the existing Transformer-based optimization. Experiments results demonstrate that LongNet yields strong performance on both long-sequence modeling and general language tasks. Our work opens up new possibilities for modeling very long sequences, e.g., treating a whole corpus or even the entire Internet as a sequence.

arxiv情報

著者 Jiayu Ding,Shuming Ma,Li Dong,Xingxing Zhang,Shaohan Huang,Wenhui Wang,Nanning Zheng,Furu Wei
発行日 2023-07-19 12:25:35+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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