LongNet: Scaling Transformers to 1,000,000,000 Tokens
AI-generated Key Points
⚠The license of the paper does not allow us to build upon its content and the key points are generated using the paper metadata rather than the full article.
- LongNet is a Transformer variant designed to scale sequence length in large language models.
- Existing methods struggle with computational complexity or model expressivity, limiting maximum sequence length.
- The authors propose dilated attention to exponentially expand the attentive field as token distance increases.
- LongNet can handle sequences longer than 1 billion tokens without sacrificing performance on shorter sequences.
- Advantages of LongNet include linear computation complexity, logarithmic dependency between tokens, and distributed training for extremely long sequences.
- LongNet can seamlessly replace standard attention in existing Transformer-based optimization frameworks.
- Experimental results demonstrate strong performance on both long-sequence modeling and general language tasks.
- This breakthrough enables modeling very long sequences like an entire corpus or the entire Internet as a single sequence.
- Authors of this work: Jiayu Ding, Shuming Ma, Li Dong, Xingxing Zhang, Shaohan Huang, Wenhui Wang, Furu Wei.
Authors: Jiayu Ding, Shuming Ma, Li Dong, Xingxing Zhang, Shaohan Huang, Wenhui Wang, Furu Wei
Abstract: 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. In this work, 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 tokens; 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.
Ask questions about this paper to our AI assistant
You can also chat with multiple papers at once here.
⚠The license of the paper does not allow us to build upon its content and the AI assistant only knows about the paper metadata rather than the full article.