ChatPaper.aiChatPaper

Magpie: 整列済みLLMをゼロからプロンプトして生成するアライメントデータ合成

Magpie: Alignment Data Synthesis from Scratch by Prompting Aligned LLMs with Nothing

June 12, 2024
著者: Zhangchen Xu, Fengqing Jiang, Luyao Niu, Yuntian Deng, Radha Poovendran, Yejin Choi, Bill Yuchen Lin
cs.AI

要旨

高品質な指示データは、大規模言語モデル(LLM)のアラインメントにおいて極めて重要です。Llama-3-Instructのような一部のモデルはオープンウェイトを公開していますが、そのアラインメントデータは非公開のままであり、AIの民主化を妨げています。既存のオープンソースデータ作成手法は、高い人的コストと限定的で事前定義されたプロンプトの範囲のために、効果的にスケールすることが難しく、公開されているアラインメントデータセットの多様性と品質を制限する可能性があります。では、アラインメントされたLLMから直接抽出することで、高品質な指示データを大規模に合成することは可能でしょうか?我々は、Magpieと名付けた大規模アラインメントデータを生成するための自己合成手法を提案します。我々の重要な観察は、Llama-3-InstructのようなアラインメントされたLLMは、その自己回帰的な性質により、ユーザーメッセージ用に予約された位置までの左側のテンプレートのみを入力しても、ユーザークエリを生成できるということです。この手法を用いてLlama-3-Instructをプロンプトし、400万の指示とそれに対応する応答を生成しました。抽出されたデータを包括的に分析し、30万の高品質なインスタンスを選別しました。Magpieデータを他の公開指示データセットと比較するため、各データセットでLlama-3-8B-Baseをファインチューニングし、ファインチューニングされたモデルの性能を評価しました。その結果、一部のタスクにおいて、Magpieでファインチューニングされたモデルは、教師ありファインチューニング(SFT)とその後のフィードバック学習を通じて1000万のデータポイントで強化された公式のLlama-3-8B-Instructと同等の性能を発揮することがわかりました。また、MagpieをSFTのみに使用することで、UltraFeedbackを用いた直接選好最適化など、SFTと選好最適化の両方に使用された以前の公開データセットの性能を上回ることも示しました。この利点は、AlpacaEval、ArenaHard、WildBenchなどのアラインメントベンチマークで顕著です。
English
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.
PDF705December 8, 2024