How Much Does Model Distillation Cost to Build?
Model distillation shrinks a large model into a smaller one, and the cost comes from teacher calls, training and evaluation. Here is what each part costs.
On this page
Short answer
Model distillation typically costs the most in teacher model calls to generate training data, followed by training compute for the student model and evaluation against the teacher. The total depends on how many examples you need, how large the student model is, and how often you retrain. Most teams can estimate it from three numbers: examples, tokens per example and training hours.
What is model distillation?
Model distillation is a technique that trains a smaller student model to reproduce the behaviour of a larger teacher model, so the smaller model can run faster and cheaper in production. The teacher is usually a large, expensive model, and the student is a small model that learns from the teacher's answers.
The process works by asking the teacher to answer many examples, then training the student on those question-and-answer pairs until it matches the teacher on the task. The student never needs to be as general as the teacher: it only needs to be good at the one job it will do in production, such as classifying tickets or tagging documents.
Distillation is worth doing when the teacher is too slow or too costly to run at scale, but the task is narrow enough for a small model to learn. For the basics of the technique, what is model distillation explains how teacher and student training works.
What makes up the cost of distillation?
The cost of distillation has five parts, and the teacher bill is usually the largest. Each part is driven by a different number, so the total is easier to estimate once you separate them.
| Cost part | What you pay for | What drives it |
|---|---|---|
| Teacher calls | Teacher answers for training data | Examples x tokens per example |
| Data review | People checking teacher answers | Share of examples reviewed |
| Training compute | GPU time to train the student | Student size, epochs, examples |
| Evaluation | Comparing student to teacher | Size of the test set |
| Retraining | Repeating the process over time | How often data changes |
Teacher calls dominate because you pay the teacher's price for every training example, and a good student needs thousands of them. Training compute is usually smaller for a small student, and evaluation is the cheapest part, but skipping it is a false saving: a student that was never measured is a student you cannot trust.
What drives the teacher model bill?
The teacher bill is the number of examples multiplied by the tokens in each example, multiplied by the teacher's price per token. Three levers control it: fewer examples, shorter prompts, and a cheaper teacher.
Examples are the biggest lever. A narrow task may need only a few thousand examples, while a broad one may need tens of thousands, and each one costs a teacher call. Start with a small sample, measure the student's quality, and add examples only where the student fails, rather than generating a large set up front.
Prompt length is the second lever. A prompt that includes long context or several examples costs more per call, so keep prompts short and put repeated instructions in the system prompt once. A cheaper teacher is the third lever: a mid-size model is often good enough to teach a narrow task, and it costs a fraction of the largest model. Use the smallest teacher that produces correct answers for your task.
What do training and evaluation cost?
Training cost depends on the size of the student model, the number of examples and the number of training passes. A small student trained on a few thousand examples can finish in hours on rented GPUs, while a larger student or a large example set can take days.
Renting GPUs by the hour is the usual route for a small team, and the price depends on the GPU type and the region, so check the vendor site for current rates. The practical way to control the bill is to train the smallest student that passes your evaluation, and to stop training once quality stops improving rather than running a fixed number of passes.
Evaluation is the cheapest part and the most important. Build a test set the student has never seen, with known good answers, and compare the student against the teacher on it. A student that matches the teacher on the test set is ready; a student that was never tested is a guess. Cost planning for small models is covered in small language model cost, and the same planning ranges apply here.
Example (hypothetical): distilling a review-tagging model
Example (hypothetical): a shop wants a small model that tags product reviews as praise, complaint or question. It generates 20,000 training examples from the teacher, each about 1,000 tokens, so the total is 20,000 x 1,000 = 20,000,000 tokens. At $3 per million tokens, the teacher bill is 20 x $3 = $60.
Training the student takes 4 hours on a rented GPU at $6 an hour, which is 4 x $6 = $24. Evaluation runs 2,000 test examples at about $0.002 each, which is 2,000 x $0.002 = $4. The total compute bill is $60 + $24 + $4 = $88.
The real cost is people time: a reviewer checks 500 of the teacher's answers at 2 minutes each, which is 500 x 2 = 1,000 minutes, or about 17 hours. The compute is cheap; the review is where the budget goes, and skipping it is how bad training data reaches production.
How do you keep distillation costs down?
You keep distillation costs down by generating only the data you need, using the smallest teacher and student that pass your tests, and reusing work across retrains.
- Start with a small sample. Generate a few thousand examples, train, and measure before scaling up.
- Add data where the student fails. Spend the teacher budget on the cases the student gets wrong, not on more of what it already handles.
- Use the smallest teacher that works. A mid-size teacher is often enough for a narrow task.
- Train the smallest student that passes. A smaller student is cheaper to train and cheaper to run.
- Reuse the evaluation set. A fixed test set lets you compare every retrain without paying to build a new one.
Retraining is the cost teams forget. If your data changes every month, budget for a regular retrain, and keep the teacher prompts and the evaluation set so the next run costs less than the first. A short AI proof of concept is a cheap way to test whether distillation fits your task before committing to a full build.
What are the common mistakes?
The most common mistakes are generating too much data, skipping evaluation, and distilling a task the student cannot learn.
- Generating data before measuring. A large training set built before any test exists is money spent blind.
- Skipping human review. Teacher answers can be wrong, and a student trained on wrong answers learns the mistakes.
- Picking a task that is too broad. A student can learn one narrow job; it cannot learn the teacher's full range.
- Training too long. Extra passes past the point where quality stops improving only add cost.
- Forgetting retraining. Data drifts, and a student that is never retrained quietly gets worse.
- Comparing on the training set. A student always looks good on data it trained on; judge it on unseen examples.
Key takeaways
- Teacher model calls are usually the largest cost, driven by examples and tokens per example
- Training compute is smaller for a small student, and evaluation is the cheapest part
- Start with a small sample, measure, then add data only where the student fails
- Human review of teacher answers is often the real budget, not the compute
- Budget for retraining: data drifts and a student that is never retrained gets worse
Frequently asked questions
How much does model distillation cost in total?
It varies widely with the number of examples and the size of the student, but a small project can cost under a few hundred dollars in compute. The larger cost is usually people time for reviewing teacher answers and building the evaluation set, so estimate both before starting.
Is distillation cheaper than using the teacher model directly?
Usually yes at scale, because the small student costs far less per request than the large teacher. The saving has to cover the one-off distillation cost, so it pays off when request volume is high and the task is narrow enough for a small model to learn.
How many examples do I need for distillation?
A narrow task often needs a few thousand examples, while a broader one may need tens of thousands. Start with a small sample, train and measure, then add examples only for the cases the student gets wrong rather than generating a large set up front.
Can a distilled model match the teacher?
On a narrow task, a well-trained student can come close to the teacher, and sometimes match it on the test set. It will not match the teacher on general tasks, because it only learns the one job it was trained for, which is the point of distilling.
Do I need GPUs to distill a model?
You need GPU time to train the student, and most small teams rent it by the hour rather than buying hardware. The teacher calls run through an API, so no hardware is needed for that part. Check the vendor site for current GPU rates.
When should I not distill a model?
Do not distill when the task is broad, when request volume is low, or when the teacher is already cheap enough. Distillation pays off when a narrow task runs at high volume and the teacher bill is the main cost.