five

Magpie-Air-DPO-100K-v0.1

收藏
魔搭社区2025-11-07 更新2025-01-18 收录
下载链接:
https://modelscope.cn/datasets/Magpie-Align/Magpie-Air-DPO-100K-v0.1
下载链接
链接失效反馈
官方服务:
资源简介:
![Magpie](https://cdn-uploads.huggingface.co/production/uploads/653df1323479e9ebbe3eb6cc/FWWILXrAGNwWr52aghV0S.png) Project Web: [https://magpie-align.github.io/](https://magpie-align.github.io/) Arxiv Technical Report: [https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464) Codes: [https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie) ## Abstract <details><summary>Click Here</summary> 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. </details><be> ## Dataset Details This dataset is generated by [Llama 3 8B Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-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 8B Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-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. ## 📚 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](https://zhangchenxu.com/) by email.

![喜鹊(Magpie)](https://cdn-uploads.huggingface.co/production/uploads/653df1323479e9ebbe3eb6cc/FWWILXrAGNwWr52aghV0S.png) 项目主页:[https://magpie-align.github.io/](https://magpie-align.github.io/) Arxiv 技术报告:[https://arxiv.org/abs/2406.08464](https://arxiv.org/abs/2406.08464) 代码仓库:[https://github.com/magpie-align/magpie](https://github.com/magpie-align/magpie) ## 摘要 <details><summary>点击展开</summary> 高质量指令数据对于对齐大语言模型(LLMs)至关重要。尽管部分模型如Llama-3-Instruct已开源权重,但其对齐数据仍处于私有状态,这阻碍了AI的民主化进程。高昂的人力成本与受限的预定义提示范围,使得现有开源数据构建方法难以有效规模化,进而可能限制了公开对齐数据集的多样性与质量。我们能否通过直接从已对齐的大语言模型中提取数据,规模化生成高质量指令数据? 我们提出了一种自合成方法,用于生成大规模对齐数据,命名为Magpie。我们的核心发现是:诸如Llama-3-Instruct这类已对齐的大语言模型,仅需输入用户消息预留位置之前的左侧模板,即可凭借其自回归特性生成用户查询。我们利用该方法对Llama-3-Instruct进行提示,生成了400万条指令及其对应的响应。我们对提取的数据进行了全面分析,并筛选出30万个高质量样本。 为将Magpie数据集与其他公开指令数据集进行对比,我们分别使用各数据集对Llama-3-8B-Base进行微调,并评估微调后模型的性能。实验结果表明,在部分任务中,使用Magpie数据集微调的模型性能可与官方Llama-3-8B-Instruct相媲美——尽管后者通过监督微调(Supervised Fine-Tuning, SFT)与后续反馈学习,使用了1000万条数据进行增强。我们还证实,仅使用Magpie数据集进行监督微调,其性能可超越此前同时用于监督微调与偏好优化的公开数据集,例如结合UltraFeedback的直接偏好优化(Direct Preference Optimization, DPO)。该优势在AlpacaEval、ArenaHard与WildBench等对齐基准测试中均有体现。 </details> ## 数据集详情 本数据集由[Llama 3 8B Instruct](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct)生成,用于直接偏好优化任务。为构建该数据集,我们首先筛选出10万个覆盖多样任务类别的高质量Magpie指令,随后针对每条指令,使用Llama 3 8B Instruct以温度系数0.8生成5次响应。接着我们使用RLHFlow/ArmoRM-Llama3-8B-v0.1标注奖励模型(Reward Model, RM)分数,将RM分数最高的响应标记为选中响应,分数最低的标记为被拒绝响应。 ## 📚 引用 若您认为本模型、数据集或代码对您的研究有所帮助,请引用我们的论文: @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} } 若需使用用于构建偏好数据集的奖励模型,请同时引用ArmoRM相关论文: ArmoRM 论文: @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} } **疑问咨询?** 请通过邮件联系[张晨](https://zhangchenxu.com/).
提供机构:
maas
创建时间:
2025-01-15
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作