training-data-curation

关于为大语言模型后训练(SFT/DPO/RLHF)创建高质量数据集的指南。适用于微调数据准备、数据质量评估和数据收集策略设计。

仓库最近推送
GitHub Stars
152
Forks
6
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "training-data-curation":https://skillpi.com/zh/skills/deepskill-9362438abd4d33c22ca2e2f5ac6f2b7431082d334c648e58d564aae4444d32e9。安装前核对上游来源和版本:https://github.com/sundial-org/skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

关于为大语言模型后训练(SFT/DPO/RLHF)创建高质量数据集的指南。适用于微调数据准备、数据质量评估和数据收集策略设计。

0 下载

介绍来源: third_party · sundial-org · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: training-data-curation
description: Guidelines for creating high-quality datasets for LLM post-training (SFT/DPO/RLHF). Use when preparing data for fine-tuning, evaluating data quality, or designing data collection strategies.

Training Data Curation Guidelines

Best practices for gathering and preparing training data for LLM fine-tuning.

Data Quality Principles

Quality over quantity. Llama 2 used only 27,540 high-quality SFT examples and outperformed models trained on larger noisy datasets [1]. Focus on clean, diverse, well-formatted data.

Garbage in, garbage out. The model will learn patterns from your data—including errors, biases, and formatting issues. Inspect samples manually before training.

Match the target distribution. Training data should reflect the tasks and style you want the model to perform. If you want formal responses, don't train on casual chat data.

Format Requirements

Supervised Fine-Tuning (SFT)

Use the messages format (OpenAI/Anthropic/Tinker standard) [5]:

{"messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}
  • Each sample is a complete conversation
  • Multi-turn: alternate user/assistant messages
  • System prompts optional: {"role": "system", "content": "..."}
  • JSONL format, one sample per line

Preference Learning (DPO/ORPO/KTO)

Requires paired comparisons [2]:

{"prompt": "...", "chosen": "...", "rejected": "..."}
  • chosen and rejected must respond to the same prompt
  • Quality difference should be clear and consistent
  • Annotator agreement >70% indicates usable samples [1]

For KTO, pairs aren't required—just binary labels on completions [7]:

{"prompt": "...", "completion": "...", "label": true/false}

Reward Modeling (RLHF)

Needs ranked responses [1]:

{"prompt": "...", "responses": ["best", "second", "worst"]}

Quality Checklist

Before training, verify:

  • [ ] No duplicates — exact and near-duplicate removal [3]
  • [ ] No empty fields — all required fields populated
  • [ ] Consistent format — schema matches throughout
  • [ ] Appropriate length — not too short (noise) or too long (truncation)
  • [ ] Clean text — proper encoding, no HTML/boilerplate artifacts [8]
  • [ ] Manual inspection — reviewed random sample of 50-100 examples
  • [ ] No PII/sensitive data — unless intentionally included
  • [ ] License verified — legal to use for training

Common Quality Issues

Issue Detection Fix Source
Duplicates Hash-based dedup Remove exact matches, MinHash for near-dupes [3]
Boilerplate Keyword filter Remove "subscribe", "cookie policy", etc. [8]
Repetitive text N-gram analysis Flag if <30% unique trigrams [4]
Low-quality text Alpha ratio Remove if <50% alphabetic characters [8]
Wrong language Language detection fastText classifier, filter to target [3]
Too short Length check Minimum 3-5 sentences, 100+ words for documents [8]

Data Sources

High quality:

  • Curated human annotations [1]
  • Expert-written examples
  • Filtered high-quality web data [3]

Medium quality:

  • Synthetic data from stronger models (distillation)
  • Community Q&A with voting signals
  • Filtered user-generated content

Use with caution:

  • Raw web scrapes
  • Unfiltered synthetic data
  • Data without clear provenance [6]

Sizing Guidelines

Dataset Size Use Case Source
100-1K Quick experiments, specific behaviors —
1K-10K Production SFT, domain adaptation —
10K-100K Comprehensive instruction tuning [1]
1M+ preference pairs Large-scale RLHF [1]

Llama 2 used ~27K SFT examples and 1M+ preference comparisons [1].

File Format

  • JSONL — one JSON object per line, human-readable
  • Parquet — efficient for large datasets, built-in compression [3]
  • Sharding — split files >500MB into chunks

References

  1. Llama 2 Paper — Touvron et al. (2023). SFT/RLHF data quality practices, 27K SFT examples, >70% annotator agreement threshold
  2. TRL Library — HuggingFace trainer implementations for SFT, DPO, KTO, ORPO
  3. FineWeb Paper — Penedo et al. (2024). Large-scale filtering: MinHash dedup, language detection, quality classifiers
  4. Data-Juicer — Alibaba's quality filtering toolkit with repetition filters, n-gram analysis
  5. Tinker API — Training API using messages format for SFT, DPO/RLHF support
  6. Data Provenance Initiative — Longpre et al. (2023). Dataset licensing and attribution audit
  7. KTO Paper — Ethayarajh et al. (2024). Binary preference learning without pairs
  8. C4/T5 Paper — Raffel et al. (2020). Foundational filtering: terminal punctuation, min sentences, alpha ratio, boilerplate removal

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 提供 SFT/DPO/RLHF 多种训练范式的完整数据准备方法论
  • 包含具体的质量检查清单和常见问题解决方案
  • 基于 Llama 2、FineWeb 等权威实践的经验总结
触发精准90/100

亮点

  • 明确覆盖微调数据准备、质量评估、收集策略三大场景
  • 精确指向 SFT/DPO/RLHF 等具体技术场景
  • 边界清晰不易误触
结构规范95/100
执行可靠90/100

亮点

  • 所有建议均有权威论文和工具支持
  • 质量检查清单具体可操作
  • 数据来源分级清晰可靠
证据可验 (前四项均值)90/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • arxiv.org
  • github.com
  • huggingface.co
  • tinker-docs.thinkingmachines.ai

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。