atlas

Research map / Large language models / Language, safety and interpretability

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

NeurIPS 2025 · Large language models › Language, safety and interpretability · approach: LLM pruning and scaling data · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes LongMagpie, which synthesizes long-context instruction data by prompting aligned LLMs with a document followed by a user-role pre-query token, plus a p-Mix strategy for balancing long and short training data.

Problem

Long-context instruction data for aligning long-context LLMs is proprietary or costly to create; human annotation is expensive and template/seed-based synthesis limits scale, diversity, and quality.

Approach

Aligned long-context LLMs, given only a document followed by the special tokens preceding a user turn, auto-regressively generate relevant queries; harvesting these document-query pairs and the model's responses yields instruction data without seeds or prompts. Extends to multi-document contexts and mixes long and short instructions via probabilistic sampling (p-Mix).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Train on LongMagpie-generated instructions instead of ChatQALlama-3-8B-NExtLong-512K-Base · HELMET, RULER, LongBench-v2, LongAVGbenchmark score: +1.87 HELMET; +1.35 RULER; +3.6 LongBench-v2; +2.28 LongAVGHelped
Train on LongMagpie-generated instructions instead of LongAlignLlama-3-8B-NExtLong-512K-Base · HELMET, RULER, LongBench-v2, LongAVGbenchmark score: +4.31 HELMET; +5.09 RULER; +9.9 LongBench-v2; +6.44 LongAVGHelped
Add randomly sampled distractor documents, using n=10 rather than n=0 (ablation)LongMagpie · Long-context tasksLongAVG: 60.19 -> 62.56Helped
Increase the maximum distractor-document count beyond n=10 (ablation)LongMagpie · Long-context tasksLongAVG: 62.56 -> 61.88 (n=20); 61.28 (n=40); 60.93 (n=80)Mixed
Use p-Mix instead of sequential mixing (ablation)LongMagpie with UltraChat · Long-context tasksLongAVG: 60.75 -> 61.60Helped
Use p-Mix instead of simple mixing (ablation)LongMagpie with UltraChat · Long-context tasksLongAVG: 60.90 -> 61.60Helped
Use p-Mix instead of no mixing (ablation)LongMagpie with UltraChat · Short-context tasksShortAVG: 62.37 -> 64.10Helped
Increase LongMagpie data from 190k to 450k samples (ablation)LongMagpie · Long-context tasksLongAVG: +1.05Helped
Synthesize data with Qwen-2.5-70B rather than Qwen-2.5-7B (ablation)LongMagpie · Long-context tasksLongAVG: 59.61 -> 62.56Helped
Set initial prepended short-context samples to 30 rather than 1 at P_L=0.4 (ablation)p-Mix · Long-context tasksLongAVG: 61.60 -> 58.69Hurt
Set P_L to 0.8 rather than 0.4 with N_S=1 (ablation)p-Mix · Long-context tasksLongAVG: 61.60 -> 60.30Hurt

Surprising findings

Limitations

Experimental setup

Datasets: FineWeb-Edu LongMagpie-generated instructions ChatQA2 data LongAlign Tulu Magpie UltraChat

Benchmarks: HELMET RULER LongBench v2 HellaSwag Lambada ARC-Challenge ARC-Easy PIQA WinoGrande LogiQA

Metrics: accuracy LongAVG ShortAVG

Baselines: Tulu Magpie UltraChat ChatQA LongAlign Sequential Mix Simple Mix

Builds on: Magpie NExtLong ProLong

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy