arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.15592cs.CLcs.AI
收藏

从短到长的泛化:面向长上下文指令微调的有效数据合成

Generalizing From Short to Long: Effective Data Synthesis for Long-Context Instruction Tuning

Nanjing University(南京大学);University of Edinburgh(爱丁堡大学);Shanghai Artificial Intelligence Laboratory(上海人工智能实验室);University of Zurich(苏黎世大学)

Wenhao Zhu, Pinzhen Chen, Hanxu Hu, Shujian Huang, Fei Yuan, Jiajun Chen, Alexandra Birch

AI总结:

针对长上下文指令微调数据构建难成本高的问题,研究发现短上下文指令微调模型可泛化到长上下文,据此提出context synthesis数据合成框架,在LongBench上性能优于现有方法、接近人工标注数据。

摘要:

大语言模型(LLM)的长上下文建模是近期研究的核心领域,因为诸多现实场景都需要对文档等较长输入进行推理。当前长上下文建模研究主要聚焦于位置建模方式,对指令微调等语言建模的其他重要方面研究较少。长上下文训练样本的构建与使用难度大、成本高。本文探究了如何为长上下文预训练模型的后训练阶段设计指令数据:即实现最优高效后训练所需的上下文数量与类型。我们的对照研究表明,在短上下文上进行指令微调的模型可有效泛化到更长上下文,同时还识别出指令难度、上下文构成等其他关键因素。基于这些发现,我们提出context synthesis(上下文合成)——一种新型数据合成框架,它利用现成的LLM为高质量指令-答案对生成扩展的背景上下文。在文档级基准LongBench上的实验结果显示,我们提出的方法优于以往的指令合成方法,性能接近人工标注的长上下文指令数据。该项目将发布于:https://github.com/NJUNLP/context-synthesis。

英文摘要:

Long-context modelling for large language models (LLMs) has been a key area of recent research because many real world use cases require reasoning over longer inputs such as documents. The focus of research into modelling long context has been on how to model position and there has been little investigation into other important aspects of language modelling such as instruction tuning. Long context training examples are challenging and expensive to create and use. In this paper, we investigate how to design instruction data for the post-training phase of a long context pre-trained model: how much and what type of context is needed for optimal and efficient post-training. Our controlled study reveals that models instruction-tuned on short contexts can effectively generalize to longer ones, while also identifying other critical factors such as instruction difficulty and context composition. Based on these findings, we propose context synthesis, a novel data synthesis framework that leverages off-the-shelf LLMs to generate extended background contexts for high-quality instruction-answer pairs. Experiment results on the document-level benchmark (LongBench) demonstrate that our proposed approach outperforms previous instruction synthesis approaches and comes close to the performance of human-annotated long-context instruction data. The project will be available at: https://github.com/NJUNLP/context-synthesis.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑