tonytautai home/local-ai/run-local-ai/running/training/method/how-much

wc -l ./dataset.jsonl

How Many Examples Before It Learns.

How much data to fine tune llm models for a narrow task depends on three things: how narrow the task is, how good the base already is, and how consistent your examples are.

Tony Tautai

how much data to fine tune llm

Fewer Than You Fear, More Than You Hope

how much data to fine tune llm

The question we get most often has an honest answer that is a range, and the range depends on three things: how narrow the task is, how good the base model already is, and how consistent your examples are. For the wider set of methods, see where local model training methods fits.

Orders of Magnitude

Teaching an output format, your JSON schema, your field names: a few dozen clean examples often suffice with an adapter. Teaching a classification with a handful of labels on documents the base model already reads well: a few hundred, balanced across labels. Teaching extraction from a layout the base model has never seen, scanned, skewed, multilingual: a few thousand, and the gains keep coming past that. Teaching a new skill the base model shows no sign of: more than you are likely to label, and probably a case for distillation instead.

Consistency Beats Count

how much data to fine tune llm

Two hundred examples labelled by one careful person beat two thousand labelled by six people with different ideas of what counts as an address. The model learns the disagreement. Write a labelling guide before the first example, label a sample, measure agreement between labellers, and only then scale. Take what we wrote about lora fine tuning guide for adapter training, where small datasets are the norm and the guide matters most.

How to Know When to Stop

Hold out a frozen test set before you label anything else. Train on a quarter of your data, score. Train on half, score. If the curve is still rising at the full set, label more. If it flattened at half, you are done and the remaining effort belongs in cleaning rather than adding. This is cheap to do and almost nobody does it.

Related Decisions

If the count you need looks unreachable, a closer look at model distillation explained, shows how a teacher model can generate labels, with the caveats about client data. If what you need is facts rather than behaviour, you may need no examples at all; fine tuning vs rag, explained, covers that, and a closer look at local ai training vs rag when to use which turns it into a decision rule.

Label fewer, label better, and let the frozen score tell you when you are done.

ssh [email protected]

Prove it on your documents.

Every engagement starts the same way: we run the system on a sample of your own files, under NDA/DPA, and hand you a written report with the scores, misses included. No commitment.

Test it on my documents Request a diagnostic