Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language Models
Not on the map. Why?
Abstract (arXiv)
Large language models (LLM) have prioritized expanding the context window from which models can incorporate more information. However, training models to handle long contexts presents significant challenges. These include the scarcity of high-quality natural long-context data, the potential for performance degradation on short-context tasks, and the reduced training efficiency associated with attention mechanisms. In this paper, we introduce Untie the Knots (UtK), a novel data augmentation strategy employed during the continue pre-training phase, designed to efficiently enable LLMs to gain long-context capabilities without the need to modify the existing data mixture. In particular, we chunk the documents, shuffle the chunks, and create a complex and knotted structure of long texts; LLMs are then trained to untie these knots and identify relevant segments within seemingly chaotic token sequences. This approach greatly improves the model's performance by accurately attending to relevant information in long context and the training efficiency is also largely increased. We conduct extensive experiments on models with 7B and 72B parameters, trained on 20 billion tokens, demonstrating that UtK achieves 75% and 84.5% accurracy on RULER at 128K context length, significantly outperforming other long context strategies. The trained models will open-source for further research.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 30 of its 40 references that are in the map. First posted on arXiv 7 Sep 2024.
Builds on
30 of 40 references.
References · 30
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2024Gemini 1.5: Unlocking multimodal understanding across millions of tokens of contextcited by 3,175
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2024Qwen2 Technical Reportcited by 2,076
18 more
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
- 2022Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Themcited by 1,767
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,270
- 2023Extending Context Window of Large Language Models via Positional Interpolationcited by 721
- 2023Ring Attention with Blockwise Transformers for Near-Infinite Contextcited by 448
- 2023A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesiscited by 350
- 2024LongRoPE: Extending LLM Context Window Beyond 2 Million Tokenscited by 302
- 2022Efficient Training of Language Models to Fill in the Middlecited by 248
- 2024Data Engineering for Scaling Language Models to 128K Contextcited by 183
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 139
- 2023PoSE: Efficient Context Window Extension of LLMs via Positional Skip-wise Trainingcited by 109
- 2024LongRAG: Enhancing Retrieval-Augmented Generation with Long-context LLMscited by 104
- 2024LV-Eval: A Balanced Long-Context Benchmark with 5 Length Levels Up to 256Kcited by 80
- 2023In-context Pretraining: Language Modeling Beyond Document Boundariescited by 76
- 2024Base of RoPE Bounds Context Lengthcited by 49
- 2023Peek Across: Improving Multi-Document Modeling via Cross-Document Question-Answeringcited by 28
- 2024From Artificial Needles to Real Haystacks: Improving Retrieval Capabilities in LLMs by Finetuning on Synthetic Datacited by 18
- 2022Lifelong and Continual Learning Dialogue Systemscited by 9
Built on by
Citing papers per year: 2024: 3; 2025: 5; 2026: 1.
9 papers.
- 2025A Survey of Context Engineering for Large Language Modelscited by 120
- 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selectioncited by 38
- 2025NExtLong: Toward Effective Long-Context Training without Long Documentscited by 19
- 2025A Survey on LLM Mid-Trainingcited by 18
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolationcited by 10
- 2025dots.llm1 Technical Reportcited by 5
- 2025LiteLong: Resource-Efficient Long-Context Data Synthesis for LLMscited by 3
- 2024CNNSum: Exploring Long-Context Summarization with Large Language Models in Chinese Novelscited by 2
- 2026DeepEdu-v1: Efficient and Scalable Agentic LLMs for Vietnamese Educationcited by 0
- 2026DeepEdu-v1: Efficient and Scalable Agentic LLMs for Vietnamese Education25 Sep 2026
- 2025A Survey on LLM Mid-Training27 Oct 2025
- 2025LiteLong: Resource-Efficient Long-Context Data Synthesis for LLMs19 Sep 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025dots.llm1 Technical Report6 Jun 2025
- 2025NExtLong: Toward Effective Long-Context Training without Long Documents22 Jan 2025
- 2024CNNSum: Exploring Long-Context Summarization with Large Language Models in Chinese Novels3 Dec 2024
- 2024TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selection5 Nov 2024
- 2024DAPE V2: Process Attention Score as Feature Map for Length Extrapolation7 Oct 2024