Loading...
Loading...
Prepare, format, and validate datasets for supervised fine-tuning and preference training. Use when converting raw data into training format, applying chat templates, configuring sequence packing, generating synthetic training data, or writing a dataset card before a run.
npx skill4agent add wshobson/agents dataset-curationfinetuning-method-selectionfinetuning-method-selection/finetune| Method | Shape | Rows |
|---|---|---|
| SFT, single-turn | Instruct ( | ~1,000+ floor |
| SFT, multi-turn | Conversation / ChatML | ~1,000+ floor |
| DPO / ORPO | Preference pair ( | Method-dependent, see |
| KTO | Unpaired ( | Method-dependent, see |
| GRPO / RLVR | Prompt-only ( | Method-dependent, see |
references/formats-and-templates.md{"messages": [
{"role": "user", "content": "..."},
{"role": "assistant", "content": "..."}
]}-100messagesassistant_only_loss=Truereferences/formats-and-templates.mdkeep = batch["labels"][0] != -100
print(tokenizer.decode(batch["input_ids"][0][keep]))for seq in packed_dataset.select(range(10)):
print(tokenizer.decode(seq["input_ids"]))references/synthetic-data.mdreferences/synthetic-data.md/finetunetrace-to-training-datareferences/synthetic-data.mdeval-harness-first/finetune/finetunereferences/formats-and-templates.mdreferences/synthetic-data.mdfinetuning-method-selectionlora-qlora-recipesvision-sftpreference-optimizationtrace-to-training-dataeval-harness-first