heal 0 0 0

mlabonne/chatml_dpo_pairs

published by @mlabonne

Alignment dataset tracked in the /datasets sub-catalog.

Lifetime downloads
5.5K
Last 30 days
74
Likes
55
Size
18.6 MB
Created on HF
2023-11-28
Age
2 years ago

Description

ChatML DPO Pairs

This is a preprocessed version of Intel/orca_dpo_pairs using the ChatML format.

Like the original dataset, it contains 12k examples from Orca style dataset Open-Orca/OpenOrca.

Here is the code used to preprocess it:

def chatml_format(example):

# Format system

if len(example['system']) > 0:

message = {"role": "system", "content": example['system']}

system = tokenizer.apply_chat_template([message], tokenize=False)

else:

system =… See the full description on the dataset page: https://huggingface.co/datasets/mlabonne/chatml_dpo_pairs.

Tags

size_categories:10K<n<100Kformat:parquetmodality:textlibrary:datasetslibrary:pandaslibrary:mlcroissantlibrary:polarsarxiv:2306.02707region:usdpo

README current version from Hugging Face


tags:

  • dpo

ChatML DPO Pairs

This is a preprocessed version of Intel/orca_dpo_pairs using the ChatML format.

Like the original dataset, it contains 12k examples from Orca style dataset Open-Orca/OpenOrca.

Here is the code used to preprocess it:

def chatml_format(example):
    # Format system
    if len(example['system']) > 0:
        message = {"role": "system", "content": example['system']}
        system = tokenizer.apply_chat_template([message], tokenize=False)
    else:
        system = ""

    # Format instruction
    message = {"role": "user", "content": example['question']}
    prompt = tokenizer.apply_chat_template([message], tokenize=False, add_generation_prompt=True)

    # Format chosen answer
    chosen = example['chatgpt'] + "<|im_end|>\n"

    # Format rejected answer
    rejected = example['llama2-13b-chat'] + "<|im_end|>\n"

    return {
        "prompt": system + prompt,
        "chosen": chosen,
        "rejected": rejected,
    }

# Load dataset
dataset = load_dataset("Intel/orca_dpo_pairs")['train']

# Save columns
original_columns = dataset.column_names

# Tokenizer
tokenizer = AutoTokenizer.from_pretrained("teknium/OpenHermes-2.5-Mistral-7B")
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "left"

# Format dataset
dataset = dataset.map(
    chatml_format,
    remove_columns=original_columns
)

README history 4 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-04-11Add DPO tag (#2)83b46151.6 KB
    Loading...
  2. 2023-11-28Update README.mde0430c62 KB
    Loading...
  3. 2023-11-28Upload datasetea0b410352 B
    Loading...
  4. 2023-11-28initial commitcfa3d7e0 B
    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 2 threads · 3 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-04-11PRAdd DPO tagmerged2 💬#2
    Loading...
  2. 2023-11-29[bot] Conversion to Parquetclosed1 💬#1
    Loading...

Related datasets same stage · heal

Read further

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("mlabonne/chatml_dpo_pairs")
Raw snapshot (Python)
from huggingface_hub import snapshot_download
snapshot_download(repo_id="mlabonne/chatml_dpo_pairs", repo_type="dataset")
git clone (requires git-lfs)
git clone https://huggingface.co/datasets/mlabonne/chatml_dpo_pairs
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