LearnQuestion bank

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 LLMTechnicalMedium

Theme reported publicly: Cohere, PolyAI

Answer it yourself first, out loud or on paper, then compare.

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