ACL Findings2024
Context Length Extension via Generalized Extrapolation Scale
Linhan Li, Huaping Zhang
摘要
Context length expansion of transformer models is considered a key challenge, especially when handling context beyond the training length during inference stage. In this paper, we propose Generalized extrapolatioN scalE (GeNE), a straightforward and effective method applied to the interpolate function of positional embeddings to achieve training short, test long. Experimental results show that GeNE notably improves long context language modeling. By randomly scaling the extrapolation ratio during the finetuning, GeNE achieves stable extrapolation on 64k contexts by training on 16k length. Further, the instruction following Llama2 model based on GeNE achieved competitive results compared with other open-source models of the same parameter scale. Our code is available at https: //github.com/LhLi-QED/GeNE.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation 引用了 Compressive Transformers for Long-Range Sequence Modelling
- YaRN: Efficient Context Window Extension of Large Language Models 引用了 Compressive Transformers for Long-Range Sequence Modelling
它引用的 Paper13
- FlashAttention-2: Faster Attention with Better Parallelism and Work PartitioningTri DaoICLR 2024 · 2,600 次引用
- Train Short, Test Long: Attention with Linear Biases Enables Input Length ExtrapolationOfir Press, Noah A. Smith, Mike LewisICLR 2022 · 1,168 次引用
- ZeRO: memory optimizations toward training trillion parameter modelsSamyam Rajbhandari, Jeff Rasley, Olatunji Ruwase, Yuxiong HeSC 2020 · 852 次引用
- Compressive Transformers for Long-Range Sequence ModellingJack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier 等ICLR 2020 · 833 次引用
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
相关 Paper
- A Length-Extrapolatable TransformerYutao Sun, Li Dong, Barun Patra, Shuming Ma 等ACL 2023 · 45 次引用
- PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise TrainingDawei Zhu, Nan Yang, Liang Wang, Yifan Song 等ICLR 2024 · 110 次引用
- CLEX: Continuous Length Extrapolation for Large Language ModelsGuanzheng Chen, Xin Li, Zaiqiao Meng, Shangsong Liang 等ICLR 2024 · 39 次引用
- Length Extrapolation of Transformers: A Survey from the Perspective of Positional EncodingLiang Zhao, Xiachong Feng, Xiaocheng Feng, Weihong Zhong 等EMNLP Findings 2024 · 14 次引用
- A Training-Free Length Extrapolation Approach for LLMs: Greedy Attention Logit InterpolationYan Li, Tianyi Zhang, Zechuan Li, Caren HanEMNLP 2025
