knowledge-distillation

Compress large language models by distilling knowledge from a teacher to a student.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/tadod12/fraud-detection-research --skill knowledge-distillation-tadod12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knowledge-distillation
Source: https://github.com/tadod12/fraud-detection-research/tree/main/.agent/skills/19-emerging-techniques/knowledge-distillation
Command: npx skills add https://github.com/tadod12/fraud-detection-research --skill knowledge-distillation-tadod12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Knowledge distillation compresses large language models by training a smaller student model to imitate a larger teacher, enabling deployment with reduced compute while preserving performance.

Core Features & Use Cases

  • Teacher-student distillation transfers capabilities from large models to compact counterparts.
  • Reverse KL / MiniLLM variants improve generation diversity and robustness for open-ended tasks.
  • Production-ready guidance covers data selection, hyperparameters, training loops, and evaluation for reliable deployment.

Quick Start

Load a teacher model, initialize a smaller student, and train using temperature-scaled soft targets to distill the teacher's knowledge.

Frequently Asked Questions about knowledge-distillation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does knowledge distillation compress large language models?

Knowledge distillation compresses large language models by training a smaller student model to imitate a larger teacher, enabling deployment with reduced compute while preserving performance.

What is reverse KL divergence in teacher-student distillation?

Reverse KL divergence, applied in MiniLLM variants during teacher-student distillation, improves generation diversity and robustness for open-ended tasks by altering the training objective.

How do I distill a large language model into a smaller student model?

To distill a large language model, load a teacher model, initialize a smaller student, and train using temperature-scaled soft targets to transfer the teacher's knowledge.

Can I use knowledge distillation for domain adaptation and specialized generation tasks?

Yes, knowledge distillation applies to model compression, domain adaptation, and fast deployment scenarios across generation tasks, multi-teacher setups, and specialized domains.

Why does my distilled student model perform poorly on open-ended generation tasks?

Poor performance on open-ended generation tasks during distillation often relates to using standard KL divergence; applying reverse KL or MiniLLM variants can improve generation diversity and robustness.

What evaluation considerations are needed when distilling a deployable language model?

Evaluating a distilled deployable language model requires careful consideration of data selection, hyperparameters, training loops, and evaluation metrics to ensure reliable performance.