← Back to LLMs Mind Map
⚡Flashcard Drill➔
⚡ LLMsID: distillation

Knowledge Distillation

知识蒸馏
🎯Core Definition
Knowledge distillation (KD) has a student model mimic the teacher's soft output distribution pT=softmax(z/T)p_T = \text{softmax}(z/T), where temperature TT softens probabilities to expose inter-class dark knowledge; loss is L=αLCE(y,pS)+(1−α)⋅T2⋅KL(pS∥pT)\mathcal{L} = \alpha \mathcal{L}_{CE}(y, p_S) + (1-\alpha) \cdot T^2 \cdot \text{KL}(p_S \| p_T), with T2T^2 compensating the softened gradient scale.
💡Use Cases
compressing a large model into a deployable small one, transferring knowledge on unlabeled data (teacher outputs as soft labels), and cross-architecture learning (LLM teacher to a smaller transformer); in LLM compression it is orthogonal to quantization — quantization cuts bit-width, distillation cuts model capacity, and the two stack.
⚡Key Problems Solved
when models are too large to deploy, distillation distills the teacher's generalization into the student at lower training cost than training from scratch, and soft labels retain inter-class similarity information that hard labels drop; together with quantization it forms two complementary compression axes.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of Knowledge Distillation.
Use Cases
In production engineering, what are the primary use cases for Knowledge Distillation and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Why learn from soft targets instead of hard labels?
2
Role of temperature T; effects of T too large or too small?
3
How do distillation and quantization relate — why are they orthogonal?
4
Common KD variants (logits, features, self-distillation)?
5
What happens when the student-teacher capacity gap is large, and how to mitigate?
Updated 2026-08-12
🎯
Verify Mastery: Practice Exam Questions for "Knowledge Distillation"
Take pitfall multiple-choice questions with derivation options; mistakes are automatically logged.
🚀 Start Card Practice ➔
⚡
Test muscle memory on this topic via 3-Layer Flashcards
Active Recall: Mentally formulate Prompt ➔ Math Derivation ➔ Benchmark Implementation in 3 minutes.
🎯 Drill This Card Now➔
← Previous CardSmoothQuant/AWQ & FP8Next Card →MoE Routing Top-k

🔗 More LLMs Knowledge Cards

引用出处: TalentMe 450+ 工业级 AI 架构考点知识库 (Tech Vault) · 遵循 CC-BY-4.0 知识共享协议
URL: https://talentme.airsota.com/resources/tech/roadmap/mindmap/LLM/card/distillation