技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-preparation【数据与研究】Prepare and validate OpenRLHF datasets for SFT, reward modeling, DPO, PPO/RL prompts, chat-template use, dataset mixing, packing-sensitive length checks, and VLM image placeholders before expensive training.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is about dataset schemas, key mapping, chat-template choices, prompt/reward/preference records, tiny dry-run validation, or VLM image placeholder alignment for OpenRLHF.
references/data-formats.md#sft-records and validate with scripts/validate_openrlhf_dataset.py --mode sft.references/data-formats.md#reward-model-records and validate with --mode rm.references/data-formats.md#dpo-records and validate with --mode dpo.references/data-formats.md#ppo-and-rl-prompt-records and validate with --mode ppo.<image> placeholders line up with the configured image key before Ray/vLLM training; see references/data-formats.md#vlm-image-prompts and references/troubleshooting.md#multimodal-image-mismatches.--data.input_key, --data.output_key, --data.prompt_key, --data.chosen_key, --data.rejected_key, --data.label_key, --data.image_key) to the actual record fields before launching training.--data.apply_chat_template for chat-message lists, or --data.input_template for plain string prompts.--data.multiturn only with --data.apply_chat_template, and put the full trajectory under --data.input_key rather than splitting assistant turns into --data.output_key.--data.dataset and --data.dataset_probs counts aligned; probabilities are parsed as floats and must match the dataset count.--data.max_len, prompt length, packing, ring attention, and VLM image counts as preflight risks; see references/validation.md before running expensive GPU jobs.Run the bundled validator on tiny local JSON or JSONL samples without importing OpenRLHF, Ray, torch, datasets, or transformers:
python skills/openrlhf/sub-skills/data-preparation/scripts/validate_openrlhf_dataset.py \
--mode sft \
--input sample.jsonl \
--input-key question \
--output-key response \
--max-samples 20
The validator checks required keys, null/empty values, chat-message shape, chosen/rejected confusion, dataset probability counts, rough length limits, and VLM placeholder/image alignment. It is a schema preflight, not a tokenizer-accurate training simulation.
supervised-preference-training after data validates.rl-agent-training after prompt data validates.operations-and-utilities.