building-finetuning-datasets
БесплатноЗапускает вложенные скриптыНе проверенUse when preparing to fine-tune, post-train, distill, or LoRA/QLoRA-tune an LLM, when generating synthetic or instruction training data, building…
от osmontero★ 18 звёзд на GitHubОб этом скилле
Building Fine-Tuning Datasets
A fine-tune is its dataset. Hyperparameters decide whether training converges; the dataset decides what the model becomes. Most disappointing fine-tunes are correctly-configured runs over data that encoded the wrong thing.
Two failures cause most of the damage, and both are settled before a single example is generated: teaching facts that belong in retrieval, and having no way to detect that the model got worse at everything else.
Gate 1: Is this a knowledge problem?
If the goal contains "so it knows our X" — product names, runbook facts, current inventory, policy details — that part is a retrieval problem, and fine-tuning is the wrong tool for it.
Models acquire facts in pretraining; fine-tuning teaches them to use what they have. Examples carrying genuinely new facts are learned much more slowly than ones consistent with existing knowledge, and as they finally are learned they linearly increase the model's tendency to hallucinate (Gekhman et al., EMNLP 2024, measured on closed-book QA). The rate is measured over the whole evaluation, not just the newly taught items — so the cost lands on factuality generally, and it grows the longer you train to make the new facts stick.
Split the request explicitly before proceeding:
| Part of the goal | Where it goes |
|---|---|
| Facts, documents, entities, anything that changes | RAG |
| Format, structure, house style, tone | Fine-tuning |
| Task procedure, tool-call syntax, reasoning style | Fine-tuning |
| Domain vocabulary and question shapes over retrieved context | Fine-tuning, with facts still retrieved at inference |
Say which parts you routed where. A user asking for one thing usually wants both halves solved, not the retrieval half silently folded into the training set.
Gate 2: Which technique
Stage and parameter budget are independent choices. Read references/choosing-technique.md before
committing — it covers prompt/RAG/decoding alternatives, continued pretraining vs SFT vs preference
optimization vs RL, DPO/KTO/ORPO/SimPO selection, full FT vs LoRA vs QLoRA, and required stage ordering.
Short version: if you can write the correct output, SFT. If you can only say which of two outputs is better, preference optimization. If a script can verify correctness and SFT has plateaued, RL. Default parameter budget is LoRA, or QLoRA when VRAM-bound.
Gate 3: Does the base model already do it?
Before generating data for any capability or behavior, probe the base model on it — a couple dozen samples across the cases you care about — and only keep the slices it measurably fails. This is Gate 1's knowledge rule generalized: fine-tuning is for what the model gets wrong, and training a slice it already handles is not neutral.
The two costs are real and documented:
- Wasted effort. A team building a behavior dataset probed their base model and found it already passed one entire behavior at ~94% with no reproducible failure pattern — they dropped 150 rows that would have taught nothing.
- Active regression. The same narrow behavioral fine-tune, ~750 rows, caused a measurable general-capability regression on four reasoning benchmarks (grade-school math down ~10–16pp) that nobody saw until the benchmark panel ran, because the run had no eval split. Every row you add can cost capability elsewhere; rows that teach nothing pay that cost for no gain.
So the probe is not optional diligence — it decides what goes in the dataset. Keep the confirmed-failing cases, resample the ambiguous ones (a 1-of-3 refusal is sampling noise, not a failure — single-shot refusal evaluation is only ~92% accurate, Larsen et al. 2025), and drop what the base model already does. Report confirmed categories as a rate ("2/3", "3/3"), not a binary: a 2/3 confirmation is a watch-item, not a solved one, since under pure noise it still confirms ~26% of the time, and it is exactly the category to re-probe after the next training run.
The deliverable
A fine-tuning dataset is not a file of examples. It ships as eight parts, and a handoff missing any of them cannot be evaluated or reproduced. Deliver them in this order — the order is the method:
eval/— the held-out suite, built first. Real examples only, reserved before generation. Three subsets: task (held-out real examples of the target behavior), retention (general-capability probes the base model already passes), behavior (refusals, safety, tone invariants to preserve).baseline.json— the base model scored on all three subsets before any training. Without this there is no denominator and "it looks good" is not a result.taxonomy.md— the axes the data must cover, with a target count per cell. Diversity comes from varying what you condition on, so the axes have to exist on paper before generation and be re-counted after filtering. Empty cells are the next generation round's target, not an acceptable outco
Установить building-finetuning-datasets в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл building-finetuning-datasets?
Use when preparing to fine-tune, post-train, distill, or LoRA/QLoRA-tune an LLM, when generating synthetic or instruction training data, building SFT/DPO/preference sets, reasoning traces or tool-call trajectories, when choosing rank/alpha/learning rate, when deciding fine-tuning vs RAG, or when a tuned model regressed — hallucinates, lost general ability, repeats, or ignores its format.
Как установить скилл building-finetuning-datasets?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл building-finetuning-datasets запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic