Structured Packing in LLM Training Improves Long Context Utilization
Konrad Staniszewski, Szymon Tworkowski, Sebastian Jaszczur, Yu Zhao, Henryk Michalewski, Lukasz Kucinski, Piotr Milos
摘要
Recent advancements in long-context language modeling have attracted significant attention, yet their practical applications often suffer from suboptimal context utilization. To efficiently address this issue, we introduce the Structured Packing for Long Context, SPLiCe, a method that uses retrieval to collate mutually relevant documents into long training samples. We demonstrate that SPLiCe improves performance on long-context tasks, particularly by achieving perfect accuracy on the synthetic Needle in the Haystack benchmark, and effectively mitigating the ‘lost-in-the-middle’ phenomenon often observed in large language models. Notably, these long-context capabilities also extend to realistic downstream tasks, such as Qasper, across multiple model sizes—3B, 7B, and 13B—and are achieved with only brief fine-tuning on 2-6 billion tokens. We supplement these results with a detailed analysis of SPLiCe, examining the impact of hyperparameter choices, the different mixtures and proportions of SPLiCe-generated training data, and the choice of the retriever. We also study the transfer of long-context utilization skills between the modalities. An intriguing finding from our analysis is that training on a corpus of code can enhance performance on natural language tasks.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language Models 引用了 Measuring Massive Multitask Language Understanding
- Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language Models 引用了 Improving Language Models by Retrieving from Trillions of Tokens
- Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language Models 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- YaRN: Efficient Context Window Extension of Large Language Models 引用了 Measuring Massive Multitask Language Understanding
- DAPE: Data-Adaptive Positional Encoding for Length Extrapolation 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- Re³Syn: A Dependency-Based Data Synthesis Framework for Long-Context Post-training 引用了 Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language Models
- Re³Syn: A Dependency-Based Data Synthesis Framework for Long-Context Post-training 引用了 Measuring Massive Multitask Language Understanding
- Re³Syn: A Dependency-Based Data Synthesis Framework for Long-Context Post-training 引用了 Improving Language Models by Retrieving from Trillions of Tokens
- Re³Syn: A Dependency-Based Data Synthesis Framework for Long-Context Post-training 引用了 YaRN: Efficient Context Window Extension of Large Language Models
- Solving Quantitative Reasoning Problems with Language Models 引用了 Measuring Massive Multitask Language Understanding
- 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 引用了 DAPE: Data-Adaptive Positional Encoding for Length Extrapolation
引用它的顶会 Paper6
- DAPE: Data-Adaptive Positional Encoding for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Minbin Huang 等NeurIPS 2024 · 42 次引用
- DAPE V2: Process Attention Score as Feature Map for Length ExtrapolationChuanyang Zheng, Yihang Gao, Han Shi, Jing Xiong 等ACL 2025 · 12 次引用
- Long Context is Not Long at All: A Prospector of Long-Dependency Data for Large Language ModelsLongze Chen, Ziqiang Liu, Wanwei He, Yinhe Zheng 等ACL 2024 · 4 次引用
- Re³Syn: A Dependency-Based Data Synthesis Framework for Long-Context Post-trainingZhiyang Zhang, Ziqiang Liu, Huiming Wang, Renke Shan 等ACL 2025 · 4 次引用
- Attribute or Abstain: Large Language Models as Long Document AssistantsJan Buchmann, Xiao Liu, Iryna GurevychEMNLP 2024
它引用的 Paper12
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- Solving Quantitative Reasoning Problems with Language ModelsAitor Lewkowycz, Anders Andreassen, David Dohan, Ethan Dyer 等NeurIPS 2022 · 2,039 次引用
- Improving Language Models by Retrieving from Trillions of TokensSebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai 等ICML 2022 · 1,629 次引用
- Large Language Models Can Be Easily Distracted by Irrelevant ContextFreda Shi, Xinyun Chen, Kanishka Misra, Nathan Scales 等ICML 2023 · 970 次引用
- YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用
相关 Paper
- Training with "Paraphrasing the Original Text" Teaches LLM to Better Retrieve in Long-Context TasksYijiong Yu, Yongfeng Huang, Zhixiao Qi, Zhe ZhouAAAI 2025 · 5 次引用
- Fewer Truncations Improve Language ModelingHantian Ding, Zijian Wang, Giovanni Paolini, Varun Kumar 等ICML 2024 · 28 次引用
- Scaling Long Context Training Data by Long-Distance ReferralsYonghao Zhuang, Lanxiang Hu, Longfei Yun, Souvik Kundu 等ICLR 2025
- How to Train Long-Context Language Models (Effectively)Tianyu Gao, Alexander Wettig, Howard Yen, Danqi ChenACL 2025
- GMSA: Enhancing Context Compression via Group Merging and Layer Semantic AlignmentJiwei Tang, Zhicheng Zhang, Shunlong Wu, Jingheng Ye 等ACL 2026 · 24 次引用
