Explainer

What is model distillation? A plain-English guide

Model distillation trains a small, cheap AI model to copy a large one on a narrow task. Learn how it works, when it pays off, and how to start.

By the Cloudverg engineering team · · 5 min read

What it is

Model distillation is a way of training a small AI model to imitate a large one. The large model is called the teacher. The small one is the student. You run the teacher on a set of inputs, collect its answers, and use those answers as training material for the student.

The goal isn't to build a smaller copy of everything the teacher knows. It's to capture one job. A giant general-purpose model can write poems, debug code and summarize contracts. Your support team may only need it to sort incoming tickets into twelve categories. A student trained on thousands of the teacher's ticket decisions can often do that one job nearly as well, while running on far cheaper hardware.

Think of a senior engineer who writes down how they'd handle a few thousand real cases, then trains a new hire from those notes. The new hire won't match the senior on everything. On those cases, they get close.

How it works

The process has four steps. First, you gather a representative set of real inputs: tickets, invoices, chat messages, whatever the task involves. Second, you run them through the teacher model with a well-tested prompt and record the outputs. Third, you review a sample of those outputs, because the student will learn the teacher's mistakes along with its strengths. Fourth, you fine-tune a smaller model on the input and output pairs.

There are two common flavors. In the simpler one, you train the student on the teacher's final answers only. In the richer one, you also capture the teacher's confidence across possible answers, sometimes called soft labels, so the student learns how sure the teacher was and not just what it said. The second approach needs access to the teacher's internals, which hosted models often don't expose. Most business projects use the first.

After training, you test the student on cases it never saw. Compare it with the teacher on accuracy, speed and cost per request. If the gap is small enough for your use case, you deploy the student and keep the teacher around for the hard cases and for checking quality over time.

Check the terms of your teacher model before you start. Some providers restrict using their outputs to train other models, especially competing ones. Open-weight models usually have clearer licenses for this.

Why it matters for a business

The main payoff is run cost and speed. A small model needs less compute per request and responds faster. If you're sending a million short, repetitive requests a day through a frontier model, the bill and the latency both add up. A distilled student can handle that volume on modest hardware, sometimes your own servers or a single rented GPU.

It also gives you more control. A student built from an open-weight base can run inside your own environment, which helps when data can't leave your network. You aren't exposed to a vendor retiring a model version or changing behavior under you, because the weights are yours to pin.

The trade-off is upfront effort. You pay once to build the dataset, train, and evaluate, then you carry a model you have to maintain. That's worth it for high-volume, stable tasks like classification, extraction, routing and short-form drafting. It's rarely worth it for low-volume work or tasks that change weekly, where a prompted hosted model is simpler and cheaper overall.

Common mistakes

The most common mistake is distilling too early. If the task definition is still shifting, you'll train a student on yesterday's rules. Get the prompt and the teacher's behavior stable first, then distill.

The second is skipping review of the teacher's outputs. If the teacher mislabels one category consistently, the student will too, and it will do so confidently. Have a person check a sample, especially the edge cases.

The third is a weak test set. Teams often evaluate the student on data that looks like its training data and declare success. Hold back real examples, including odd and messy ones, and score the student on those. Also test on the inputs where mistakes cost the most, not just on the average.

The fourth is treating the student as finished. Inputs drift: new products, new phrasing, new customer behavior. Plan to sample live traffic, compare against the teacher now and then, and retrain when quality slips. Route low-confidence cases to the larger model so the student isn't forced to guess.

How to get started

Start by picking one narrow, high-volume task where the current model is expensive or slow and where the right answer is easy to define. Write down what good looks like in plain terms, and collect a few hundred real examples with correct answers checked by a person. That set becomes your yardstick.

Next, get the task working well with the large model and a good prompt. Measure it. Only then ask whether a smaller model could match it. Try a prompted small model first, since sometimes that's already enough and no distillation is needed. If it falls short, generate teacher outputs at scale and fine-tune.

If you're not sure which of your use cases are worth this effort, that's a scoping question before it's an engineering one. Cloudverg's AI readiness assessment is one option: $5,500/month, renews monthly until cancelled, fixed scope over two weeks. It ranks use cases by value, feasibility and risk, and it includes a token, GPU and run-cost model, which is the comparison that tells you whether a distilled model would pay off. Other routes are fine too, including doing the cost comparison in-house with a spreadsheet and a week of testing.

Frequently asked questions

What is the difference between model distillation and fine-tuning?

Fine-tuning is the general act of further training a model on your data. Model distillation is a specific use of it, where the training data comes from a larger teacher model's outputs and the goal is a smaller, cheaper model. Distillation is fine-tuning with a particular source of data and a particular purpose.

Does a distilled model perform as well as the large model?

On the narrow task it was trained for, it can come close, sometimes close enough that users can't tell. On anything outside that task it will usually be weaker than the teacher. That's why you test on held-back real examples and keep the large model for hard cases.

Is model distillation allowed with any AI model?

Not always. Some providers' terms limit using their model outputs to train other models. Open-weight models tend to have clearer licenses. Read the terms of both the teacher and the student's base model before you build a dataset.

Monthly plan

Want help with this? AI readiness assessment

$5,500/month

2 weeks · Starts within 10 business days

Two weeks to rank your AI and agent ideas by value and risk, check your data, and plan a first project with a cost model.

Renews monthly. Cancel any time.
Prefer to pay once?

Pay $5,500 once for one month of the AI readiness assessment. It ends on its own, nothing renews.

What is included

Related guides

More ai and agents guides   AI and machine learning

Smallest way to start

Get a senior architect on your problem this week

Ninety minutes a month on the cloud, AI or security question that is blocking you, a pre-read of your material and a written summary within two business days.

$450/month

Renews monthly. Cancel any time.
Prefer to pay once?

Pay $450 once for one month of the Expert architecture session. It ends on its own, nothing renews.