Fine Tuning
Purpose
Help agents operate a fine-tuning workflow through an existing CLI or YAML configuration without modifying training system source code. This skill covers run planning, dataset requirements, LoRA settings, monitoring, checkpoint comparison, and adoption decisions.
Quick Start
- Confirm the task is to use the training system, not edit it.
- Validate dataset schema, splits, labels, length, and sensitive content before training.
- Start with a smoke run.
- Log configuration, baseline metrics, checkpoint metrics, and artifacts.
- Compare checkpoints against held-out evals before adoption.
- Preserve rollback and reproducibility.
Operating Constraints
- Do not train before validating data.
- Do not change source code when the requested surface is CLI or YAML usage.
- Do not adopt a checkpoint from training loss alone.
- Use held-out evals and task-specific metrics.
- Track seeds, model, dataset version, LoRA config, runtime, hardware, and commands.
- Keep secrets and private data out of logs, configs, and published artifacts.
Inputs This Skill Expects
- Training CLI or YAML schema.
- Dataset files, split definitions, and validation rules.
- Baseline model and baseline eval results.
- Training objective, hardware, runtime, budget, and artifact destination.
- Checkpoint evaluation command or metric policy.
Output Contract
- Provide a validated training plan or blocked status.
- Include exact CLI/YAML settings, dataset version, smoke command, full run command, and evaluation command.
- Report checkpoint results against baseline and held-out data.
- State adopt, reject, or iterate with the reason.
Procedure
- Identify training type and target behavior.
- Validate dataset and split integrity.
- Choose conservative initial hyperparameters and LoRA settings.
- Run a one-step or tiny-slice smoke test.
- Run the full job only after smoke passes.
- Monitor logs and save artifacts.
- Evaluate checkpoints and compare to baseline.
- Record decision and rollback path.
Pitfalls And Gotchas
- Treating lower training loss as product improvement.
- Leaking eval rows into training.
- Forgetting tokenizer length and truncation checks.
- Publishing private data through model cards or logs.
- Tuning many hyperparameters without controlled experiment records.
Progressive Disclosure
Start with dataset validation and smoke execution. Expand into advanced tuning, preference methods, cloud jobs, or LoRA surgery only when baseline training evidence justifies it.
Verification Pattern
- Confirm dataset validation passes before training.
- Confirm smoke run passes before full run.
- Confirm checkpoint evaluation uses held-out data.
- Confirm adoption criteria include quality, safety, latency, and rollback.
- Confirm run metadata is reproducible.
1---2name: fine-tuning3description: Guardrail for using fine-tuning pipelines through CLI or YAML: SFT, preference tuning, LoRA settings, checkpoint evaluation, and experiment tracking.4---56# Fine Tuning78## Purpose9Help agents operate a fine-tuning workflow through an existing CLI or YAML configuration without modifying training system source code. This skill covers run planning, dataset requirements, LoRA settings, monitoring, checkpoint comparison, and adoption decisions.1011## Quick Start121. Confirm the task is to use the training system, not edit it.132. Validate dataset schema, splits, labels, length, and sensitive content before training.143. Start with a smoke run.154. Log configuration, baseline metrics, checkpoint metrics, and artifacts.165. Compare checkpoints against held-out evals before adoption.176. Preserve rollback and reproducibility.1819## Operating Constraints20- Do not train before validating data.21- Do not change source code when the requested surface is CLI or YAML usage.22- Do not adopt a checkpoint from training loss alone.23- Use held-out evals and task-specific metrics.24- Track seeds, model, dataset version, LoRA config, runtime, hardware, and commands.25- Keep secrets and private data out of logs, configs, and published artifacts.2627## Inputs This Skill Expects28- Training CLI or YAML schema.29- Dataset files, split definitions, and validation rules.30- Baseline model and baseline eval results.31- Training objective, hardware, runtime, budget, and artifact destination.32- Checkpoint evaluation command or metric policy.3334## Output Contract35- Provide a validated training plan or blocked status.36- Include exact CLI/YAML settings, dataset version, smoke command, full run command, and evaluation command.37- Report checkpoint results against baseline and held-out data.38- State adopt, reject, or iterate with the reason.3940## Procedure411. Identify training type and target behavior.422. Validate dataset and split integrity.433. Choose conservative initial hyperparameters and LoRA settings.444. Run a one-step or tiny-slice smoke test.455. Run the full job only after smoke passes.466. Monitor logs and save artifacts.477. Evaluate checkpoints and compare to baseline.488. Record decision and rollback path.4950## Pitfalls And Gotchas51- Treating lower training loss as product improvement.52- Leaking eval rows into training.53- Forgetting tokenizer length and truncation checks.54- Publishing private data through model cards or logs.55- Tuning many hyperparameters without controlled experiment records.5657## Progressive Disclosure58Start with dataset validation and smoke execution. Expand into advanced tuning, preference methods, cloud jobs, or LoRA surgery only when baseline training evidence justifies it.5960## Verification Pattern61- Confirm dataset validation passes before training.62- Confirm smoke run passes before full run.63- Confirm checkpoint evaluation uses held-out data.64- Confirm adoption criteria include quality, safety, latency, and rollback.65- Confirm run metadata is reproducible.