Skip to main content

What this is

The cookbook’s training.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

If 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 is messages, 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 under training/examples/distillation: Run from the cookbook repository:

Next steps