Magpie-Align/Magpie-Llama-3.1-Pro-DPO-100K-v0.1

Dataset

6

stars

6

commits

3

linked in READMEs

Aug 22, 2024

updated

Browse cluster: LLM Training Datasets & Synthetic Data

README

Magpie

Project Web: https://magpie-align.github.io/

Arxiv Technical Report: https://arxiv.org/abs/2406.08464

Codes: https://github.com/magpie-align/magpie

Abstract

Click Here 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.

Dataset Details

This dataset is generated by Llama 3.1 70B Instruct for direct preference optimization.

To create the dataset, we first selected 100K high-quality Magpie instructions with diverse task categories, then generated responses using Llama 3.1 70B Instruct 5 times for each instruction, using a temperature of 0.8. We then annotated RM scores using RLHFlow/ArmoRM-Llama3-8B-v0.1, labeling the response with the highest RM score as the chosen response, and the one with the lowest RM score as the rejected response.

License: Please follow Meta Llama 3.1 Community License.

📚 Citation

If you find the model, data, or code useful, please cite our paper:

@article{xu2024magpie,
	title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing}, 
	author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
	year={2024},
	eprint={2406.08464},
	archivePrefix={arXiv},
	primaryClass={cs.CL}
}

Please also cite the reward model for creating preference datasets:

ArmoRM paper:

@article{wang2024interpretable,
  title={Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts},
  author={Wang, Haoxiang and Xiong, Wei and Xie, Tengyang and Zhao, Han and Zhang, Tong},
  journal={arXiv preprint arXiv:2406.12845},
  year={2024}
}

Questions? Please contact Zhangchen by email.

Model NameDatasetTypeDescription
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-1MSFT1M Raw conversations built with Meta Llama 3.1 70B.
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-300K-FilteredSFTApply a filter and select 300K high quality conversations.
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-MT-300KSFTSelect 300K high quality questions and extend to multi-turn conversations.
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-DPO-100KDPODPO dataset via Best-of-N sampling and rewards.

Contributors

ZX
Zhangchen Xu

6 commits

Magpie-Align/Magpie-Llama-3.1-Pro-DPO-100K-v0.1

Dataset

6

stars

6

commits

3

linked in READMEs

Aug 22, 2024

updated

Browse cluster: LLM Training Datasets & Synthetic Data

README

Magpie

Project Web: https://magpie-align.github.io/

Arxiv Technical Report: https://arxiv.org/abs/2406.08464

Codes: https://github.com/magpie-align/magpie

Abstract

Click Here 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.

Dataset Details

This dataset is generated by Llama 3.1 70B Instruct for direct preference optimization.

To create the dataset, we first selected 100K high-quality Magpie instructions with diverse task categories, then generated responses using Llama 3.1 70B Instruct 5 times for each instruction, using a temperature of 0.8. We then annotated RM scores using RLHFlow/ArmoRM-Llama3-8B-v0.1, labeling the response with the highest RM score as the chosen response, and the one with the lowest RM score as the rejected response.

License: Please follow Meta Llama 3.1 Community License.

📚 Citation

If you find the model, data, or code useful, please cite our paper:

@article{xu2024magpie,
	title={Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing}, 
	author={Zhangchen Xu and Fengqing Jiang and Luyao Niu and Yuntian Deng and Radha Poovendran and Yejin Choi and Bill Yuchen Lin},
	year={2024},
	eprint={2406.08464},
	archivePrefix={arXiv},
	primaryClass={cs.CL}
}

Please also cite the reward model for creating preference datasets:

ArmoRM paper:

@article{wang2024interpretable,
  title={Interpretable Preferences via Multi-Objective Reward Modeling and Mixture-of-Experts},
  author={Wang, Haoxiang and Xiong, Wei and Xie, Tengyang and Zhao, Han and Zhang, Tong},
  journal={arXiv preprint arXiv:2406.12845},
  year={2024}
}

Questions? Please contact Zhangchen by email.

Model NameDatasetTypeDescription
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-1MSFT1M Raw conversations built with Meta Llama 3.1 70B.
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-300K-FilteredSFTApply a filter and select 300K high quality conversations.
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-MT-300KSFTSelect 300K high quality questions and extend to multi-turn conversations.
Llama 3.1 70B InstructMagpie-Llama-3.1-Pro-DPO-100KDPODPO dataset via Best-of-N sampling and rewards.

Contributors

ZX
Zhangchen Xu

6 commits