Small Language Model Design › Allocating Training Data at Small Scale

Michael BrenndoerferDecember 1, 20263 min read
Language AI HandbookAll chapters
Part 43 of 67Small and On-Device Language Models
Chapter 327Small Language Model Design › Allocating Training Data at Small Scale
Reading section 5 of 11 · Allocating Training Data at Small Scale · 3 minSection 5 of 11 · 3 min

Section 5 of 11 · 3 min read

Reading settings

Definitions

Choose how many terms have tooltips.

Article links

Make inline references clickable

Notes & comments

A tokenizer and a training mixture spend the same training budget in different ways. Count token exposures first. If a 250B-token corpus is traversed four times without any change to the samples, the run sees 1T token exposures regardless of the parameter count. The number of exposures can also be held fixed while you change the mixture or collect more unique documents. State which of those changes you are making before comparing runs.

Muennighoff et al. report negligible changes to loss for up to four epochs of repeated data compared with unique data at fixed compute in their experiments. Returns fell as they increased repetition further. Use the result to motivate an experiment with repetition, since the usable number of repeats depends on the corpus, compute budget, and target metric. See Data-Constrained Scaling for details.

Three dataset decisions matter when you allocate the exposures:

  • Deduplication. Near duplicates can concentrate training on the same patterns and can contaminate evaluation if copies cross splits. Lee et al. report that models trained on deduplicated corpora emit memorized text less often in their setup. Check train/evaluation overlap as well as duplication within training.
  • Domain curation. Textbooks Are All You Need reports pass@1 of 50.6% on HumanEval and 55.5% on MBPP for the 1.3B-parameter phi-1, trained for code using filtered and synthetic material. These scores describe two code benchmarks. Compare filters on your own task slices and examine which inputs each filter drops. Quality Filtering gives examples of controls you can tune.
  • Mixtures and stages. SmolLM2 reports training its 1.7B model on approximately 11T tokens, adjusting a mixture that includes web, math, and code data across stages. Keep a record of the sources, exposure counts, and change points in your own mixture so you can reproduce a gain or trace a regression.

Knowledge distillation gives you a further option when a teacher can generate labels for the target task. Check the generated labels against originals and validated answers. For example, if you teach a student to answer from passages, set aside examples where the teacher could produce a plausible answer from prior knowledge despite having no evidence in the passage. The student can otherwise learn the teacher's failure along with the desired behavior. The experiments on recursive training studied generation after generation of training on model outputs. Keeping original data and auditing synthetic labels are distinct choices from replacing the data recursively.

One way to make a data experiment interpretable is to fix the tokenizer, total token exposures, and model configuration, then change a single mixture rule. Compare manual-answer accuracy, code benchmarks, and general text loss separately if those are goals. A curated run can improve one metric while losing coverage on another slice. If you also change the tokenizer, log the exposures after tokenization so the nominal corpus size in documents does not disguise a change in training tokens.

Instruction examples belong to the training stage they actually enter. A task-formatted example in continued pretraining and the same example in supervised fine-tuning may use different loss masks and mixture weights. Keep development and test questions outside that loop, including paraphrases or copied manual passages when they reveal the answers. It is much easier to compare a candidate when the evaluation protocol identifies which questions it saw, which it only sees during deployment, and which documents retrieval is allowed to return.

Comments

Add to the conversation

A question, a correction, or an example from your own work.

No comments yet. Be the first to share your thoughts!

Newsletter

Stay up to date

Get new articles, book updates, and notes on AI and technology.

Unsubscribe at any time. Privacy policy