Agent skill · AI & Agents

knowledge-distillation

Compress large language models using knowledge distillation from teacher to student models. Use when deploying smaller models with retained performance, transferring GPT-4 capabilities to open-source models, or reducing inference costs. Covers temperature scaling, soft targets, reverse KLD, logit distillation, and MiniLLM training strategies.

Orchestra-Researchgithub.com/Orchestra-ResearchGitHub ↗
claude-codecodexMIT
Install
npx skills add Orchestra-Research/AI-Research-SKILLs --skill knowledge-distillation --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 13 KB
Bundled scripts: none
Version: 1.0.0
Declared author: Orchestra Research
Requires: [transformers, torch, datasets]
Path: 19-emerging-techniques/knowledge-distillation/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 11,391
Language: TeX
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Knowledge Distillation: Compressing LLMs ## When to Use This Skill Use Knowledge Distillation when you need to: - **Compress models** from 70B → 7B while retaining 90%+ performance - **Transfer capabilities** from proprietary models (GPT-4) to open-source (LLaMA, Mistral) - **Reduce inference costs** by deploying smaller student models - **Create specialized models** by distilling domain-specific knowledge - **Improve small models** using synthetic data from large teachers **Key Techniques**: Temperature scaling, soft targets, reverse KLD (MiniLLM), logit distillation, response distillation **Papers**: Hinton et al. 2015 (arXiv 1503.02531), MiniLLM (arXiv 2306.08543), KD Survey (arXiv 2402.13116) ## Installation ```bash # Standard transformers pip install transformers datasets accelerate # For training pip install torch deepspeed wandb # Optional: MiniLLM implementation git clone https://github.com/microsoft/LMOps cd LMOps/minillm pip install -e . ``` ## Quick Start ### Basic Knowledge Distillation ```python import torch import torch.nn.functional as F from transformers import AutoModelForCausalLM, AutoTokenizer, Trainer, TrainingArguments # 1. Load teacher (large) and student (s

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Installation
  3. Quick Start
  4. Basic Knowledge Distillation
  5. MiniLLM (Reverse KLD)
  6. Response Distillation
  7. Core Concepts
  8. 1. Temperature Scaling
  9. 2. Loss Function Components
  10. 3. Forward vs Reverse KLD
  11. Training Strategies
  12. Strategy 1: Logit Distillation
  13. Strategy 2: Two-Stage Distillation
  14. Strategy 3: Multi-Teacher Distillation
Ships with 1 file
  • references/minillm.md
Commands it runs
Standard transformers
pip install transformers datasets accelerate
For training
pip install torch deepspeed wandb
git clone https://github.com/microsoft/LMOps
cd LMOps/minillm
pip install -e .
More from AI-Research-SKILLs
All skills →
About this skill
What does the knowledge-distillation skill do?

Compress large language models using knowledge distillation from teacher to student models. Use when deploying smaller models with retained performance, transferring GPT-4 capabilities to open-source models, or reducing inference costs. Covers temperature scaling, soft targets, reverse KLD, logit distillation, and MiniLLM training strategies.

How do I install it?

Run `npx skills add Orchestra-Research/AI-Research-SKILLs --skill knowledge-distillation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From Orchestra-Research/AI-Research-SKILLs, a repository with 11,391 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going