heal 0 0 0

llm-blender/Unified-Feedback

published by @llm-blender

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
57.5K
Last 30 days
3.3K
Likes
18
Size
1.8 GB
Created on HF
2024-01-08
Age
2 years ago

Description

Collections of pairwise feedback datasets.

openai/summarize_from_feedback

openai/webgpt_comparisons

Dahoas/instruct-synthetic-prompt-responses

Anthropic/hh-rlhf

lmsys/chatbot_arena_conversations

openbmb/UltraFeedback

argilla/ultrafeedback-binarized-preferences-cleaned

berkeley-nest/Nectar

Codes to reproduce the dataset: jdf-prog/UnifiedFeedback

Dataset formats

{

"id": "...",

"conv_A": [

{

"role": "user",

"content": "...",

},

{

"role":… See the full description on the dataset page: https://huggingface.co/datasets/llm-blender/Unified-Feedback.

Tags

license:mitsize_categories:1M<n<10Mformat:parquetmodality:tabularmodality:textlibrary:datasetslibrary:dasklibrary:mlcroissantlibrary:polarsregion:us

README current version from Hugging Face


license: mit
configs:

  • config_name: Nectar
    data_files:
    • split: train
      path: Nectar/train-*
    • split: val
      path: Nectar/val-*
  • config_name: UltraFeedback
    data_files:
    • split: train
      path: UltraFeedback/train-*
    • split: val
      path: UltraFeedback/val-*
  • config_name: all
    data_files:
    • split: train
      path: all/train-*
    • split: val
      path: all/val-*
  • config_name: chatbot_arena_conversations
    data_files:
    • split: train
      path: chatbot_arena_conversations/train-*
    • split: val
      path: chatbot_arena_conversations/val-*
  • config_name: hh-rlhf
    data_files:
    • split: train
      path: hh-rlhf/train-*
    • split: val
      path: hh-rlhf/val-*
  • config_name: summarize_from_feedback
    data_files:
    • split: train
      path: summarize_from_feedback/train-*
    • split: val
      path: summarize_from_feedback/val-*
  • config_name: synthetic-instruct-gptj-pairwise
    data_files:
    • split: train
      path: synthetic-instruct-gptj-pairwise/train-*
    • split: val
      path: synthetic-instruct-gptj-pairwise/val-*
  • config_name: ultrafeedback-binarized-preferences-cleaned
    data_files:
    • split: train
      path: ultrafeedback-binarized-preferences-cleaned/train-*
    • split: val
      path: ultrafeedback-binarized-preferences-cleaned/val-*
  • config_name: webgpt_comparisons
    data_files:
    • split: train
      path: webgpt_comparisons/train-*
    • split: val
      path: webgpt_comparisons/val-*
      dataset_info:
  • config_name: Nectar
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 1081068032
      num_examples: 364908
    • name: val
      num_bytes: 3078273
      num_examples: 1000
      download_size: 1192518861
      dataset_size: 1084146305
  • config_name: UltraFeedback
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 482967411
      num_examples: 126932
    • name: val
      num_bytes: 3796982
      num_examples: 1000
      download_size: 355823052
      dataset_size: 486764393
  • config_name: all
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 2539681817
      num_examples: 884515
    • name: val
      num_bytes: 21148253
      num_examples: 8000
      download_size: 1968174668
      dataset_size: 2560830070
  • config_name: chatbot_arena_conversations
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 74939906
      num_examples: 32000
    • name: val
      num_bytes: 2316679
      num_examples: 1000
      download_size: 298130885
      dataset_size: 77256585
  • config_name: hh-rlhf
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 317595099
      num_examples: 158179
    • name: val
      num_bytes: 1982489
      num_examples: 1000
      download_size: 699435351
      dataset_size: 319577588
  • config_name: summarize_from_feedback
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 274935253
      num_examples: 91858
    • name: val
      num_bytes: 2971753
      num_examples: 1000
      download_size: 98251164
      dataset_size: 277907006
  • config_name: synthetic-instruct-gptj-pairwise
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 37011887
      num_examples: 32143
    • name: val
      num_bytes: 1141460
      num_examples: 1000
      download_size: 79160756
      dataset_size: 38153347
  • config_name: ultrafeedback-binarized-preferences-cleaned
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 242561699
      num_examples: 59917
    • name: val
      num_bytes: 4009990
      num_examples: 1000
      download_size: 366415038
      dataset_size: 246571689
  • config_name: webgpt
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 37161667
      num_examples: 18578
    • name: val
      num_bytes: 1990672
      num_examples: 1000
      download_size: 22652378
      dataset_size: 39152339
  • config_name: webgpt_comparisons
    features:
    • name: id
      dtype: string
    • name: conv_A
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_B
      list:
      • name: role
        dtype: string
      • name: content
        dtype: string
    • name: conv_A_rating
      dtype: float32
    • name: conv_B_rating
      dtype: float32
    • name: num_turns
      dtype: int32
    • name: source
      dtype: string
      splits:
    • name: train
      num_bytes: 37384603
      num_examples: 18578
    • name: val
      num_bytes: 2002672
      num_examples: 1000
      download_size: 67963041
      dataset_size: 39387275

Collections of pairwise feedback datasets.

Codes to reproduce the dataset: jdf-prog/UnifiedFeedback

Dataset formats

{
  "id": "...",
  "conv_A": [
    {
      "role": "user",
      "content": "...",
    },
    {
      "role": "assistant",
      "content": "...",
    },
    ...
  ]
  "conv_B": [
    {
      "role": "user",
      "content": "...",
    },
    {
      "role": "assistant",
      "content": "...",
    },
    ...
  ]
  "conv_A_rating": 1, # not necessarily always 1 and 0. The general principle is that higher is better
  "conv_B_rating": 0,  # not necessarily always 1 and 0. The general principle is that higher is better
  "num_turns": 1, # the number of conversation turns. one user and one assistant counts for 1 turn.
  "source": "...", # hugging face dataset source
}

To convert to pairwise prompt and response to train reward models like PairRM.

Into the mixinstruct format:

Refer to script to_mixinstruct_format.py to convert the unified feedback into the format that can use llm-blender repo to train the ranker

The following are the functions used in the above script

  • For conversations with 1 turn

Simply take the user content and assistant content for 1 turn as the input and output.

def get_pair_from_conv_for_single_turn(convAs: List[str], convBs: List[str]):
    """Compare two conversations by takeing USER turns as inputs and ASSISTANT turns as candidates
        Multi-turn conversations comparison is also supportted.
        a conversation format is:
        ```python
        [
            {
                "content": "hello",
                "role": "USER"
            },
            {
                "content": "hi",
                "role": "ASSISTANT"
            },
            ...
        ]
        ```
    Args:
        convAs (List[List[dict]]): List of conversations
        convAs (List[List[dict]]): List of conversations
    """
    for c in convAs + convBs:
        assert len(c) % 2 == 0, "Each conversation must have even number of turns"
        assert all([c[i]['role'].upper() == 'USER' for i in range(0, len(c), 2)]), "Each even turn must be USER"
        assert all([c[i]['role'].upper() == 'ASSISTANT' for i in range(1, len(c), 2)]), "Each odd turn must be ASSISTANT"
    # check conversations correctness
    assert len(convAs) == len(convBs), "Number of conversations must be the same"
    for c_a, c_b in zip(convAs, convBs):
        assert len(c_a) == len(c_b), "Number of turns in each conversation must be the same"
        assert all([c_a[i]['content'] == c_b[i]['content'] for i in range(0, len(c_a), 2)]), "USER turns must be the same"
    
    inputs = [
        convAs[i][0]['content'] for i in range(len(convAs))
    ]
    cand1_texts = [
        convAs[i][1]['content'] for i in range(len(convAs))
    ]
    cand2_texts = [
        convBs[i][1]['content'] for i in range(len(convBs))
    ]
    return inputs, cand1_texts, cand2_texts
  • For conversations with more than 1 turns

convert it into input output pairs using the following function:

def get_pair_from_conv(convAs: List[str], convBs: List[str]):
    """Compare two conversations by takeing USER turns as inputs and ASSISTANT turns as candidates
        Multi-turn conversations comparison is also supportted.
        a conversation format is:
        ```python
        [
            {
                "content": "hello",
                "role": "USER"
            },
            {
                "content": "hi",
                "role": "ASSISTANT"
            },
            ...
        ]
        ```
    Args:
        convAs (List[List[dict]]): List of conversations
        convAs (List[List[dict]]): List of conversations
    """
    for c in convAs + convBs:
        assert len(c) % 2 == 0, "Each conversation must have even number of turns"
        assert all([c[i]['role'].upper() == 'USER' for i in range(0, len(c), 2)]), "Each even turn must be USER"
        assert all([c[i]['role'].upper() == 'ASSISTANT' for i in range(1, len(c), 2)]), "Each odd turn must be ASSISTANT"
    # check conversations correctness
    assert len(convAs) == len(convBs), "Number of conversations must be the same"
    for c_a, c_b in zip(convAs, convBs):
        assert len(c_a) == len(c_b), "Number of turns in each conversation must be the same"
        assert all([c_a[i]['content'] == c_b[i]['content'] for i in range(0, len(c_a), 2)]), "USER turns must be the same"
    
    instructions = ["Finish the following coversation in each i-th turn by filling in <Response i> with your response."] * len(convAs)
    inputs = [
        "\n".join([
            "USER: " + x[i]['content'] +
            f"\nAssistant: <Response {i//2+1}>" for i in range(0, len(x), 2)
        ]) for x in convAs
    ]
    cand1_texts = [
        "\n".join([
            f"<Response {i//2+1}>: " + x[i]['content'] for i in range(1, len(x), 2)
        ]) for x in convAs
    ]
    cand2_texts = [
        "\n".join([
            f"<Response {i//2+1}>: " + x[i]['content'] for i in range(1, len(x), 2)
        ]) for x in convBs
    ]
    inputs = [inst + inp for inst, inp in zip(instructions, inputs)]
    return inputs, cand1_texts, cand2_texts

README history 20 revisions

Every night we snapshot the README of every dataset in the catalog. When the SHA changes we archive the new version and diff it against the last. This is the evolving thought record of the alignment-data field: what the author decided to say about the corpus, and how that framing shifted over time.

  1. 2024-03-31Add all val dataset1a7417413.6 KB
    Loading...
  2. 2024-03-31Add all train dataset115e95413.6 KB
    Loading...
  3. 2024-03-31Add webgpt_comparisons val datasete7c19e313.6 KB
    Loading...
  4. 2024-03-31Add webgpt_comparisons train dataset53a7eda13.6 KB
    Loading...
  5. 2024-03-31Add ultrafeedback-binarized-preferences-cleaned val datasetba0c7b413.6 KB
    Loading...
  6. 2024-03-31Add ultrafeedback-binarized-preferences-cleaned train dataset53aed6813.6 KB
    Loading...
  7. 2024-03-31Add UltraFeedback val dataset4be3d3f13.6 KB
    Loading...
  8. 2024-03-31Add UltraFeedback train dataset58fc84b13.6 KB
    Loading...
  9. 2024-03-31Add synthetic-instruct-gptj-pairwise val datasetdc51f5613.6 KB
    Loading...
  10. 2024-03-31Add synthetic-instruct-gptj-pairwise train datasetdc508a013.6 KB
    Loading...
  11. 2024-03-31Add summarize_from_feedback val dataset79b7b9813.6 KB
    Loading...
  12. 2024-03-31Add summarize_from_feedback train dataset45ba18013.6 KB
    Loading...
  13. 2024-03-31Add Nectar val datasetbc25cc113.6 KB
    Loading...
  14. 2024-03-31Add Nectar train dataset682e2e813.6 KB
    Loading...
  15. 2024-03-31Add hh-rlhf val dataset3b4bbc413.6 KB
    Loading...
  16. 2024-03-31Add hh-rlhf train dataset545609c13.6 KB
    Loading...
  17. 2024-03-31Add chatbot_arena_conversations val dataset7bbed6613.6 KB
    Loading...
  18. 2024-03-31Add chatbot_arena_conversations train dataset01a35a513.6 KB
    Loading...
  19. 2024-03-31Add hh-rlhf val dataset46e3e6913.6 KB
    Loading...
  20. 2024-03-31Add hh-rlhf train dataset570861713.6 KB
    Loading...

Used by abliterated models none yet

No abliterated models in our catalog have declared this dataset in their YAML metadata yet. This can mean the dataset is used but not declared, is used outside abliteration workflows, or is new. The link will populate automatically as models are indexed.

Community discussions 1 thread · 1 open · 1 comments

Threads posted by the community on Hugging Face: bug reports, questions about usage, pull requests on the README, license clarifications. Click any thread to expand and read the full conversation inline. Newest first.

  1. 2024-01-10[bot] Conversion to Parquetopen1 💬#1
    Loading...

Related datasets same stage · heal

Read further

Metadata

License
mit

Repository

Download the dataset

0

Copy any of these snippets into your notebook or terminal. All three fetch directly from Hugging Face using your own credentials.

Recommended: datasets library (Python)
from datasets import load_dataset
ds = load_dataset("llm-blender/Unified-Feedback")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="llm-blender/Unified-Feedback", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/llm-blender/Unified-Feedback
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration