What this is
The cookbook’straining.recipes.distillation_loop trains one student from its own rollouts while a frozen teacher scores those same responses.
Use it when you want recipe-managed trainer provisioning, student sampling, teacher scoring, checkpointing, and cleanup for distillation experiments.
Recipes
SDFT is not part of this cookbook. It is maintained in the
Fireworks Tinker-Cookbook repository;
follow the SDFT guide and use a
separate Python environment. It is a different objective from
distillation_loop, not a flag on it.
See the distillation skill
for teacher setup and algorithm details.
Minimal example
teacher_model is a base model resource, the recipe creates a frozen teacher deployment for scoring. If it is already an inference model or deployment resource, the recipe uses it directly.
Multi-teacher runs
The current OPD recipe uses one frozen teacher. Fork its loop to route prompts to multiple teachers.Dataset contract
Rows are JSONL objects. The only required field ismessages, the student-visible OpenAI-style chat prompt.
Optional fields:
Student and teacher token IDs must use a compatible tokenizer and vocabulary. Prefer teachers from the same model family, and use a matching tokenizer for
DeployConfig.tokenizer_model.
Examples
The cookbook includes distillation examples undertraining/examples/distillation:
Run from the cookbook repository:
Next steps
- Cookbook Reference - config classes and common recipe fields
- Loss Functions - built-in and custom Training API losses
- Weight sync - how updated weights reach serving deployments