通过打乱文本片段让模型学会从长文本中提取关键信息,提升长上下文处理能力。
Untie the Knots: An Efficient Data Augmentation Strategy for Long-Context Pre-Training in Language Models
- 将文档分块后随机打乱,构造复杂文本结构训练模型
- 72B模型在128K上下文下准确率达84.5%,显著优于现有方法
- 无需修改数据集,适合大模型长文本能力快速增强
大型语言模型(LLM)持续扩展上下文窗口以获取更多信息,但长上下文训练面临高质量数据稀缺、短文本任务性能下降以及注意力机制效率低下等挑战。本文提出一种名为Untie the Knots(UtK)的数据增强策略,应用于连续预训练阶段,无需修改现有数据混合即可高效赋予模型长上下文能力。具体做法是将文档分块、随机打乱,形成复杂且纠缠的长文本结构;模型需从中‘解开结’并识别相关段落。该方法显著提升模型对长上下文中相关信息的精准定位能力,同时大幅提高训练效率。我们在7B和72B参数模型上,基于200亿个标记进行实验,结果显示在128K上下文长度下,模型在RULER基准上的准确率分别达到75%和84.5%,显著优于其他长上下文策略。模型将开源以供进一步研究。
原文摘要 · Abstract (English)
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 (\textbf{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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。