Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

LongMagpie: A Self-synthesis Method for Generating Large-scale Long-context Instructions

About

High-quality long-context instruction data is essential for aligning long-context large language models (LLMs). Despite the public release of models like Qwen and Llama, their long-context instruction data remains proprietary. Human annotation is costly and challenging, while template-based synthesis methods limit scale, diversity, and quality. We introduce LongMagpie, a self-synthesis framework that automatically generates large-scale long-context instruction data. Our key insight is that aligned long-context LLMs, when presented with a document followed by special tokens preceding a user turn, auto-regressively generate contextually relevant queries. By harvesting these document-query pairs and the model's responses, LongMagpie produces high-quality instructions without human effort. Experiments on HELMET, RULER, and Longbench v2 demonstrate that LongMagpie achieves leading performance on long-context tasks while maintaining competitive performance on short-context tasks, establishing it as a simple and effective approach for open, diverse, and scalable long-context instruction data synthesis.

Chaochen Gao, Xing Wu, Zijia Lin, Debing Zhang, Songlin Hu• 2025

Related benchmarks

TaskDatasetResultRank
Long-context UnderstandingLongBench v2
Overall Score26.44
185
Long-context UnderstandingLongBench
Average Score56.9
50
Long-context UnderstandingLooGLE
CR Score54
12
Long-context UnderstandingLongBench, LongBench v2 & LooGLE Combined
Overall Score40.07
12
Showing 4 of 4 rows

Other info

Follow for update