Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing
Zhangchen Xu, Fengqing Jiang, Luyao Niu, Yuntian Deng, Radha, Poovendran, Yejin Choi, Bill Yuchen Lin

TL;DR
Magpie is a novel method that synthesizes high-quality instruction data from aligned LLMs like Llama-3-Instruct by prompting them to generate large-scale datasets, reducing reliance on human labor and enhancing dataset diversity.
Contribution
We introduce Magpie, a self-synthesis approach that extracts instruction-response pairs directly from aligned LLMs, enabling scalable and high-quality dataset creation without additional human annotation.
Findings
Magpie generated 4 million instruction-response pairs, with 300K high-quality instances.
Models fine-tuned with Magpie data perform comparably to those trained on official instruction datasets.
Using Magpie data alone can outperform previous public datasets in alignment benchmarks.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗Magpie-Align/Llama-3-8B-Magpie-Air-SFT-300K-v0.1model· 5 dl· ♡ 15 dl♡ 1
- 🤗Magpie-Align/Llama-3-8B-Magpie-Pro-SFT-300K-v0.1model· 42 dl· ♡ 942 dl♡ 9
- 🤗Magpie-Align/Llama-3-8B-Magpie-Air-MT-SFT-v0.1model· 4 dl4 dl
- 🤗Magpie-Align/Llama-3-8B-Magpie-Pro-SFT-200K-v0.1model· 5 dl5 dl
- 🤗Magpie-Align/Llama-3-8B-Magpie-Pro-SFT-100K-v0.1model· 1 dl1 dl
- 🤗Magpie-Align/Llama-3-8B-Magpie-Align-SFT-v0.1model· 23 dl· ♡ 423 dl♡ 4
- 🤗QuantFactory/Llama-3-8B-Magpie-Pro-SFT-v0.1-GGUFmodel· 25 dl· ♡ 225 dl♡ 2
- 🤗QuantFactory/Llama-3-8B-Magpie-Pro-MT-SFT-v0.1-GGUFmodel· 223 dl223 dl
- 🤗QuantFactory/Llama-3-8B-Magpie-Pro-SFT-200K-v0.1-GGUFmodel· 16 dl16 dl
- 🤗QuantFactory/Llama-3-8B-Magpie-Pro-SFT-100K-v0.1-GGUFmodel· 19 dl19 dl
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsImage Processing and 3D Reconstruction · Handwritten Text Recognition Techniques · Mathematics, Computing, and Information Processing
MethodsShrink and Fine-Tune
