Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing
By Zhangchen Xu, Fengqing Jiang, Luyao Niu, Yuntian Deng, Radha Poovendran, Yejin Choi, Bill Yuchen Lin. International Conference on Learning Representations, 2024
357 citations recorded by the source corpus.
High-quality instruction data is critical for aligning large language models (LLMs). Although some models, such as Llama-3-Instruct, have open weights, their alignment data remain private, which hinders the democratization of AI. High human labor costs and a limited, predefined scope for prompting prevent existing open-source data creation methods from scaling effectively, potentially limiting the diversity and quality of public alignment datasets. Is it possible to synthesize high-quality instruction data at scale by extracting it directly from an aligned LLM? We present a self-synthesis method for generating large-scale alignment data named Magpie. Our key observation is that aligned LLMs like Llama-3-Instruct can generate a user query when we input only the left-side templates up to the position reserved for user messages, thanks to their auto-regressive nature. We use this method to prompt Llama-3-Instruct and generate 4 million instructions along with their corresponding responses. We perform a comprehensive analysis of the extracted data and select 300K high-quality instances. To compare Magpie data with other public instruction datasets, we fine-tune Llama-3-8B-Base with each dataset and evaluate the performance of the fine-tuned models. Our results indicate that in some tasks, models fine-tuned with Magpie perform comparably to the official Llama-3-8B-Instruct, despite the latter being enhanced with 10 million data points through supervised fine-tuning (SFT) and subsequent feedback learning. We also show that using Magpie solely for SFT can surpass the performance of previous public datasets utilized for both SFT and preference optimization, such as direct preference optimization with UltraFeedback. This advantage is evident on alignment benchmarks such as AlpacaEval, ArenaHard, and WildBench.
Subfields: Computational Theory and Mathematics, Computer Vision and Pattern Recognition
View Paper: https://www.semanticscholar.org/paper/cab3d65b3f4d0a4169d0fdaaed15af6be1d6bb84
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
- Chaojie Wang
- Yahui Zhou
- Shuicheng Yan
- Chris Liu
- Liang Zeng
- Jujie He
- Rui Yan
- Jiacai Liu
Citations in the corpus
- LLaVA-OneVision: Easy Visual Task Transfer (2024, unknown): “To avoid potential misunderstandings, we manually removed around 10 such samples from the Magpie [143] and Screen2Words [134] datasets.”
- VideoLLaMA 2: Advancing Spatial-Temporal Modeling and Audio Understanding in Video-LLMs (2024, unknown): “Similar to video-language training, audio-language training undergoes audio-language pre-training and multi-task fine-tuning.”
- Skywork-Reward: Bag of Tricks for Reward Modeling in LLMs (2024, methodology): “Unfortunately, open-source preference datasets are often noisy, with differences between preferred and rejected responses either overly subtle or inconsistently labeled (Park et al., 2024; Wang et al., 2024e; Xu et al., 2024).”
- VideoLLaMA 3: Frontier Multimodal Foundation Models for Image and Video Understanding (2025, unknown): “…InfoVQA [87], PlotQA [88] 1.00M OCR MultiUI [89], in-house data 0.83M Grounding RefCoco [90], VCR [91], in-house data 0.50M Multi-Image Demon-Full [92], Contrastive_Caption [93] 0.41M Text-only Magpie [94], Magpie-Pro [94], Synthia [95], Infinity-Instruct-subjective [82], NuminaMath [96] 2.21M”
- Expanding Performance Boundaries of Open-Source Multimodal Models with Model, Data, and Test-Time Scaling (2024, unknown): “…Type: Text Datasets UltraFeedback (en) [48], UltraChat (en) [58], Unnatural-Instructions (en) [90], NoRobots (en) [196], MOSS (en) [221], LIMA (en) [314], SlimOrca (en) [142], WizardLM-Evol-Instruct-70K (en) [265], Llama-3-Magpie-Pro (en) [266], Magpie-Qwen2-Pro (en & zh) [266], KOpen-HQ-Hermes-2.”
- Large Language Diffusion Models (2025, unknown): “Our SFT dataset consists of 1 million human-annotated samples and 3.5 million synthetic samples, generated using methods similar to those proposed in Xu et al. [103], Wei et al. [104].”