A Training-Free Length Extrapolation Approach for LLMs: Greedy Attention Logit Interpolation
Yan Li, Tianyi Zhang, Zechuan Li, Caren Han
摘要
Transformer-based Large Language Models (LLMs) struggle with inputs exceeding their training context window due to positional outof-distribution (O.O.D.) issues that disrupt attention. Existing solutions, including finetuning and training-free methods, face challenges like inefficiency, redundant interpolation, logit outliers, or loss of local positional information. We propose Greedy Attention Logit Interpolation (GALI), a training-free method that improves length extrapolation by greedily reusing pretrained positional intervals and interpolating attention logit to eliminate outliers. GALI achieves stable and superior performance across a wide range of long-context tasks without requiring input-length-specific tuning. Our analysis further reveals that LLMs interpret positional intervals unevenly and that restricting interpolation to narrower ranges improves performance, even on short-context tasks. GALI represents a step toward more robust and generalizable long-text processing in LLMs. Our implementation of GALI, along with the experiments from our paper, is open-sourced at https://github.com/adlnlp/Gali .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
脉络
- Efficient Streaming Language Models with Attention Sinks 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- Efficient Streaming Language Models with Attention Sinks 引用了 Compressive Transformers for Long-Range Sequence Modelling
- YaRN: Efficient Context Window Extension of Large Language Models 引用了 Compressive Transformers for Long-Range Sequence Modelling
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 Efficient Streaming Language Models with Attention Sinks
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 Compressive Transformers for Long-Range Sequence Modelling
- LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- LongLoRA: Efficient Fine-tuning of Long-Context Large Language Models 引用了 Compressive Transformers for Long-Range Sequence Modelling
它引用的 Paper11
- Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
- 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 次引用
- LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu 等ICML 2024 · 316 次引用
- LongLoRA: Efficient Fine-tuning of Long-Context Large Language ModelsYukang Chen, Shengju Qian, Haotian Tang, Xin Lai 等ICLR 2024 · 254 次引用
相关 Paper
- Exploring Context Window of Large Language Models via Decomposed Positional VectorsZican Dong, Junyi Li, Xin Men, Xin Zhao 等NeurIPS 2024 · 37 次引用
- LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without TrainingSikui Zhang, Guangze Gao, Ziyun Gan, Chunfeng Yuan 等ACL Findings 2026
- PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise TrainingDawei Zhu, Nan Yang, Liang Wang, Yifan Song 等ICLR 2024 · 110 次引用
- Context Length Extension via Generalized Extrapolation ScaleLinhan Li, Huaping ZhangACL Findings 2024
- ReAttention: Training-Free Infinite Context with Finite Attention ScopeXiaoran Liu, Ruixiao Li, Zhigeng Liu, Qipeng Guo 等ICLR 2025
