unsloth-sft
Installation
SKILL.md
Overview
Supervised Fine-Tuning (SFT) in Unsloth focuses on training models to follow instructions using specific formats. It provides tools for chat template mapping, multi-turn conversation synthesis via conversation_extension, and optimized dataset processing.
When to Use
- When training models on instruction-response datasets (e.g., Alpaca).
- When developing multi-turn conversational agents.
- When you need to standardize various dataset formats (ShareGPT, OpenAI) for training.
Decision Tree
- Is your dataset single-turn?
- Yes: Use
conversation_extensionto synthetically create multi-turn samples. - No: Map columns using
standardize_sharegpt.
- Yes: Use
- Are you training on Windows?
- Yes: Set
dataset_num_proc = 1in SFTConfig. - No: Use multiple processes for faster mapping.
- Yes: Set
- Want to increase multi-turn accuracy?
- Yes: Enable masking of inputs to train on completions only.