---
title: Your feature works with a large frontier model but costs too much. How would you distil it into a smaller model, and…
url: https://gurkanozkan.ai/learn/questions/applied-llm-ft-08/
markdown: https://gurkanozkan.ai/learn/questions/applied-llm-ft-08.md
kind: question
role: Applied LLM
stage: Technical
difficulty: Medium
json: https://gurkanozkan.ai/api/learn/questions/applied-llm-ft-08.json
robots: noindex
---

# Your feature works with a large frontier model but costs too much. How would you distil it into a smaller model, and how do you know it's good enough?

Applied LLM · Technical · Medium

Theme reported publicly: [Cohere](https://www.aced.io/experiences/cohere-staff-machine-learning-engineer-interview-b49af6), [PolyAI](https://simplify.jobs/p/ea4b6d9e-bd59-4d61-87cf-8cf25d557b79/Senior-Research-Scientist)

## Answer

*Model answer, written in a candidate's voice*

### In short

- Start with legality and data: check licence/terms before using teacher outputs or traces, prefer licensed or synthetic inputs, and sample real traffic plus edge cases.
- Generate teacher outputs on real and synthetic inputs; filter with verifiers or judges, optionally keeping reasoning traces only if allowed and useful.
- Train with sequence-level SFT on filtered outputs; use logit distillation when teacher logits are available.
- Evaluate slice-by-slice against the teacher, especially tails, and compare quality delta to cost and latency savings.
- Ship a cascade: easy cases to the small model, hard or low-confidence cases to the teacher; monitor drift and refresh data and evals as traffic changes.

### In full

I would not distil blindly: first I would check the licence and terms for using the frontier model outputs or reasoning traces for training, and prefer licensed data, synthetic inputs, or self-generated examples when outputs cannot be reused. Then I would sample real traffic plus synthetic edge cases, get teacher outputs, and filter them with verifiers or judges such as exact match, unit tests, rubric scoring, or human spot checks, keeping reasoning traces only when permitted and actually helping. Training would be sequence-level SFT on the filtered outputs, with logit distillation or KL-style matching when teacher logits are available. To know it is good enough, I would compare the small model against the teacher on held-out slices, especially tails like rare intents, long prompts, multilingual or adversarial cases, and accept it only if the quality delta is within the product risk budget while cost and latency improve. I would also route low-confidence or hard cases to the teacher as a cascade, then monitor production traffic and refresh the data, filters, and eval slices as the distribution drifts.

*Corrected by an independent AI reviewer.*

## What a strong answer covers

- Teacher outputs on real or synthetic inputs, filtered by verification or judges; optionally reasoning traces
- Sequence-level SFT; logit distillation when teacher logits are available
- Checks licence/terms on training with model outputs
- Slice-level comparison against the teacher, especially tails; acceptable quality delta vs savings; cascade hard cases to the teacher
- Refresh data as traffic drifts

## Common mistakes

- Training only on common, easy inputs
- ignoring provider terms

## Topic guides

- [Fine-tuning, LoRA and distillation](https://gurkanozkan.ai/learn/topics/fine-tuning.md)
- [LLM cost and unit economics](https://gurkanozkan.ai/learn/topics/cost.md)
---

*Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.*
