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

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Zhu, Wenhao, Chen, Pinzhen, Hu, Hanxu, Huang, Shujian, Yuan, Fei, Chen, Jiajun, Birch, Alexandra
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913701981847552
author Zhu, Wenhao
Chen, Pinzhen
Hu, Hanxu
Huang, Shujian
Yuan, Fei
Chen, Jiajun
Birch, Alexandra
author_facet Zhu, Wenhao
Chen, Pinzhen
Hu, Hanxu
Huang, Shujian
Yuan, Fei
Chen, Jiajun
Birch, Alexandra
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2502_15592
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Generalizing From Short to Long: Effective Data Synthesis for Long-Context Instruction Tuning
Zhu, Wenhao
Chen, Pinzhen
Hu, Hanxu
Huang, Shujian
Yuan, Fei
Chen, Jiajun
Birch, Alexandra
Computation and Language
Artificial Intelligence
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.
title Generalizing From Short to Long: Effective Data Synthesis for Long-Context Instruction Tuning
topic Computation and Language
Artificial Intelligence
url https://arxiv.org/abs/2502.15592