Ask what should change when the equation is manipulated, then let the visualization test that expectation.
Foundation Lab
Knowledge Distillation: Learning from Teachers
How you get small models from large ones—DistilBERT is 40% smaller, 60% faster, 97% of performance
\mathcal{L} = \alpha \mathcal{L}_{KL}(S(x), T(x)) + (1-\alpha) \mathcal{L}_{CE}(S(x), y)Selected Foundation Object
Keep the equation fixed; move through the evidence.
Hard labels say "cat, not dog"; soft labels say "mostly cat, a bit dog, definitely not car"
\mathcal{L} = \alpha \mathcal{L}_{KL}(S(x), T(x)) + (1-\alpha) \mathcal{L}_{CE}(S(x), y)Use the runnable panel, the key equation, and canonical papers as separate forms of evidence for the same object.
The useful learning product is the reusable mechanism you can carry into another model, paper, or engineering tradeoff.
This atlas page keeps the working demo; the domain notebook carries the fuller Intuition -> Math -> Code -> Demo sequence.
Why It Matters for Modern Models
- How you get small models from large ones—DistilBERT is 40% smaller, 60% faster, 97% of performance
- Soft targets contain "dark knowledge": teacher's uncertainty about similar classes
- Modern LLM training uses distillation: smaller models trained on larger model outputs
What Tutorials Skip
What is still poorly explained in textbooks and papers:
- Hard labels say "cat, not dog"; soft labels say "mostly cat, a bit dog, definitely not car"
- Temperature τ controls how much dark knowledge transfers: τ→∞ means uniform (no info)
- Distillation works even when student has different architecture than teacher
Interactive Visualization
Core Math (Optional Deep Dive)
If you want intuition first, start with the key equation and the visualization. Come back here for the full walkthrough.
Train a student to match a teacher 's soft predictions:
Use temperature to soften teacher outputs:
Higher → more uniform → more information about relative similarities.