Token Weighting for Long-Range Language Modeling
Not on the map. Why?
Abstract (arXiv)
Many applications of large language models (LLMs) require long-context understanding, but models continue to struggle with such tasks. We hypothesize that conventional next-token prediction training could contribute to this, because each token is assigned equal weight. Yet, intuitively, the amount of context needed to predict the next token accurately varies greatly across different data. To reflect this, we propose various novel token-weighting schemes that assign different weights to each training token in the loss, thereby generalizing existing works. For this, we categorize token-weighting methods using a two-step framework which compares the confidences of a long-context and short-context model to score tokens. We evaluate all methods on multiple long-context understanding tasks and show that non-uniform loss weights are helpful to improve the long-context abilities of LLMs. Different short-context models can be used effectively for token scoring, including models that are much smaller than the long-context model that is trained. All in all, this work contributes to a better understanding of the trade-offs long-context language modeling faces and provides guidelines for model steering via loss-weighting based on empirical evidence. The code can be found on Github.
Key facts. Cited by 14 papers in the map (data through 7 Oct 2026). Builds on 35 of its 50 references that are in the map. First posted on arXiv 12 Mar 2025.
Builds on
35 of 50 references.
References · 35
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2016SQuAD: 100,000+ Questions for Machine Comprehension of Textcited by 4,115
- 2018HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answeringcited by 3,686
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,383
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2023LongBench: A Bilingual, Multitask Benchmark for Long Context Understandingcited by 1,378
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
23 more
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,104
- 2021Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolationcited by 1,085
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2019Compressive Transformers for Long-Range Sequence Modellingcited by 699
- 2018Learning to Reweight Examples for Robust Deep Learningcited by 670
- 2023Textbooks Are All You Needcited by 561
- 2023Weak-to-Strong Generalization: Eliciting Strong Capabilities With Weak Supervisioncited by 445
- 2023Effective Long-Context Scaling of Foundation Modelscited by 301
- 2023Pretraining Language Models with Human Preferencescited by 245
- 2022Prioritized Training on Points that are Learnable, Worth Learning, and Not Yet Learntcited by 233
- 2023Landmark Attention: Random-Access Infinite Context Length for Transformerscited by 206
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2024QuRating: Selecting High-Quality Data for Training Language Modelscited by 153
- 2023D4: Improving LLM Pretraining via Document De-Duplication and Diversificationcited by 146
- 2024How to Train Long-Context Language Models (Effectively)cited by 141
- 2023At Which Training Stage Does Code Data Help LLMs Reasoning?cited by 82
- 2024Can Perplexity Reflect Large Language Model's Ability in Long Text Understanding?cited by 45
- 2024A Controlled Study on Long Context Extension and Generalization in LLMscited by 26
- 2024Book2Dial: Generating Teacher-Student Interactions from Textbooks for Cost-Effective Development of Educational Chatbotscited by 25
- 2024Long Context Alignment with Short Instructions and Synthesized Positionscited by 22
- 2024Interpreting Predictive Probabilities: Model Confidence or Human Label Variation?cited by 15
- 2024Scaling Granite Code Models to 128K Contextcited by 9
- 2023MiLe Loss: a New Entropy-Weighed Loss for Mitigating the Bias of Learning Difficulties in Large Language Modelscited by 8
Built on by
Citing papers per year: 2025: 5; 2026: 9.
14 papers.
Sort:
By area:
- 2025Revisiting Long-context Modeling from Context Denoising Perspectivecited by 5
- 2026TAB-PO: Preference Optimization with a Token-Level Adaptive Barrier for Token-Critical Structured Generationcited by 5
- 2025Rethinking Supervised Fine-Tuning: Emphasizing Key Answer Tokens for Improved LLM Accuracycited by 4
- 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancingcited by 4
- 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignmentcited by 4
- 2025Turbo-ICL: In-Context Learning-Based Turbo Equalizationcited by 2
- 2025Entropy-Guided Loop: Achieving Reasoning through Uncertainty-Aware Generationcited by 2
- 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?cited by 1
- 2026Not All Denoising Steps Are Equal: Model Scheduling for Faster Masked Diffusion Language Modelscited by 1
- 2026Supervised Fine-Tuning Needs to Unlock the Potential of Token Prioritycited by 0
- 2026QAQ: Bidirectional Semantic Coherence for Selecting High-Quality Synthetic Code Instructionscited by 0
- 2026ARCA: Adapter-Residual Credit Assignment When Token Signals Degeneratecited by 0
2 more
- 2026What Shared Prefixes Hide: Trajectory Dropout for On-Policy Distillation27 Sep 2026
- 2026Decoupling Token Roles in Autoregressive Pretraining27 Sep 2026
- 2026ARCA: Adapter-Residual Credit Assignment When Token Signals Degenerate29 May 2026
- 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignment19 May 2026
- 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancing11 May 2026
- 2026QAQ: Bidirectional Semantic Coherence for Selecting High-Quality Synthetic Code Instructions12 Mar 2026
- 2026Not All Denoising Steps Are Equal: Model Scheduling for Faster Masked Diffusion Language Models4 Feb 2026
- 2026TAB-PO: Preference Optimization with a Token-Level Adaptive Barrier for Token-Critical Structured Generation3 Feb 2026
- 2026Supervised Fine-Tuning Needs to Unlock the Potential of Token Priority1 Feb 2026
- 2025Rethinking Supervised Fine-Tuning: Emphasizing Key Answer Tokens for Improved LLM Accuracy24 Dec 2025
- 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?8 Dec 2025
- 2025Revisiting Long-context Modeling from Context Denoising Perspective7 Oct 2025
2 more
- 2025Revisiting Long-context Modeling from Context Denoising Perspectivecited by 5
- 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancingcited by 4
- 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignmentcited by 4
- 2025Turbo-ICL: In-Context Learning-Based Turbo Equalizationcited by 2
- 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?cited by 1
- 2026Supervised Fine-Tuning Needs to Unlock the Potential of Token Prioritycited by 0
- 2026QAQ: Bidirectional Semantic Coherence for Selecting High-Quality Synthetic Code Instructionscited by 0
- 2026ARCA: Adapter-Residual Credit Assignment When Token Signals Degeneratecited by 0
- 2026Decoupling Token Roles in Autoregressive Pretrainingcited by 0
- 2026What Shared Prefixes Hide: Trajectory Dropout for On-Policy Distillationcited by 0
- 2026What Shared Prefixes Hide: Trajectory Dropout for On-Policy Distillation27 Sep 2026
- 2026Decoupling Token Roles in Autoregressive Pretraining27 Sep 2026
- 2026ARCA: Adapter-Residual Credit Assignment When Token Signals Degenerate29 May 2026
- 2026GoLongRL: Capability-Oriented Long Context Reinforcement Learning with Multitask Alignment19 May 2026
- 2026Where Does Long-Context Supervision Actually Go? Effective-Context Exposure Balancing11 May 2026
- 2026QAQ: Bidirectional Semantic Coherence for Selecting High-Quality Synthetic Code Instructions12 Mar 2026
- 2026Supervised Fine-Tuning Needs to Unlock the Potential of Token Priority1 Feb 2026
- 2025Short-Context Dominance: How Much Local Context Natural Language Actually Needs?8 Dec 2025
- 2025Revisiting Long-context Modeling from Context Denoising Perspective7 Oct 2025
- 2025Turbo-ICL: In-Context Learning-Based Turbo Equalization9 May 2025