mlsanityData to 14 Oct 2026

LaMPE: Length-aware Multi-grained Positional Encoding for Adaptive Long-context Scaling Without Training

arXiv 2508.02308 ↗First posted 4 Aug 2025cs.CLcited by 1

Not on the map. Why?

Abstract (arXiv)

Large language models (LLMs) experience significant performance degradation when the input exceeds the pretraining context window, primarily due to the out-of-distribution (OOD) behavior of Rotary Position Embedding (RoPE). Recent studies mitigate this problem by remapping OOD positions into the in-distribution range with fixed mapping strategies, ignoring the dynamic relationship between input length and the model's effective context window. To this end, we propose Length-aware Multi-grained Positional Encoding (LaMPE), a training-free method that fully utilizes the model's effective context window for adaptive long-context scaling in LLMs. Motivated by the left-skewed frequency distribution of relative positions, LaMPE establishes a dynamic relationship between mapping length and input length through a parametric scaled sigmoid function to adaptively allocate positional capacity across varying input lengths. Meanwhile, LaMPE devises a novel multi-grained attention mechanism that strategically allocates positional resolution across different sequence regions to capture both fine-grained locality and long-range dependencies. Our method can be seamlessly applied to a wide range of RoPE-based LLMs without training. Extensive experiments on three representative LLMs across five mainstream long-context benchmarks demonstrate that LaMPE achieves significant performance improvements compared to existing length extrapolation methods. The code will be released at https://github.com/scar-on/LaMPE.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 24 of its 34 references that are in the map. First posted on arXiv 4 Aug 2025.

Builds on

24 of 34 references.

References · 24

  1. 2017Attention Is All You Needcited by 60,361
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,399
  3. 2024The Llama 3 Herd of Modelscited by 14,715
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 13,028
  5. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,703
  6. 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
  7. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,790
  8. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
  9. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
  10. 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,417
  11. 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
  12. 2024DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligencecited by 1,181
12 more
  1. 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,103
  2. 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 740
  3. 2019Compressive Transformers for Long-Range Sequence Modellingcited by 726
  4. 2024∞Bench: Extending Long Context Evaluation Beyond 100K Tokenscited by 367
  5. 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 313
  6. 2024Long-context LLMs Struggle with Long In-context Learningcited by 286
  7. 2023L-Eval: Instituting Standardized Evaluation for Long Context Language Modelscited by 233
  8. 2024LLM Maybe LongLM: Self-Extend LLM Context Window Without Tuningcited by 136
  9. 2023Attention Sorting Combats Recency Bias In Long Context Language Modelscited by 90
  10. 2024Why Does the Effective Context Length of LLMs Fall Short?cited by 63
  11. 2025LongRoPE2: Near-Lossless LLM Context Window Scalingcited by 24
  12. 2025Scaling Multi-Document Event Summarization: Evaluating Compression vs. Full-Text Approachescited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.