見出し画像

zephyr-7b-beta のデータセットの概要

「zephyr-7b-beta」のデータセット「UltraChat」と「UltraFeedback」の概要をまとめました。


1. zephyr-7b-beta

zephyr-7b-beta」は、「Mistral」をデータセット「UltraChat」と「UltraFeedback」でファインチューニングモデルです。複数のベンチマーク (ARC、HellaSwag、MMLU、TruthfulQA) で Chat Llama 70B と同様の結果を達成し、「MT Bench」ではそれ以上の結果を達成しています。

2. UltraChat

2-1. 概要

UltraChat」は、「ChatGPT Turbo API」を利用した、オープンソースの大規模・多ラウンド対話データセットです。生成品質を確保するため、生成には2つの「ChatGPT Turbo API」で、一方がクエリ、もう一方が応答を生成します。人間のユーザー行動を模倣するように注意深く設計されたプロンプトでユーザーモデルを指示し、2つのAPIを繰り返し呼び出します。生成された文章には、後処理とフィルタリングを行います。

2-2. 特徴

「UltraChat」は、次の3つのカテゴリに分かれています。

・現実世界に関する質問
この分野の対話データは、現実世界の概念、エンティティ、オブジェクトに関連する幅広い質問から得られます。取り上げられるトピックは広範囲に及び、テクノロジー、アート、起業家精神などの分野に及びます。

・執筆と創作
この分野の対話データは、ゼロからの執筆/創作の需要によって推進されています。
電子メールの作成、物語や演劇の作成など、創作プロセス内でAIアシスタントが支援する可能性のあるあらゆるタスクが含まれます。

・既存の資料に関する支援
この分野の対話データは、既存の資料に基づいて生成されます。書き直し、継続、要約、推論など、さまざまなトピックが含まれます。

2-3. データセットの書式

データファイルの各行は、「データID」と「文章データ」をリスト形式で含むJSON辞書になります。

{
  "id": "0",
  "data": [
    "How can cross training benefit groups like runners, swimmers, or weightlifters?",
    "Cross training can benefit groups like runners, swimmers, or weightlifters in the following ways: ...中略...",
    "That makes sense. I've been wanting to improve my running time, but I never thought about incorporating strength training. Do you have any recommendations for specific exercises?",
    "Sure, here are some strength training exercises that can benefit runners: ...中略...",
    "Hmm, I'm not really a fan of weightlifting though. Can I incorporate other forms of exercise into my routine to improve my running time?",
    "Yes, absolutely! ...中略...",
    "...中略..."
  ]
}

【翻訳】

{
  "id": "0",
  "data": [
    "クロストレーニングは、ランナー、水泳選手、重量挙げ選手などのグループにどのようなメリットをもたらしますか?",
    "クロストレーニングは、ランナー、水泳選手、重量挙げ選手などのグループに次のようなメリットをもたらします: ...中略..."
    "それは当然です。ランニングのタイムを改善したいと思っていましたが、筋力トレーニングを取り入れることは考えたこともありませんでした。具体的なトレーニングの推奨事項はありますか?",
    "もちろん、ランナーに役立つ筋力トレーニングをいくつかご紹介します: ...中略...",
    "うーん、でも、私はウェイトリフティングがあまり好きではありません。ランニングタイムを向上させるために、他の形式の運動を日課に組み込むことはできますか?",
    "そのとおり! ...中略...",
    "...中略..."
  ]
}

2-4. HuggingFaceH4/ultrachat_200k

「UltraChat」をフィルタリングしたバージョンで、「zephyr-7b-beta」の学習に使用されました。

3. UltraFeedback

3-1. 概要

UltraFeedback」は、大規模できめの細かい多様な嗜好データセットです。
強力な報酬モデルと批評家モデルの学習に使用します。さまざまなリソース (UltraChat、ShareGPT、Evol-Instruct、TruthfulQA、FalseQA、FLAN など) から約 64,000 のプロンプトを収集し、これらのプロンプトで複数のLLM (モデルリストの表を参照) をクエリし、各プロンプトに対して4つの異なる応答を生成し、合計256kのサンプルが生成を生成しました。

高品質な嗜好とテキストによるフィードバックを収集するため、4つの異なる側面、「指示に従うこと」(instruction-followin)「真実性」(truthfulness)「正直さ」(honesty)「有用性」(helpfulness)を含む、きめ細かいアノテーション指示を設計しました。そして、「GPT-4」に、収集したサンプルを指示に基づいてアノテーションするよう依頼しました。

3-2. 特徴

・スケール
「UltraFeedback」は、64,000 のプロンプト、256,000 の応答、380,000 の高品質フィードバックで構成されます。「RLHF」の研究者は、報酬モデルを学習するために約 100 万の比較ペアをさらに構築することができます。

・多様性
嗜好データセットとして、多様性は「UltraFeedback」の中核的な要件です。
さまざまなソースからプロンプトを収集し、最先端のオープンソースおよび有名なモデルの多様なセットをクエリします。

・高密度
「UltraFeedback」は数値とテキストの両方のフィードバックを提供します。
さらに、あらゆる側面で回答を評価できるように、きめ細かい注釈ドキュメントを作成しました。

3-3. データセットの書式

{
    "source": "sharegpt", // 指示の送信元のデータセット
    "id": "D2TC9GP_0", // ソースデータセット内の指示のID
    "instruction": "I am going to cairo in June of this year, thinking of 4-5 days, what are the best things I could do? Going with family of 5, granddad, grandmom, sister, mom and me. No days can have too much walking but sister, me and mom like adventure sports",
    "models": [ // 指示を完了するためにモデルプールからランダムにサンプリングされた4つのモデル
        "falcon-40b-instruct",
        "gpt-4",
        "starchat",
        "wizardlm-7b"
    ],
    "completions": [ // 4つのモデルに対応する4つのcompletion
        { // completion 1
            "model": "falcon-40b-instruct",
            "principle": "helpfulness", // モデルの動作を調整するために使用される原則
            "custom_system_prompt": "As an AI assistant, ensure your response offers the perfect blend of accuracy, positivity, and intrigue. Strive to be educational while keeping the user engaged.", // GPT-4が生成したシステムプロンプトのプールからサンプリングされた原則に対応するシステムプロンプト
            "response": "Cairo is a city that has something for everyone. Some of the best things you can do are visiting the Pyramids of Giza and the museums housing the ancient Egyptian artifacts, taking a camel ride in the desert, visiting the medieval neighborhoods such as Islamic Cairo or Khan El-Khalili, trying local food in traditional restaurants like Ful medames, or venturing into one of the city's many souks to shop for authentic goods. For adventure sports, you can go whitewater rafting on the Nile, hot air ballooning over the desert, or diving in the Red Sea. Just be mindful of the scorching heat and ensure everyone wears appropriate clothing and drinks enough water. Above all, have fun and enjoy your trip!",
            "annotations": {
                "instruction_following": [
                    {
                        "Rating": "2",
                        "Rationale": "The text only partially addresses the task goal by providing a general list of activities in Cairo without considering the specific needs of the family members, such as limited walking ability and adventure preferences."
                    }
                ],
                "honesty": [
                    {
                        "Rating": "3",
                        "Rationale": "The response is confident but contains subtle mistakes. It suggests whitewater rafting on the Nile and diving in the Red Sea, which are not feasible for a 4-5 day trip to Cairo. The rest of the suggestions are accurate and relevant to the family's preferences."
                    }
                ],
                "truthfulness": [
                    {
                        "Type": [
                            "1",
                            "2"
                        ],
                        "Rationale": "The text suggests whitewater rafting on the Nile and diving in the Red Sea, which are not available in Cairo. These activities are factually incorrect and not aligned with the instruction.",
                        "Rating": "3",
                        "Rationale For Rating": "The text provides some truthful information, but the inclusion of whitewater rafting and diving in the Red Sea causes partial hallucination and misunderstanding."
                    }
                ],
                "helpfulness": [
                    {
                        "Type": [
                            "1",
                            "2"
                        ],
                        "Rationale": "The response is clear and relevant, providing useful information, but it does not address the limited walking ability of the grandparents or the adventure sports preferences of the sister, mom, and the user.",
                        "Rating": "3",
                        "Rationale For Rating": "The text is correct and provides useful information, but it does not fully address the specific needs and preferences of the family."
                    }
                ]
            }
        },
        { // completion 2
            ...中略...
        },
        { // completion 3
            ...中略...
        },
        { // completion 4
            ...中略...
        }
    ]
},

【翻訳】

{
    "source": "sharegpt", // 指示の送信元のデータセット
    "id": "D2TC9GP_0", // ソースデータセット内の指示のID
    "instruction": "今年の6月にカイロに行くのですが、4~5日間の予定ですが、何をするのが一番良いでしょうか? おじいちゃん、おばあちゃん、妹、お母さん、私の家族5人で行きます。歩きすぎる日はありませんが、妹、私、母はアドベンチャースポーツが好きです",
    "models": [ // 指示を完了するためにモデルプールからランダムにサンプリングされた4つのモデル
        "falcon-40b-instruct",
        "gpt-4",
        "starchat",
        "wizardlm-7b"
    ],
    "completions": [ // 4つのモデルに対応する4つのcompletion
        { // completion 1
            "model": "falcon-40b-instruct",
            "principle": "helpfulness", // モデルの動作を調整するために使用される原則
            "custom_system_prompt": "AIアシスタントとして、正確さ、積極性、興味をそそることを完璧にブレンドした返答を心がけましょう。ユーザーを夢中にさせながら、教育的であるよう努めましょう。", // GPT-4が生成したシステムプロンプトのプールからサンプリングされた原則に対応するシステムプロンプト
            "response": "カイロは誰にとっても何かがある都市です。あなたができる最高のことのいくつかは、ギザのピラミッドや古代エジプトの工芸品を収蔵する博物館を訪れること、砂漠でラクダに乗る、イスラム教のカイロやカーン・エル・カリリなどの中世の街を訪れること、伝統的な郷土料理を試すことです。 Ful medames のようなレストランを訪れたり、市内に数多くあるスークの1つに足を運んで本格的な商品を買ったりすることもできます。アドベンチャースポーツとしては、ナイル川での急流ラフティング、砂漠での熱気球、紅海でのダイビングなどがあります。 灼熱の暑さに注意し、全員が適切な服装をし、十分な水分を摂取するようにしてください。何よりも、楽しく旅行を楽しんでください!",
            "annotations": {
                "instruction_following": [
                    {
                        "Rating": "2",
                        "Rationale": "この文書では、限られた歩行能力や冒険の好みなど、家族の具体的なニーズを考慮せず、カイロでの活動の一般的なリストを提供することで、課題の目標を部分的にしか扱っていません。"
                    }
                ],
                "honesty": [
                    {
                        "Rating": "3",
                        "Rationale": "返答は自信に満ちていますが、微妙な間違いが含まれています。それは、ナイル川での急流ラフティングや紅海でのダイビングを示唆していますが、カイロへの4〜5日間の旅行では実現できません。残りの提案は正確であり、家族の好みに関連しています。"
                    }
                ],
                "truthfulness": [
                    {
                        "Type": [
                            "1",
                            "2"
                        ],
                        "Rationale": "本文では、ナイル川での急流下りや紅海でのダイビングが示唆されているが、カイロでは体験できません。これらの活動は事実に誤りがあり、指示と一致していません。",
                        "Rating": "3",
                        "Rationale For Rating": "本文にはいくつかの真実の情報が記載されていますが、紅海での急流下りやダイビングが含まれているため、部分的な幻覚や誤解が生じます。"
                    }
                ],
                "helpfulness": [
                    {
                        "Type": [
                            "1",
                            "2"
                        ],
                        "Rationale": "回答は明確かつ関連性があり、有益な情報を提供しますが、祖父母の限られた歩行能力や、姉妹、母親、ユーザーのアドベンチャー スポーツの好みには対応していません。",
                        "Rating": "3",
                        "Rationale For Rating": "この文章は正しく、有益な情報を提供していますが、家族の特定のニーズや好みに完全に対応しているわけではありません。"
                    }
                ]
            }
        },
        { // completion 2
            ...中略...
        },
        { // completion 3
            ...中略...
        },
        { // completion 4
            ...中略...
        }
    ]
},

3-4. HuggingFaceH4/ultrafeedback_binarized

「UltraFeedback」を前処理したバージョンで、「zephyr-7b-beta」を学習するために使用されました。


この記事が気に入ったらサポートをしてみませんか?