FAQ

LLM training

Distillation datasets: training on another model's output

Most open post-training data is now machine-generated. The named teachers, the real scales, and the licence question that decides whether you can use any of it.

The quiet fact about open instruction data is that most of it was written by a model. Knowing which model, and under what terms, matters more than the row count.

What distillation means here

In its classical form, distillation trains a student on a teacher's output distribution — the full logits. In current practice the word almost always means something simpler: generate completions with a strong model, then supervise-fine-tune a smaller model on them.

So the data shape is ordinary SFT data — (prompt, completion) pairs — whose responses happen to be machine-written. Everything about the training is the same; what changes is where the answers came from, and therefore what you are inheriting.

The scale is 105 to 107 examples, which is only affordable because the answers are generated. Paying humans to write ten million responses is not a thing anyone does.

Each stage consumes a different shape of data, usually less of it than the stage before, so the stage your goal belongs to decides what you collect and how much of it.

The named teachers and real counts

The better open datasets name their generator, which is the single most useful thing a distillation dataset card can do — it tells you what behaviour you are importing and whose terms apply.

DatasetScale and teacherLicence
OpenThoughts3-1.2M1.2M rows — 850k maths, 250k code, 100k science; annotated with QwQ-32BApache-2.0
Llama-Nemotron-Post-TrainingDeepSeek-R1 3,934,627; Qwen-2.5-Math-7B 19,840,970; Qwen-2.5-Coder-32B 8,917,167predominantly CC-BY-4.0
Nemotron-CC1.9T synthetic pretraining tokens, rephrased by Mistral NeMo 12B instructnot stated in the paper
Llama 3 code SFT“over 2.7M synthetic examples” for code alone; rejection sampling with K typically 10–30 per promptmodel licence applies
A grouped bar chart of accuracy or percentile on AIME 2024, Codeforces, GPQA Diamond, MATH-500, MMLU and SWE-bench Verified for DeepSeek-R1, OpenAI-o1-1217, DeepSeek-R1-32B, OpenAI-o1-mini and DeepSeek-V3. DeepSeek-R1-32B scores 72.6 on AIME 2024, 94.3 on MATH-500 and 62.1 on GPQA Diamond, above o1-mini's 63.6, 90.0 and 60.0.
The 32B bars are DeepSeek-R1-Distill-Qwen-32B, Qwen2.5-32B fine-tuned on about 800,000 samples curated with DeepSeek-R1, and they beat o1-mini on the maths and science tests. The README is explicit on the licence side too: R1's MIT licence allows distillation, and the distilled model also carries the Apache 2.0 of its Qwen 2.5 base, which is the pair of permissions this article asks you to check. Image: deepseek-ai/DeepSeek-R1 · MIT repository · from “DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning”, arXiv:2501.12948

The licence question is the real constraint

This is where distillation projects fail, and they fail late — after the model is trained.

Two separate permissions are involved. First, the dataset's own licence, which the table above covers. Second, and more easily missed: the terms of the model that generated it. Some model licences explicitly restrict using outputs to train competing models; others are silent; others are permissive. A dataset released under Apache 2.0 whose contents were generated by a model whose terms forbid that use is a problem the dataset licence does not solve.

If you are generating your own distillation data, read the generating model's terms before you start, not after. If you are using someone else's, check what generated it — which is why a card that names its teacher is more trustworthy than one that does not, even though it gives you more to worry about.

A simplified knowledge-distillation diagram. A dataset feeds both a student model and a teacher model; the student logits and the teacher logits go into a single loss, whose weight updates loop back to the student model only.
Classical knowledge distillation: the student is trained to match the teacher's logits, and only the student's weights are updated. Most open post-training data uses the simpler form, fine-tuning on the teacher's generated text, but either way the licence terms follow the teacher. Image: pytorch/torchtune · BSD-3-Clause repository

What you inherit along with the capability

A student trained on a teacher's outputs acquires the teacher's errors with the teacher's confidence, and this is qualitatively different from training on human data.

Human-written data is wrong in varied, idiosyncratic ways that partly cancel out. A single model is wrong systematically — the same misconception, the same hedging tic, the same formatting habit, across millions of examples. The student learns the pattern, not the noise.

Two practical consequences. Verify where you can: for maths and code the answer is checkable, and filtering generated data by whether it is actually correct is the highest-value step available — which is what rejection sampling does when its acceptance test is a correctness check: generate K candidates and keep the ones that pass. And keep a human-written evaluation set. If both your training and evaluation data come from the same teacher, your benchmark measures agreement with that teacher rather than correctness.

A histogram titled 'Thinking Trajectory Token Count Distribution Comparison': frequency against number of tokens from 0 to about 26,000. Red bars for Gemini Thinking cluster between about 3,000 and 7,000 tokens, peaking near 5,000; blue bars for R1 Thinking spread fairly evenly from about 1,000 to 17,000 tokens, with a thin tail past 25,000.
Reasoning-trace lengths for s1's 1,000 training questions, answered once by Gemini and again by DeepSeek-R1 for s1.1. Gemini's traces mostly stop below about 8,000 tokens; R1's spread past 20,000. A student inherits that habit along with the answers, and with it the sequence length and compute that every training row costs. Image: simplescaling/s1 · Apache-2.0 repository · from “s1: Simple test-time scaling”, arXiv:2501.19393

Reasoning traces, specifically

The current wave of distillation targets reasoning: the teacher is a model that produces long chains of working, and the student learns to produce them too.

Two grouped bar charts of the long-CoT gap (long minus short chain-of-thought score) by student model size, with bars for MATH, GSM8k, AIME, AMC and Olympiad and a dashed average line: for Qwen from 0.5B to 32B the average goes from about -5 to +14; for Llama from 1B to 70B, from about -4 to +4.
How much better students do when distilled on long chains of thought than on short ones, by student size, for the Qwen (left) and Llama (right) families. Up to 3B the long traces hurt on average; from 7B or 8B they help, most on the hardest maths. Match the trace length in your distillation data to the size of the student. Image: Figure 2 of the paper · CC BY 4.0 · from Li et al. 2025, “Small Models Struggle to Learn from Strong Reasoners”, arXiv:2502.12143

This works notably well, and the datasets above are mostly of this kind. Two things are worth knowing. The traces are long, so token counts run far ahead of row counts and your sequence length and memory budget need to accommodate them — a million reasoning examples is not comparable in cost to a million short instruction pairs.

And a correct final answer does not mean correct working. Filtering on the answer leaves traces that reach the right result by invalid steps, and the student learns the invalid steps too. Where you can check intermediate steps, it is worth doing.

A Sankey diagram running from source datasets on the left (OpenMath at 2.9M is the largest, with smaller physics, chemistry and code sources) through four labelled stages: filter questions (math 180k, code 60k, science 60k), deduplicate questions (math 80k, code 60k, science 50k), randomly sample questions (math 53k, code 16k, science 6k, 75k in all), and generate multiple answers, a x16 step that ends in a final 1.2M.
OpenThoughts3-1.2M is 75,000 questions, each answered sixteen times by the teacher, QwQ-32B: the 1.2M rows are traces, not distinct problems. A distillation card's row count can hide a multiplier like this, and it changes both what the student learns from and what training costs, since every one of those rows is a long trace. Image: open-thoughts/open-thoughts · Apache-2.0 repository · from “OpenThoughts: Data Recipes for Reasoning Models”, arXiv:2506.04178

Questions people ask

Is distilling from a closed model allowed?

It depends entirely on that model's terms of service, which you should read rather than infer. Several explicitly prohibit using outputs to develop competing models. Open-weight models with permissive licences are the safer route for anything you intend to ship, and are what the major open distillation datasets now use — notice that the teachers named above are open models.

How does distillation compare to training on human data?

Cheaper per example by orders of magnitude, and competitive or better on benchmarks for reasoning tasks. Weaker where the teacher is weak, and systematically rather than randomly so. The strongest practical setup is generated data at volume, filtered by verification, with a human-written evaluation set held separate.

Can a student beat its teacher?

On specific benchmarks, sometimes — particularly when the generated data is filtered for correctness, so the student trains only on the teacher's successes rather than its average behaviour. Broadly exceeding the teacher's general capability from its outputs alone is not something to plan around.

Should I say that my model was distilled?

It is good practice and increasingly expected, and it helps anyone evaluating your model understand its failure modes. Naming the teacher and the dataset in your model card costs nothing and is the same transparency you want from the datasets you consume.

Stop hunting. Start searching.

Tens of thousands of curated datasets, searchable in plain language — with the licence and size checked before you download anything.

Search Dataset Finder →