# Model Distillation Explained: A Bigger Model Wrote 420 Questions for 49 Cents, and Three Small Models Learned From Its Decisions

> Source: <https://dev.to/aiexplore369zoho/model-distillation-explained-a-bigger-model-wrote-420-questions-for-49-cents-and-three-small-4862>
> Published: 2026-11-23 12:30:02+00:00

**Recommendation:** Generate realistic questions with a stronger teacher model and label them against your catalog, then validate and deduplicate before using roughly 183 labels as LoRA training data alongside template examples.
More in the playbook "Fine-tuning and data": <https://wpnews.pro/playbooks/training-data>

*Part 9 of ten. Each post is a short, plain-words tour of one lesson from [e=mc²](https://theaivibe.org/emc2), a free build-an-LLM-from-scratch course; the full lesson, notebook and numbers are on the site.*

**A small model trained on templates learns the catalog, not how people talk.** That is the wall Lesson 08 left me at. My tiny decider gave a valid answer to every template question and got 71.3% of them exactly right, and then a real person would type something like "which representative handles T-123?" and it had never seen a sentence shaped that way in its life.

Tonight's lesson is about the cheapest fix I know. Let a bigger model handle the realistic questions, keep its decisions, and train the small model on those decisions. The whole run, three small models before and after, took 169.6 seconds on an Apple Silicon Mac. The teacher cost 49 cents.

In this course **Momo** the monkey is the model and **Ella** the elephant is the one who corrects him. Until now Ella has been drilling Momo on sentence patterns, thousands of template questions with the codes and dates swapped in and out. Momo got good at patterns. Real customers do not speak in patterns.

So Ella changes jobs. She already answers everything Momo passes to her, so tonight she writes 420 realistic questions herself, then labels each one with the operation the counter should run. Momo studies her decisions.

That is **application-level distillation**. The classic version of distillation copies a big model's probabilities, its whole spread of maybe-this and maybe-that. This lesson copies something plainer: its decisions, inside the actual application. In the real system the teacher is the same slow planner that undecided questions already go to, so the labels cost nothing extra. Here I had to rent one.

The open-source project this course builds toward, pankhllm, uses a local 12B model as its planner, and its teacher-written questions are not public. So I had Claude Sonnet 4.5, reached through OpenRouter, stand in. It wrote 420 questions from the catalog's plain descriptions rather than its regular expressions (the project's dataset notes record a teacher once copying a regex straight into its questions), then labelled each one against the catalog without being told what it had been written for.

Validation threw out 14 labels, mostly months written as words. 406 remained. That took 49 calls and $0.49 as reported by OpenRouter. After removing near-duplicates, 405 questions: 183 to learn from, 50 to set each model's confidence threshold, and 172 held back as the test that nobody trains on.

Why 183? Because that is the number from pankhllm's own published benchmark, where 183 teacher labels added to 20,000 template questions raised coverage by about ten points without losing precision. I wanted to see whether the same step would hold for three very different students.

The two borrowed models are not retrained. They get **LoRA**, Lesson 06's trick: freeze the borrowed book, learn small sticky notes to stick on it. For Qwen the whole decision becomes one token. After "Question:... Operation:", the next word is one of eight short words, and the probability of each word is the model's confidence in that choice.

```
WORD = {"kpi_value": " value", "kpi_rank": " rank", "kpi_vs_benchmark": " benchmark", "kpi_change": " change",
 "kpi_trend": " trend", "prescriber_list": " list", "coverage_owner": " owner", "UNSUPPORTED": " none"}
LABEL_IDS = [tok(WORD[op], add_special_tokens=False)["input_ids"][0] for op in OPS] # one token each
model = get_peft_model(qwen, LoraConfig(task_type="CAUSAL_LM", r=8, lora_alpha=16,
 target_modules=["q_proj", "k_proj", "v_proj", "o_proj"]))
enc = tok([f"Question: {shape}\nOperation:"], return_tensors="pt")
p = F.softmax(model(**enc).logits[0, -1, LABEL_IDS], -1) # the next token is the decision
```

All three read the question's **shape**, Lesson 07's stickers over codes, months and numbers. And all three face the same rule: abstain if your favourite operation does not structurally fit the question, otherwise decide only when your confidence clears a threshold chosen before the test, the lowest at which both calibration sets hold 98% precision.

On the 172 teacher-written test questions, the share each model decided and the precision it held, before and after the 183 labels:

All three improved. Qwen improved most, and Qwen is 44 times larger than BERT-mini and pretrained; this run does not separate the two causes. The labels helped on the old template test as well: Qwen's template accuracy rose from 74.3% to 95.8%.

Now the part a teaser would normally skip. **None of the three held 98% precision** on the teacher-written questions at its fixed threshold. Even if I cheat and tune the threshold on the test set itself, the best any model manages at 98% is Qwen's 17.4%. Part of that is a ceiling nobody can train past: 11.0% of the teacher's own test labels name an operation the question does not structurally fit, so under the abstain rule no student can ever decide those.

One more honest line. Precision on a set the teacher labelled means agreement with the teacher, not truth. The teacher makes mistakes of its own, and pankhllm's docs list disagreements where the small model was right and the teacher was not.

Speed, one question at a time on a CPU: from scratch 0.643 ms, BERT-mini 1.384 ms, Qwen 45.95 ms. The simple regression baseline, 0.083 ms. Keep that gap in mind for tomorrow.

A few hundred labels copied from a bigger model's own decisions are cheap, and they helped every student, including one with under a million parameters. They did not buy the 98% rule here. On the lesson page a label counter widget retrains two of the models with 45 and 90 labels too, and the curve is not smooth: at 90 labels the decider decided 48.8% at 90.5%. With only 50 calibration questions, one or two confident mistakes move a threshold a long way, which is also why a model can decide less while getting more precise.

The full results table, the glossary in Momo's words, the widget and the notebook are all on the lesson page. The postcard version is this: when templates run out, borrow a bigger model's judgement, keep its decisions, and measure what they bought you.

This post is the postcard. The lesson is the trip. **Lesson 09 of e=mc²** on theaivibe.org walks you through every piece with widgets you can poke, a notebook that runs on a free GPU in minutes, and the honest numbers at every step. No account, no paywall, nothing to install.

Tomorrow: the three students are shrunk to int8, timed, and put in front of pankhllm's own binary, which decides whether either of them earns a lane.
