技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
data-and-datasets【数据与研究】Build and validate torchtune dataset configs, message transforms, packing, prompt templates, multimodal rows, and collators.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when a torchtune task is about dataset shape, Message conversion, input masking, local or Hugging Face data sources, sample packing, prompt templates, multimodal text+image rows, or batch collation.
instruct_dataset or InputOutputToMessages for single-turn input/output SFT rows.chat_dataset, ShareGPTToMessages, or OpenAIToMessages for multi-turn conversations.preference_dataset or ChosenRejectedToMessages for DPO/reward data with chosen and rejected conversations.text_completion_dataset for free-form pretraining-style corpora with a text column.torchtune.datasets.multimodal builders for text+image SFT rows, and keep image handling in the dataset/model transform boundary.PackedDataset only when the tokenizer or model transform has max_seq_len and the recipe expects packed SFT/text-completion batches.json/jsonl/csv/text, or remote file URL.column_map, conversation_column, or builder-specific arguments.Message lists before tokenization; validate role order and non-empty content early.masking_strategy where exposed, or legacy train_on_input when using builder config fields.tune cp, tune cat, tune validate, registry names, and launch syntax; do not import recipes as a Python package.From this sub-skill directory, run the bundled validator on a local JSONL sample before wiring it into a recipe:
python scripts/validate_messages_jsonl.py data/sample.jsonl --shape auto
For multimodal rows with local image paths:
python scripts/validate_messages_jsonl.py data/sample.jsonl --shape conversations --image-key image --image-root data --check-image-paths
The validator is intentionally lightweight: it parses JSONL, checks required columns, checks message role/content structure, optionally checks local image paths, and never imports torch, starts training, or downloads datasets.