llm-distillation
Distill knowledge from large teacher LLMs into small student models via sequence-level (response-based) knowledge distillation. Covers teacher selection and licensing checks, generating distillation data with Bedrock serverless teachers (DeepSeek-R1, Claude via converse), reasoning distillation (keeping <think>/chain-of-thought for math/code/puzzle domains, stripping it for simple QA), sampling and temperature choices, batch generation with retry/backoff, cost estimation, data curation (dedup, decontamination, verifiable-reward filtering, LLM-judge filtering), producing TRL-ready JSONL for SFT/QLoRA, and evaluating distillation quality with student-vs-teacher relative gates. Use when creating a small specialized model from a large model's outputs, building R1-style distilled reasoners, or preparing teacher-generated training data.
- Version
- 1.0
- License
- Apache-2.0
Pinned to revision 45cf0fa3c5e7, so it is the text this page describes rather than whatever the author pushed since.
Files
- skills/llm-distillation/SKILL.md
- skills/llm-distillation/references/REFERENCE.md
- skills/llm-distillation/scripts/curate_distillation_data.py
- skills/llm-distillation/scripts/generate_teacher_data.py
Every link opens the file at its source, pinned to the revision this page describes.