Project-Silkworm
收藏资源简介:
Project Silkworm是一个持续增长的直接偏好优化(DPO)偏好数据集,涵盖10个知识领域。该数据集通过HuggingFace Serverless Inference API自动生成,并每日增量上传,规模不断扩大。每个数据示例包含一个提示(prompt)和两个质量对比的响应:一个是高质量响应(chosen),使用专家级系统提示生成,具有详细、结构化、包含示例和推理的特点;另一个是低质量响应(rejected),使用简短肤浅的系统提示生成,具有简洁、无帮助、无解释的特点。这种自然的质量差异使数据集非常适合用于DPO微调,无需人工标注。数据集包含以下字段:提示(用户向模型提出的指令或问题)、选中响应(首选的高质量响应)、拒绝响应(次选的低质量响应)、主题(如“量子纠缠”、“斯多葛主义”等)和时间戳(生成配对时的UTC时间)。提示在10个类别中均匀采样,包括:科学与技术、数学、历史、哲学、经济学、心理学、健康、文化、实践等。数据生成使用meta-llama/Llama-3.1-8B-Instruct模型,并应用了质量过滤:如果任一响应低于80个字符或两个响应相同,则该配对将被丢弃。该数据集旨在用于语言模型的DPO微调,与TRL的DPOTrainer兼容,采用CC BY 4.0许可证。
Project Silkworm is a continuously growing Direct Preference Optimization (DPO) preference dataset covering 10 knowledge domains. It is automatically generated via HuggingFace Serverless Inference API and incrementally uploaded daily, with an expanding scale. Each example in the dataset includes a prompt and two quality-contrasted responses: a chosen high-quality response generated using expert-level system prompts, characterized by detail, structure, inclusion of examples, and reasoning; and a rejected low-quality response generated using brief and superficial system prompts, characterized by conciseness, lack of helpfulness, and no explanation. This natural quality difference makes the dataset highly suitable for DPO fine-tuning without manual annotation. The dataset contains the following fields: prompt (the instruction or question posed by the user to the model), chosen response (the preferred high-quality response), rejected response (the less preferred low-quality response), topic (such as quantum entanglement, stoicism, etc.), and timestamp (UTC time when the pair was generated). Prompts are uniformly sampled across 10 categories, including: Science & Technology, Mathematics, History, Philosophy, Economics, Psychology, Health, Culture, Practical, and others. Data generation uses the meta-llama/Llama-3.1-8B-Instruct model via HuggingFace Serverless Inference API, with quality filtering applied: if any response is below 80 characters or if both responses are identical, the pair is discarded. The dataset is intended for DPO fine-tuning of language models, compatible with TRLs DPOTrainer, and licensed under CC BY 4.0.
项目丝蚕(Project Silkworm)数据集概述
该数据集是一个持续增长的DPO(直接偏好优化)偏好数据集,覆盖10个知识领域,每日自动扩充。
基本属性
- 许可证: CC BY 4.0
- 任务类型: 文本生成、问答
- 语言: 英语
- 数据集规模: 少于1000条(n<1K)
- 标签: dpo、preference、alignment、instruction-following、rlhf
数据构成
每条样本包含一个提示词(prompt)和两个质量对比鲜明的回复:
- chosen(偏好回复):使用详尽、专家级系统提示词生成,回答详细、结构化,包含示例和推理过程
- rejected(拒绝回复):使用简短、肤浅的系统提示词生成,回答简短、无帮助、无解释
字段说明
| 字段 | 类型 | 描述 |
|---|---|---|
prompt |
字符串 | 向模型提出的指令或问题 |
chosen |
字符串 | 偏好、高质量回复 |
rejected |
字符串 | 非偏好、低质量回复 |
topic |
字符串 | 主题领域(如量子纠缠、斯多葛主义) |
timestamp |
字符串 | 生成该样本对的UTC时间戳 |
领域覆盖
提示词从10个类别中均匀采样:
- 科学、技术、数学
- 历史、哲学、经济学
- 心理学、健康、文化、实用技能
生成方法
- 生成模型:
meta-llama/Llama-3.1-8B-Instruct,通过HuggingFace无服务器推理API生成 - 偏好回复系统提示词: 专家助手风格,详尽且结构化
- 拒绝回复系统提示词: 随意助手风格,简短且肤浅
- 质量过滤: 若任一回覆少于80字符或两条回覆完全相同,则舍弃该样本对
预期用途
专为语言模型的DPO微调设计,可直接兼容TRL框架的DPOTrainer。加载方式如下:
python from datasets import load_dataset
dataset = load_dataset("iPwnds/Project-Silkworm", split="train")




