mlsanityData to 14 Oct 2026

CLEX: Continuous Length Extrapolation for Large Language Models

arXiv 2310.16450 ↗First posted 25 Oct 2023cs.CLcited by 44

Not on the map. Why?

Abstract (arXiv)

Transformer-based Large Language Models (LLMs) are pioneering advances in many natural language processing tasks, however, their exceptional capabilities are restricted within the preset context window of Transformer. Position Embedding (PE) scaling methods, while effective in extending the context window to a specific length, demonstrate either notable limitations in their extrapolation abilities or sacrificing partial performance within the context window. Length extrapolation methods, although theoretically capable of extending the context window beyond the training sequence length, often underperform in practical long-context applications. To address these challenges, we propose Continuous Length EXtrapolation (CLEX) for LLMs. We generalise the PE scaling approaches to model the continuous dynamics by ordinary differential equations over the length scaling factor, thereby overcoming the constraints of current PE scaling methods designed for specific lengths. Moreover, by extending the dynamics to desired context lengths beyond the training sequence length, CLEX facilitates the length extrapolation with impressive performance in practical tasks. We demonstrate that CLEX can be seamlessly incorporated into LLMs equipped with Rotary Position Embedding, such as LLaMA and GPT-NeoX, with negligible impact on training and inference latency. Experimental results reveal that CLEX can effectively extend the context window to over 4x or almost 8x training length, with no deterioration in performance. Furthermore, when evaluated on the practical LongBench benchmark, our model trained on a 4k length exhibits competitive performance against state-of-the-art open-source models trained on context lengths up to 32k. Our code is available at https://github.com/DAMO-NLP-SG/CLEX.

Key facts. Cited by 44 papers in the map (data through 14 Oct 2026). Builds on 25 of its 30 references that are in the map. First posted on arXiv 25 Oct 2023.

Builds on

25 of 30 references.

References · 25

  1. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 14,132
  2. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  3. 2021Finetuned Language Models Are Zero-Shot Learnerscited by 3,780
  4. 2018Neural Ordinary Differential Equationscited by 3,779
  5. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
  6. 2020Longformer: The Long-Document Transformercited by 3,413
  7. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  8. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,411
  9. 2019Transformer-XL: Attentive Language Models Beyond a Fixed-Length Contextcited by 1,850
  10. 2019Generating Long Sequences with Sparse Transformerscited by 1,546
  11. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  12. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
13 more
  1. 2023Enhancing Chat Language Models by Scaling High-quality Instructional Conversationscited by 839
  2. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  3. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
  4. 2022GPT-NeoX-20B: An Open-Source Autoregressive Language Modelcited by 713
  5. 2023YaRN: Efficient Context Window Extension of Large Language Modelscited by 601
  6. 2023LongNet: Scaling Transformers to 1,000,000,000 Tokenscited by 204
  7. 2022Recurrent Memory Transformercited by 203
  8. 2022A Length-Extrapolatable Transformercited by 127
  9. 2023Randomized Positional Encodings Boost Length Generalization of Transformerscited by 117
  10. 2023Scaling Transformer to 1M tokens and beyond with RMTcited by 98
  11. 2022KERPLE: Kernelized Relative Positional Embedding for Length Extrapolationcited by 86
  12. 2022Dissecting Transformer Length Extrapolation via the Lens of Receptive Field Analysiscited by 42
  13. 2023Giraffe: Adventures in Expanding Context Lengths in LLMscited by 33

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 2; 2024: 25; 2025: 13; 2026: 4.

44 papers.

Sort:

By area:

  1. 2024InfLLM: Training-Free Long-Context Extrapolation for LLMs with an Efficient Context Memorycited by 197
  2. 2023Efficient Large Language Models: A Surveycited by 186
  3. 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 136
  4. 2024A Survey of Resource-efficient LLM and Multimodal Foundation Modelscited by 86
  5. 2025Lifelong Learning of Large Language Model based Agents: A Roadmapcited by 83
  6. 2024Beyond the Limits: A Survey of Techniques to Extend the Context Length in Large Language Modelscited by 76
  7. 2023Advancing Transformer Architecture in Long-Context Large Language Models: A Comprehensive Surveycited by 72
  8. 2024Found in the Middle: How Language Models Use Long Contexts Better via Plug-and-Play Positional Encodingcited by 72
  9. 2024What is Wrong with Perplexity for Long-context Language Modeling?cited by 69
  10. 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
  11. 2024Training-Free Long-Context Scaling of Large Language Modelscited by 62
  12. 2024Human-inspired Episodic Memory for Infinite Context LLMscited by 62
32 more
  1. 2024Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding?cited by 45
  2. 2024Fourier Position Embedding: Enhancing Attention's Periodic Extension for Length Generalizationcited by 39
  3. 2024With Greater Text Comes Greater Necessity: Inference-Time Training Helps Long Text Generationcited by 37
  4. 2024MambaLRP: Explaining Selective State Space Sequence Modelscited by 32
  5. 2024DAPE: Data-Adaptive Positional Encoding for Length Extrapolationcited by 31
  6. 2024A Controlled Study on Long Context Extension and Generalization in LLMscited by 26
  7. 2024Two Stones Hit One Bird: Bilevel Positional Encoding for Better Length Extrapolationcited by 24
  8. 2025LongPO: Long Context Self-Evolution of Large Language Models through Short-to-Long Preference Optimizationcited by 24
  9. 2024Quest: Query-centric Data Synthesis Approach for Long-context Scaling of Large Language Modelcited by 16
  10. 2024When Precision Meets Position: BFloat16 Breaks Down RoPE in Long-Context Trainingcited by 15
  11. 2025ParallelComp: Parallel Long-Context Compressor for Length Extrapolationcited by 14
  12. 2024E2LLM: Encoder Elongated Large Language Models for Long-Context Understanding and Reasoningcited by 13
  13. 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
  14. 2024Retrieval Meets Reasoning: Dynamic In-Context Editing for Long-Text Understandingcited by 9
  15. 2025WildLong: Synthesizing Realistic Long-Context Instruction Data at Scalecited by 9
  16. 2025The Role of Sparsity for Length Generalization in Transformerscited by 8
  17. 2025Deconstructing Positional Information: From Attention Logits to Training Biasescited by 5
  18. 2024QuickLLaMA: Query-aware Inference Acceleration for Large Language Modelscited by 4
  19. 2025Information Entropy Invariance: Enhancing Length Extrapolation in Attention Mechanismscited by 4
  20. 2025Long-Short Alignment for Effective Long-Context Modeling in LLMscited by 4
  21. 2025RePo: Language Models with Context Re-Positioningcited by 4
  22. 2024LongSSM: On the Length Extension of State-space Models in Language Modellingcited by 3
  23. 2025DSAS: A Universal Plug-and-Play Framework for Attention Optimization in Multi-Document Question Answeringcited by 3
  24. 2024TeleOracle: Fine-Tuned Retrieval-Augmented Generation with Long-Context Support for Networkcited by 2
  25. 2025SeqPE: Transformer with Sequential Position Encodingcited by 2
  26. 2026LSTM-MAS: A Long Short-Term Memory Inspired Multi-Agent System for Long-Context Understandingcited by 1
  27. 2024Abstract2Appendix: Academic Reviews Enhance LLM Long-Context Capabilitiescited by 0
  28. 2025CacheFocus: Dynamic Cache Re-Positioning for Efficient Retrieval-Augmented Generationcited by 0
  29. 2025Effective Length Extrapolation via Dimension-Wise Positional Embeddings Manipulationcited by 0
  30. 2026EndPrompt: Efficient Long-Context Extension via Terminal Anchoringcited by 0
  31. 2026RoPE is Dead, Long Live RoPE: Towards Scalable Data-aware Positional Encodingscited by 0
  32. 2026Length Generalization Needs Proper Regularizationcited by 0