knowledge-distillation

Compress large language models into smaller students via logit matching and reverse-KL strategies.

Updated Feb 15, 2026
One-click install
npx skills add https://github.com/ricable/mcai --skill knowledge-distillation-ricable
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knowledge-distillation
Source: https://github.com/ricable/mcai/tree/main/.agents/skills/knowledge-distillation
Command: npx skills add https://github.com/ricable/mcai --skill knowledge-distillation-ricable

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you compress large language models into smaller, cheaper students while preserving as much teacher performance as possible.

Core Features & Use Cases

  • Teacher-to-Student Transfer: Learn from a large model’s logits, probabilities, or generated responses to train a smaller model.
  • Generative Model Optimization: Improve open-ended text generation with reverse KL approaches such as MiniLLM.
  • Cost and Deployment Reduction: Use distillation to lower inference cost, fit models on limited hardware, and create task-specific specialists.
  • Use Case: If you need a 70B model’s capabilities in a 7B deployment budget, this Skill guides the distillation setup, loss design, and training strategy.

Quick Start

Use the knowledge-distillation skill to define a teacher model, a student model, and the distillation approach you want to apply for your target task.

Frequently Asked Questions about knowledge-distillation

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

FAQPage Schema
How do I compress a large language model into a smaller student model?

To compress a large language model into a smaller student model, you apply teacher-to-student transfer using logit matching and soft targets. This preserves task performance while reducing inference costs for deployment.

What is reverse KL divergence in knowledge distillation for text generation?

Reverse KL divergence in knowledge distillation is a MiniLLM-style strategy that improves open-ended text generation. It optimizes the student model by focusing on high-probability regions of the teacher's output distribution.

Can I use temperature scaling for teacher-student model transfer?

Yes, you can use temperature scaling for teacher-student model transfer to soften probability distributions before matching logits. This technique helps the student model learn richer dark knowledge from the teacher.

Does knowledge distillation work for reducing 70B model deployment costs to 7B?

Knowledge distillation works for reducing 70B model deployment costs to 7B by transferring capabilities through soft targets and logit matching. This creates task-specific specialists that fit limited hardware budgets.

When should I use MiniLLM-style distillation over standard logit matching?

You should use MiniLLM-style distillation over standard logit matching when optimizing for open-ended text generation. It applies reverse KL divergence to better align the student's generative behavior with the teacher.