flydust's picture
Update README.md
ecd8f31 verified
metadata
dataset_info:
  features:
    - name: uuid
      dtype: string
    - name: model
      dtype: string
    - name: gen_input_config
      struct:
        - name: temperature
          dtype: float64
        - name: top_p
          dtype: float64
    - name: input
      dtype: string
    - name: output
      dtype: string
    - name: conversations
      list:
        - name: from
          dtype: string
        - name: value
          dtype: string
    - name: task_category
      dtype: string
    - name: difficulty
      dtype: string
    - name: intent
      dtype: string
    - name: knowledge
      dtype: string
    - name: input_quality
      dtype: string
    - name: quality_explanation
      dtype: string
    - name: llama_guard_2
      dtype: string
    - name: reward_model
      dtype: string
    - name: instruct_reward
      dtype: float64
    - name: base_output
      dtype: string
    - name: base_reward
      dtype: float64
    - name: reward_difference
      dtype: float64
    - name: min_neighbor_distance
      dtype: float64
    - name: repeat_count
      dtype: int64
    - name: min_similar_uuid
      dtype: string
    - name: input_length
      dtype: int64
    - name: output_length
      dtype: int64
  splits:
    - name: train
      num_bytes: 19031408037
      num_examples: 3000000
  download_size: 9936635779
  dataset_size: 19031408037
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*

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 8B Instruct using Magpie. Please refer to our paper and codebase for implementation details.

This is the raw data. Feel free to apply your own filter!

Available Labels

  • Input Length: The total number of characters in the instructions.
  • Output Length: The total number of characters in the responses.
  • Task Category: The specific category of the instructions.
  • Input Quality: The clarity, specificity, and coherence of the instructions, rated as 'very poor', 'poor', 'average', 'good', and 'excellent'.
  • Input Difficulty: The level of knowledge required to address the task described in the instruction, rated as 'very easy', 'easy', 'medium', 'hard', or 'very hard'.
  • Minimum Neighbor Distance: The embedding distance to the nearest neighbor within the dataset. It can be used for filtering out repetitive or similar instances.
  • Safety: Safety tags marked by meta-llama/Meta-Llama-Guard-2-8B
  • Instruct Reward: The output of the reward model given the specific instruction-response pair.
  • Base Reward: The output of the reward model given the instruction and response from the base model.
  • Reward Difference: Instruct Reward - Base Reward.

Dataset Navigation 🧭

Meta Llama 3

Model Name Dataset Type Description
Llama 3 70B Instruct Magpie-Pro-1M SFT 1M Raw conversations built with Meta Llama 3 70B.
Llama 3 70B Instruct Magpie-Pro-300K-Filtered SFT Apply a filter and select 300K high quality conversations.
Llama 3 70B Instruct Magpie-Pro-MT-300K SFT Select 300K difficult questions and extend to multi-turn conversations.
Llama 3 8B Instruct Magpie-Air-3M SFT 3M Raw conversations built with Meta Llama 3 8B.
Llama 3 8B Instruct Magpie-Air-300K-Filtered SFT Apply a filter and select 300K high quality data.
Llama 3 8B Instruct Magpie-Air-MT-300K SFT Select 300K difficult questions and extend to multi-turn conversations.