five

vicgalle/OpenHermesPreferences-1k

收藏
Hugging Face2024-02-29 更新2024-03-04 收录
下载链接:
https://hf-mirror.com/datasets/vicgalle/OpenHermesPreferences-1k
下载链接
链接失效反馈
官方服务:
资源简介:
--- dataset_info: features: - name: source dtype: string - name: category dtype: string - name: prompt dtype: string - name: candidates_completions sequence: string - name: candidate_policies sequence: string - name: ranks sequence: int64 - name: rank_str dtype: string - name: chosen_policy dtype: string - name: rejected_policy dtype: string - name: chosen dtype: string - name: rejected dtype: string - name: len_chosen_response dtype: int64 - name: len_rejected_response dtype: int64 - name: __index_level_0__ dtype: int64 splits: - name: train num_bytes: 22437232 num_examples: 1111 download_size: 10508529 dataset_size: 22437232 configs: - config_name: default data_files: - split: train path: data/train-* license: other source_datasets: - argilla/OpenHermesPreferences size_categories: - 1K<n<10K task_categories: - text-generation pretty_name: OpenHermesPreferences-1k tags: - synthetic - rlaif - dpo language: - en --- ## OpenHermesPreferences-1k ⚗️ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5fad8602b8423e1d80b8a965/cGla4wyqURIuy40dxWldt.png) OpenHermesPreferences-1k is a dataset of ~1,000 samples derived from [argilla/OpenHermesPreferences](https://huggingface.co/datasets/argilla/OpenHermesPreferences) using the [Long is More for Alignment](https://arxiv.org/abs/2402.04833) protocol. This protocol consists of selecting the ~1,000 longest responses (for the preferred/chosen ones) and provides a strong baseline to measure performance against. Instead of uniform sampling across the dataset categories, we used stratified sampling to keep all the categories, leading to the following distribution of categories: | category | count | |:--------------------------|--------:| | None | 400 | | orca | 221 | | coding | 110 | | general | 85 | | trivia | 50 | | roleplay | 42 | | writing | 31 | | wordgame | 20 | | stylized_response | 19 | | joke | 17 | | multiple_choice | 17 | | plan | 13 | | riddle | 12 | | rp | 10 | | misconception | 9 | | gtkm | 8 | | theory_of_mind | 7 | | awareness | 7 | | summarization | 5 | | cot | 5 | | counterfactual_contextual | 5 | | editor | 4 | | song | 4 | | card | 2 | | agent | 2 | | experience | 2 | | greeting | 2 | | quiz | 1 | | detailed_writing | 1 | ## Usage The dataset already has the columns `prompt`, `chosen` and `rejected`, so it is trivially compatible with the [DPOTrainer](https://huggingface.co/docs/trl/en/dpo_trainer) from the trl library. ## License `OpenHermesPreferences-1k` inherits the same license as the source dataset [`teknium/OpenHermes-2.5`](https://huggingface.co/datasets/teknium/OpenHermes-2.5) which is currently listed as `other` to account for the varying licenses in each source.

数据集信息: 特征字段: - 字段名:source,数据类型:字符串 - 字段名:category,数据类型:字符串 - 字段名:prompt(提示词),数据类型:字符串 - 字段名:candidates_completions(候选补全序列),数据类型:字符串序列 - 字段名:candidate_policies(候选策略序列),数据类型:字符串序列 - 字段名:ranks(排序序列),数据类型:64位整数序列 - 字段名:rank_str(排序字符串),数据类型:字符串 - 字段名:chosen_policy(选中策略),数据类型:字符串 - 字段名:rejected_policy(拒选策略),数据类型:字符串 - 字段名:chosen(选中响应),数据类型:字符串 - 字段名:rejected(拒选响应),数据类型:字符串 - 字段名:len_chosen_response(选中响应长度),数据类型:64位整数 - 字段名:len_rejected_response(拒选响应长度),数据类型:64位整数 - 字段名:__index_level_0__(索引列0),数据类型:64位整数 数据集划分: - 划分名称:train(训练集),字节数:22437232,样本数:1111 下载大小:10508529,数据集总大小:22437232 配置项: - 配置名称:default(默认配置),数据文件: - 划分:train,文件路径:data/train-* 许可证:other(其他) 源数据集:argilla/OpenHermesPreferences 样本规模分类:1K < 样本数 < 10K 任务类别:text-generation(文本生成) 展示名称:OpenHermesPreferences-1k 标签:synthetic(合成数据集)、rlaif(强化学习AI反馈)、dpo(直接偏好优化) 语言:en(英语) ### OpenHermesPreferences-1k ⚗️ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5fad8602b8423e1d80b8a965/cGla4wyqURIuy40dxWldt.png) OpenHermesPreferences-1k 是一个包含约1000个样本的偏好数据集,源自[argilla/OpenHermesPreferences](https://huggingface.co/datasets/argilla/OpenHermesPreferences),并采用了《Long is More for Alignment》(https://arxiv.org/abs/2402.04833)提出的构建协议。该协议的核心逻辑为筛选约1000条最长的选中响应样本,可为对齐模型的性能评估提供稳健的基准基线。 相较于对数据集类别进行均匀采样的方式,本数据集采用分层采样策略以保留全类别分布,最终得到如下类别统计结果: | 类别名称 | 样本数量 | |:--------------------------|--------:| | None(无类别) | 400 | | orca | 221 | | coding(编码任务) | 110 | | general(通用场景) | 85 | | trivia(常识问答) | 50 | | roleplay(角色扮演) | 42 | | writing(写作创作) | 31 | | wordgame(文字游戏) | 20 | | stylized_response(风格化响应) | 19 | | joke(笑话创作) | 17 | | multiple_choice(多项选择) | 17 | | plan(规划任务) | 13 | | riddle(谜语问答) | 12 | | rp | 10 | | misconception(错误认知) | 9 | | gtkm | 8 | | theory_of_mind(心理理论) | 7 | | awareness(认知意识) | 7 | | summarization(摘要生成) | 5 | | cot(思维链,Chain of Thought) | 5 | | counterfactual_contextual(反事实上下文) | 5 | | editor(编辑任务) | 4 | | song(歌曲创作) | 4 | | card(卡牌任务) | 2 | | agent(AI智能体) | 2 | | experience(体验场景) | 2 | | greeting(问候交互) | 2 | | quiz(知识小测) | 1 | | detailed_writing(细节写作) | 1 | ### 使用说明 该数据集已内置prompt(提示词)、chosen(选中响应)与rejected(拒选响应)三个核心字段,因此可直接兼容trl库中的[DPOTrainer](https://huggingface.co/docs/trl/en/dpo_trainer)(DPO训练器)。 ### 许可证 `OpenHermesPreferences-1k` 继承自源数据集[`teknium/OpenHermes-2.5`](https://huggingface.co/datasets/teknium/OpenHermes-2.5)的许可证。由于源数据集中各子数据源的许可证存在差异,因此本数据集的许可证被标注为`other`(其他)。
提供机构:
vicgalle
原始信息汇总

OpenHermesPreferences-1k 数据集概述

数据集信息

  • 特征列表

    • source: 字符串类型
    • category: 字符串类型
    • prompt: 字符串类型
    • candidates_completions: 字符串序列
    • candidate_policies: 字符串序列
    • ranks: 整数序列
    • rank_str: 字符串类型
    • chosen_policy: 字符串类型
    • rejected_policy: 字符串类型
    • chosen: 字符串类型
    • rejected: 字符串类型
    • len_chosen_response: 整数类型
    • len_rejected_response: 整数类型
    • __index_level_0__: 整数类型
  • 数据分割

    • train: 包含 1111 个样本,占用 22437232 字节
  • 下载大小:10508529 字节

  • 数据集大小:22437232 字节

配置信息

  • 配置名称:default
    • 数据文件
      • train: 路径为 data/train-*

许可证

  • 许可证类型:other

源数据集

  • 源数据集:argilla/OpenHermesPreferences

数据集规模

  • 规模分类:1K<n<10K

任务分类

  • 任务类型:text-generation

数据集名称

  • 名称:OpenHermesPreferences-1k

标签

  • 标签:synthetic, rlaif, dpo

语言

  • 语言:英语

类别分布

  • None: 400
  • orca: 221
  • coding: 110
  • general: 85
  • trivia: 50
  • roleplay: 42
  • writing: 31
  • wordgame: 20
  • stylized_response: 19
  • joke: 17
  • multiple_choice: 17
  • plan: 13
  • riddle: 12
  • rp: 10
  • misconception: 9
  • gtkm: 8
  • theory_of_mind: 7
  • awareness: 7
  • summarization: 5
  • cot: 5
  • counterfactual_contextual: 5
  • editor: 4
  • song: 4
  • card: 2
  • agent: 2
  • experience: 2
  • greeting: 2
  • quiz: 1
  • detailed_writing: 1

使用说明

  • 数据集包含 prompt, chosenrejected 列,与 trl 库中的 DPOTrainer 兼容。

许可证说明

  • 数据集继承源数据集 teknium/OpenHermes-2.5 的许可证,目前列为 other
搜集汇总
数据集介绍
main_image_url
构建方式
OpenHermesPreferences-1k数据集源自argilla/OpenHermesPreferences,采用Long is More for Alignment协议构建而成。该协议的核心策略是筛选出偏好响应中长度最长的约1000个样本,以此作为对齐性能的强基线。在采样过程中,并未使用简单的均匀采样,而是引入了分层抽样技术,确保原始数据集中的各个类别均能得到保留。最终形成的类别分布涵盖了从常见类别如orca、coding到稀有类别如quiz、detailed_writing的广泛范围,体现了构建过程的精细考量。
使用方法
数据集的使用极为便捷,其预定义的prompt、chosen和rejected列使其能够无缝集成到trl库中的DPOTrainer进行直接偏好优化训练。用户无需进行额外的数据预处理或格式转换,即可直接加载数据集并启动训练流程。这种设计降低了使用门槛,使得研究者能够快速验证Long is More协议的有效性,或将其作为基准数据集与其他偏好数据集进行对比实验。
背景与挑战
背景概述
在大型语言模型(LLM)的对齐研究中,如何高效利用偏好数据以提升模型与人类价值观的契合度,始终是核心议题。OpenHermesPreferences-1k数据集应运而生,由研究团队基于argilla/OpenHermesPreferences,于2024年通过“Long is More for Alignment”协议精心筛选构建。该协议选取约1000条最长且被偏好的响应,为偏好学习提供了简洁而强大的基准。数据集覆盖从编码、写作到角色扮演等27个类别,采用分层采样确保多样性,其设计直接服务于DPO等对齐算法的训练与评估,在推动LLM对齐方法的实用化和标准化方面具有重要价值。
当前挑战
该数据集所应对的领域挑战在于,偏好数据中响应长度的偏差常被忽视,而“Long is More for Alignment”协议揭示,更长、更详尽的回答往往更受青睐,这为对齐训练提供了关键但未被充分利用的信号。构建过程中,挑战则体现在从原始大规模偏好数据中,通过分层采样策略精准筛选出具有代表性的子集,既要维持类别平衡,避免长响应偏向于特定类别,又要确保筛选后的样本仍能有效反映整体偏好分布,从而在数据量缩减至千级规模时,不损失对齐训练的有效性和泛化能力。
常用场景
经典使用场景
OpenHermesPreferences-1k 数据集的核心应用场景在于偏好对齐研究,特别是用于训练和评估基于人类反馈的强化学习(RLHF)及直接偏好优化(DPO)算法。该数据集精选了约1000条来自原始 OpenHermesPreferences 的样本,依据“越长越好”的对齐协议,选取了偏好响应中长度最长的样本。这种设计为偏好学习提供了一个高效且具有代表性的基准,研究者可借助其“prompt”、“chosen”与“rejected”三列结构,直接与 TRL 库中的 DPOTrainer 无缝集成,从而快速验证偏好对齐策略的有效性。
解决学术问题
该数据集旨在解决偏好对齐领域中数据质量与效率的经典困境。传统的偏好数据集往往规模庞大但噪声较多,导致模型训练成本高昂且效果不稳定。OpenHermesPreferences-1k 通过分层抽样和长度筛选策略,在保留原始数据类别多样性的前提下,显著提升了正负样本的区分度。这为学术界提供了一种轻量级但强有力的基线,帮助研究者更高效地比较不同对齐方法(如 DPO 与 PPO)的优劣,并深入探究响应长度与偏好质量之间的内在关联,从而推动对齐理论的发展。
实际应用
在实际应用中,OpenHermesPreferences-1k 为构建更安全、更符合人类价值观的大语言模型提供了关键支撑。开发者可以利用该数据集微调模型,使其在生成回答时更倾向于产出详尽、准确且有益的响应,而非简短或敷衍的内容。例如,在客服聊天机器人、教育辅导助手或创意写作工具中,经过该数据集对齐的模型能够更好地理解用户期望,提供更有深度和价值的交互体验,从而提升用户满意度和产品可靠性。
数据集最近研究
最新研究方向
在大型语言模型对齐研究领域,OpenHermesPreferences-1k数据集的出现标志着偏好优化数据筛选策略的重要转向。该数据集基于'Long is More for Alignment'协议,通过分层采样策略从原始数据集中提取约1000条最长响应样本,打破了传统均匀采样的局限。这一前沿方向聚焦于响应长度与对齐质量之间的深层关联,揭示了长文本响应在偏好学习中的潜在优势。该数据集与直接偏好优化(DPO)训练框架的天然兼容性,使其成为探索高效对齐方法的关键资源,尤其在人机价值对齐、安全性约束等热点议题中展现出独特价值。其分层类别分布设计确保了多维度评估的可靠性,为构建更鲁棒的语言模型偏好系统提供了实证基础,推动了RLHF技术从经验性调参向理论化筛选范式的演进。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务