five

rbiswasfc/reward-bench-binary-classification

收藏
Hugging Face2024-06-03 更新2024-06-12 收录
下载链接:
https://hf-mirror.com/datasets/rbiswasfc/reward-bench-binary-classification
下载链接
链接失效反馈
官方服务:
资源简介:
--- license: odc-by dataset_info: features: - name: id dtype: int64 - name: prompt dtype: string - name: response_a dtype: string - name: response_b dtype: string - name: label dtype: int64 - name: subset dtype: string splits: - name: train num_bytes: 7856927 num_examples: 3845 - name: test num_bytes: 2877668 num_examples: 1278 download_size: 5663108 dataset_size: 10734595 configs: - config_name: default data_files: - split: train path: data/train-* - split: test path: data/test-* --- Repurposed `allenai/reward-bench` dataset for binary classification task, using the following script: ```python import random import pandas as pd from datasets import Dataset, load_dataset from sklearn.model_selection import GroupKFold data_df = load_dataset("allenai/reward-bench", split="raw").to_pandas() rng = random.Random(43) examples = [] for idx, row in data_df.iterrows(): if rng.random() > 0.5: response_a = row["chosen"] response_b = row["rejected"] label = 0 else: response_a = row["rejected"] response_b = row["chosen"] label = 1 this_ex = { "id": row["id"], "prompt": row["prompt"], "response_a": response_a, "response_b": response_b, "label": label, "subset": row["subset"], } examples.append(this_ex) processed_df = pd.DataFrame(examples) # train-test split def add_fold(df, n_splits=4, group_col="subset"): skf = GroupKFold(n_splits=n_splits) for f, (t_, v_) in enumerate(skf.split(df, y=df[group_col].values, groups=df[group_col].values)): df.loc[v_, "kfold"] = f return df processed_df = add_fold(processed_df) test_fold = 0 test_df = processed_df[processed_df["kfold"] == test_fold].drop(columns="kfold") train_df = processed_df[processed_df["kfold"] != test_fold].drop(columns="kfold") train_ds = Dataset.from_pandas(train_df, preserve_index=False) test_ds = Dataset.from_pandas(test_df, preserve_index=False) ```
提供机构:
rbiswasfc
原始信息汇总

数据集概述

数据集特征

  • id: 整数类型 (int64)
  • prompt: 字符串类型 (string)
  • response_a: 字符串类型 (string)
  • response_b: 字符串类型 (string)
  • label: 整数类型 (int64)
  • subset: 字符串类型 (string)

数据集分割

  • 训练集:
    • 示例数量: 3845
    • 数据大小: 7856927 字节
  • 测试集:
    • 示例数量: 1278
    • 数据大小: 2877668 字节

数据集大小

  • 下载大小: 5663108 字节
  • 数据集总大小: 10734595 字节

配置文件

  • 默认配置:
    • 训练数据路径: data/train-*
    • 测试数据路径: data/test-*
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作