The small model that learned from the big one: distillation and on-device

The Inference board follows a prompt through a model to a reply. This lesson shrinks the model at the middle of that picture until it fits on a laptop.
Module 03 · AI · Past the basics · about 15 min to read

The Inference board follows a prompt through a model to a reply. This lesson shrinks the model at the middle of that picture until it fits on a laptop.
Lesson 36 of 83 in AI
The rest of this lesson is part of a plan.
A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.
See plansAlready a member? Sign in
Or start free: a free account opens lessons 2 and 3 of every track.
Terms it explains: inference, hard label, soft label, teacher, student, distillation, temperature, synthetic data, bit, quantisation, scale, Q4_0, Common mistakes, context window, greedy, grounding, hallucination, KV cache, logits, prefill vs decode, sampling, stateless, the KV cache grows with context, throughput, top-k / top-p (nucleus), TTFT.
Lab
One GPU, one chat, cores 99% idle. How many more chats fit before anything gets slower?
Drag Chats sharing one read of the weights to the right and watch operations per byte rise until The wall stops it.
The model has read 'The weather today is'. How often does it say something other than sunny?
Drag How hard the drum is shaken from T = 0.1 to 5 and watch Outside the top word climb.
Connects to
Saved in this browser, and to your account when you sign in.