Distilling a 70B model into an 8B student
Over the last month I generated ~300k completions from a 70B teacher (Q4 on the 2× 3090 rig, roughly 11 days of continuous generation) and fine-tuned an 8B student on them. Sharing what worked, since most distillation guides stop at "generate data, SFT it".
Setup:
- Teacher: 70B Q4_K_M, temperature 0.7, top-p 0.9, one completion per prompt, 3k-token cap.
- Prompts: 300k from my domain (support-ticket triage) plus 40k general prompts to slow down forgetting.
- Student: 8B, full fine-tune (not LoRA — at this dataset size the full FT was worth the 48GB shuffle across my two cards).
Results on my eval set: student scores 91% of the teacher's rubric score while running at 6× the speed. The gap that remains is almost entirely on the longest, most ambiguous tickets — the teacher hedges appropriately where the student picks a confident wrong answer.
Two things I would do differently: generate two completions per prompt and keep the one the teacher itself rates higher (self-consistency filtering), and hold out 5k teacher completions as a validation set scored by the teacher — my early checkpoints overfit to the teacher's verbal tics, which the rubric missed but side-by-side reading caught immediately.
Solid result — 91% at 6× speed is the trade that actually matters in production. On the "confident wrong answer" gap: that is the classic off-policy problem. The student only ever sees the teacher's final tokens, never its distribution, so it learns the what but not the uncertainty.
If you still have the teacher outputs, two cheap upgrades:
- Logit distillation on the SFT loss — if you can store top-k logprobs per token during generation, a KD loss term (KL against teacher top-k) closes a chunk of that gap without new generation.
- On-policy rounds: let the student generate, have the teacher critique or rescore, add the corrected pairs, repeat. Even one round bought me 3 points on my equivalent setup.
Curious about the generation economics, since that is where my own attempt stalled: 11 days of 70B Q4 on 2× 3090 for 300k completions works out to roughly 20 completions per minute sustained — is that with continuous batching, or one at a time? I was getting half that and gave up at 60k prompts.
Also, on the verbal-tic overfitting: I hit the same thing and the fix was embarrassingly simple — dropping the teacher's characteristic opening phrase from every target via a regex before training. The student stopped imitating it within an epoch, and my side-by-side preference score went up even though the eval rubric never moved.