A Length-Extrapolatable Transformer
Yutao Sun, Li Dong, Barun Patra, Shuming Ma, Shaohan Huang, Alon Benhaim, Vishrav Chaudhary, Xia Song, Furu Wei
摘要
Position modeling plays a critical role in Transformers. In this paper, we focus on length extrapolation, i.e., training on short texts while evaluating longer sequences. We define attention resolution as an indicator of extrapolation. Then we propose two designs to improve the above metric of Transformers. Specifically, we introduce a relative position embedding to explicitly maximize attention resolution. Moreover, we use blockwise causal attention during inference for better efficiency. The proposed architecture is named Length-Extrapolatable (LEX) Transformer. We evaluate different Transformer variants on language modeling. Experimental results show that our model achieves better performance in both interpolation and extrapolation settings. The code will be available at https://aka.ms/ LeX-Transformer .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 61 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Data Engineering for Scaling Language Models to 128K Context 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- Data Engineering for Scaling Language Models to 128K Context 引用了 Language Models are Few-Shot Learners
- Data Engineering for Scaling Language Models to 128K Context 引用了 Gated Linear Attention Transformers with Hardware-Efficient Training
- Language Is Not All You Need: Aligning Perception with Language Models 引用了 Learning Transferable Visual Models From Natural Language Supervision
- Deberta: decoding-Enhanced Bert with Disentangled Attention 引用了 Language Models are Few-Shot Learners
- An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale 引用了 Language Models are Few-Shot Learners
- InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory 引用了 Big Bird: Transformers for Longer Sequences
- InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memory 引用了 Language Models are Few-Shot Learners
- Learning Transferable Visual Models From Natural Language Supervision 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Learning Transferable Visual Models From Natural Language Supervision 引用了 Language Models are Few-Shot Learners
- Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Big Bird: Transformers for Longer Sequences
引用它的顶会 Paper61
- Language Is Not All You Need: Aligning Perception with Language ModelsShaohan Huang, Li Dong, Wenhui Wang, Yaru Hao 等NeurIPS 2023 · 810 次引用
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
- Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda 等ICML 2024 · 390 次引用
- InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context MemoryChaojun Xiao, Pengle Zhang, Xu Han, Guangxuan Xiao 等NeurIPS 2024 · 223 次引用
- Data Engineering for Scaling Language Models to 128K ContextYao Fu, Rameswar Panda, Xinyao Niu, Xiang Yue 等ICML 2024 · 204 次引用
它引用的 Paper12
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh 等ICML 2021 · 47,906 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 次引用
- Big Bird: Transformers for Longer SequencesManzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie 等NeurIPS 2020 · 3,159 次引用
相关 Paper
- Context Length Extension via Generalized Extrapolation ScaleLinhan Li, Huaping ZhangACL Findings 2024
- LEDiT: Your Length-Extrapolatable Diffusion Transformer without Positional EncodingShen Zhang, Siyuan Liang, Yaning Tan, Zhaowei Chen 等NeurIPS 2025 · 4 次引用
- StableMask: Refining Causal Masking in Decoder-only TransformerQingyu Yin, Xuzheng He, Xiang Zhuang, Yu Zhao 等ICML 2024 · 23 次引用
- Exploring Transformer ExtrapolationZhen Qin, Yiran Zhong, Hui DengAAAI 2024 · 12 次引用
- SWAN: An Efficient and Scalable Approach for Long-Context Language ModelingKrishna C. Puvvada, Faisal Ladhak, Santiago Akle Serano, Cheng-Ping Hsieh 等EMNLP 2025
