Generative AI & Agentic AIModel adaptation and multimodal tasks

Distillation: define what the smaller model must preserve

PK
Pankit Kumar
Sr. Data Scientist at Parexel (a Goldman Sachs–backed company) · 20 September 2026 · 2 min read
Technically reviewed by Ishaan Sharma
In this article (4 sections)

Distillation is useful only when the smaller system preserves the behaviours the application needs. Define those behaviours before generating teacher outputs or comparing speed.

Apply non-compensating requirements

The adaptation lab evaluates two authored student records.

python
from adaptation_cases import distillation_case

result = distillation_case()
assert result["requirements"]["safety_pass"] == 1.0
assert result["students"][0]["task_success"] == 0.88
assert result["students"][0]["accepted"] is False
assert result["accepted"] == ["small-b"]
assert result["training_executed"] is False

Small-a exceeds the task threshold but fails the safety invariant. Teacher and student values are fixtures; no training ran.

Specify the preservation contract

List output schema, critical task acceptance, evidence support, abstention, tool authorization, safety, multilingual slices and calibration. Set minimums plus hard failures. Add memory, latency and cost goals, but evaluate them only among acceptable candidates.

Version teacher, prompt, generation settings, data manifest and student training configuration. Teacher output is supervision, not truth: verify labels, sources and policy compliance. Mix trusted human references where consequences justify them, and keep an independent holdout outside teacher generation.

Compare teacher, base student and distilled student on identical tasks. Examine where the student disagrees and whether it copies teacher errors. Test long-tail and adversarial cases, local hardware behaviour and artifact reproducibility.

The Generative & Agentic AI course connects compression goals to critical gates and experiment evidence.

Exercise

Define five must-preserve behaviours for a toy classifier, create teacher labels with one injected error and show the student cannot pass merely by matching that error.

Continue learning

This article is part of the Model adaptation and multimodal tasks sequence. Use the neighbouring tasks when you need the prerequisite or the next application.

Reference: NIST AI RMF Generative AI Profile.

PK
Pankit Kumar
Lead Instructor, NeuraPath Academy

Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.

This article is part of our Generative & Agentic AI programme — 3 months. Add practical GenAI, retrieval and agent-building skills to your existing toolkit.

Explore Generative & Agentic AI
Counselling is free · no obligation

Not sure which programme fits?

Tell us your background and we will map it to the right entry point — including saying so when a cheaper programme is the better fit. A counsellor replies within one working day.