遇见数据集

PKU-SafeRLHF-single-dimension

收藏
魔搭社区2025-11-02 更新2025-02-08 收录
官方服务:

资源简介:

# Dataset Card for PKU-SafeRLHF-single-dimension <span style="color: red;">Warning: this dataset contains data that may be offensive or harmful. The data are intended for research purposes, especially research that can make models less harmful. The views expressed in the data do not reflect the views of PKU-Alignment Team or any of its members. </span> ## Dataset Summary By annotating Q-A-B pairs in [PKU-SafeRLHF](https://huggingface.co/datasets/PKU-Alignment/PKU-SafeRLHF) with single dimension, this dataset provide 81.1K high quality preference dataset. Specifically, each entry in this dataset includes two responses to a question, along with safety meta-labels and preferences for both responses. In this work, we performed SFT on Llama2-7B and Llama3-8B with Alpaca 52K dataset, resulting in Alpaca2-7B and Alpaca3-8B. This dataset contains responses from Alpaca-7B, Alpaca2-7B, and Alpaca3-8B in the corresponding folders under /data. The data collection pipeline for this dataset is depicted in the following image: ![Data Collection Pipeline](data-collection-pipeline.png) ## Usage To load our dataset, use the `load_dataset()` function as follows: ```python from datasets import load_dataset dataset = load_dataset("PKU-Alignment/PKU-SafeRLHF-single-dimension") ``` To load a specified subset of our dataset, add the `data_dir` parameter. For example: ```python from datasets import load_dataset dataset = load_dataset("PKU-Alignment/PKU-SafeRLHF-single-dimension", data_dir='data/Alpaca-7B') ```

# PKU-SafeRLHF-single-dimension 数据集卡片 <span style="color: red;">警告:本数据集包含可能具有冒犯性或危害性的内容,仅用于研究用途,尤其是旨在提升模型安全性的研究。数据中表达的观点不代表北京大学对齐团队(PKU-Alignment Team)及其任何成员的立场。</span> ## 数据集概述 通过对[PKU-SafeRLHF](https://huggingface.co/datasets/PKU-Alignment/PKU-SafeRLHF)中的Q-A-B对进行单维度标注,本数据集共包含81.1K条高质量偏好数据集。具体而言,数据集中的每个条目均包含针对某一问题的两条回复,以及两条回复各自的安全元标签与偏好标注。 本研究基于Alpaca 52K数据集对Llama2-7B与Llama3-8B进行监督微调(SFT, Supervised Fine-Tuning),得到Alpaca2-7B与Alpaca3-8B模型。本数据集的`/data`目录下对应文件夹中分别包含Alpaca-7B、Alpaca2-7B及Alpaca3-8B生成的回复。 本数据集的数据收集流程如以下图片所示: ![数据收集流程](data-collection-pipeline.png) ## 使用方法 如需加载本数据集,可使用`load_dataset()`函数,示例代码如下: python from datasets import load_dataset dataset = load_dataset("PKU-Alignment/PKU-SafeRLHF-single-dimension") 如需加载指定子集,可添加`data_dir`参数,示例如下: python from datasets import load_dataset dataset = load_dataset("PKU-Alignment/PKU-SafeRLHF-single-dimension", data_dir='data/Alpaca-7B')

提供机构:
maas
创建时间:
2025-02-07
搜集汇总
数据集介绍
PKU-SafeRLHF-single-dimension 数据集图片
背景与挑战
背景概述
该数据集基于PKU-SafeRLHF进行单维度标注,提供了81.1K个高质量偏好数据,每个条目包含一个问题、两个回答以及相关的安全元标签和偏好信息。它主要用于研究目的,旨在帮助减少模型的有害性,并包含来自Alpaca系列模型的响应数据。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务