Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language Models
Junfeng Tian, Da Zheng, Yang Chen, Rui Wang, Colin Zhang, Debing Zhang
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 4 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awareness 引用了 Language Models are Few-Shot Learners
- NExtLong: Toward Effective Long-Context Training without Long Documents 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- A Real-World WebAgent with Planning, Long Context Understanding, and Program Synthesis 引用了 Language Models are Few-Shot Learners
- TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache Selection 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- LongRoPE: Extending LLM Context Window Beyond 2 Million Tokens 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- DAPE V2: Process Attention Score as Feature Map for Length Extrapolation 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- DAPE V2: Process Attention Score as Feature Map for Length Extrapolation 引用了 Language Models are Few-Shot Learners
- LiteLong: Resource-Efficient Long-Context Data Synthesis for LLMs 引用了 NExtLong: Toward Effective Long-Context Training without Long Documents
引用它的顶会 Paper4
- DAPE V2: Process Attention Score as Feature Map for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Jing Xiong 等ACL 2025 · 12 次引用
- TokenSelect: Efficient Long-Context Inference and Length Extrapolation for LLMs via Dynamic Token-Level KV Cache SelectionWei Wu, Zhuoshi Pan, Kun Fu, Chao Wang 等EMNLP 2025 · 2 次引用
- NExtLong: Toward Effective Long-Context Training without Long DocumentsChaochen Gao, Xing Wu, Zijia Lin, Debing Zhang 等ICML 2025
- LiteLong: Resource-Efficient Long-Context Data Synthesis for LLMsJunlong Jia, Xing Wu, Chaochen Gao, Ziyang Chen 等AAAI 2026
它引用的 Paper13
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah 等NeurIPS 2020 · 64,255 次引用
- FlashAttention: Fast and Memory-Efficient Exact Attention with IO-AwarenessTri Dao, Daniel Y. Fu, Stefano Ermon, Atri Rudra 等NeurIPS 2022 · 5,493 次引用
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
- A Real-World WebAgent with Planning, Long Context Understanding, and Program SynthesisIzzeddin Gur, Hiroki Furuta, Austin V. Huang, Mustafa Safdari 等ICLR 2024 · 359 次引用
- LongRoPE: Extending LLM Context Window Beyond 2 Million TokensYiran Ding, Li Lyna Zhang, Chengruidong Zhang, Yuanyuan Xu 等ICML 2024 · 316 次引用
相关 Paper
- E2-LLM: Efficient and Extreme Length Extension of Large Language ModelsJiaheng Liu, Zhiqi Bai, Yuanxing Zhang, Chenchen Zhang 等ACL Findings 2024 · 1 次引用
- Scaling Instruction-tuned LLMs to Million-token Contexts via Hierarchical Synthetic Data GenerationLinda He, Jue Wang, Maurice Weber, Shang Zhu 等ICLR 2025
- How to Train Long-Context Language Models (Effectively)Tianyu Gao, Alexander Wettig, Howard Yen, Danqi ChenACL 2025
- LongRecipe: Recipe for Efficient Long Context Generalization in Large Language ModelsZhiyuan Hu, Yuliang Liu, Jinman Zhao, Suyuchen Wang 等ACL 2025
- LongHeads: Multi-Head Attention is Secretly a Long Context ProcessorYi Lu, Xin Zhou, Wei He, Jun Zhao 等EMNLP Findings 2024 · 12 次引用
