본문으로 건너뛰기
cccskills
무료GitHub에 공개

knowledge-distillation-deep

Deep analysis of knowledge distillation techniques for compressing large models into smaller efficient ones

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(13)

  • SKILL.md10.1 KB
  • _book_identity.json6.7 KB
  • _raw_response.md98.6 KB
  • diagrams/01_flowchart_knowledge_distillation_strateg.md2.0 KB
  • diagrams/02_quadrantChart_agent_capacity_vs._abstraction.md580 B
  • diagrams/03_sequenceDiagram_collaborative_multi-agent_know.md2.8 KB
  • diagrams/INDEX.md434 B
  • references/coordination-without-central-authority.md17.5 KB
  • references/expert-decision-making-under-uncertainty.md14.7 KB
  • references/failure-modes-of-compression.md13.5 KB
  • references/hierarchical-abstraction-in-knowledge-transfer.md15.9 KB
  • references/knowledge-transfer-as-multi-representation-learning.md11.5 KB
  • references/the-size-accuracy-tradeoff-and-distillation-metric.md12.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

SKILL: Knowledge Distillation and Intelligent Compression

Version: 1.0
Domain: AI/ML System Design, Agent Architecture, Knowledge Transfer
Cognitive Load: Medium (requires understanding of model training, system tradeoffs)

DECISION POINTS

Primary Decision Tree: Choosing Distillation Strategy

Given: [Task Type, Model Size Constraint, Accuracy Target]

IF task_similarity(student, teacher) > 0.8:
    ├── Use Response-Based Distillation
    │   ├── Temperature T = 3-6 for classification
    │   ├── Temperature T = 1-3 for regression
    │   └── Focus on soft label matching
    │
ELIF abstraction_level_needed == "high":
    ├── Use Feature-Based Distillation
    │   ├── Match intermediate layer activations
    │   ├── Use attention transfer if available
    │   └── Preserve semantic representations
    │
ELIF compression_ratio > 10x:
    ├── Use Cascade Architecture
    │   ├── Small model handles confidence > 0.9 cases
    │   ├── Large model backup for confidence < 0.9
    │   └── Route based on input complexity score
    │
ELSE:
    └── Use Relation-Based Distillation
        ├── Match similarity matrices between samples
        ├── Preserve ranking relationships
        └── Focus on structural knowledge transfer

Secondary Decision: Setting Alpha (Size vs Accuracy Priority)

IF deployment_environment in ["mobile", "edge", "embedded"]:
    ├── SET α = 0.6-0.8 (prioritize size)
    └── Accept accuracy loss for resource constraints

ELIF application_domain in ["safety_critical", "medical", "financial"]:
    ├── SET α = 0.1-0.3 (prioritize accuracy)
    └── Use larger models, cascade for uncertainty

ELIF can_dynamically_route == True:
    ├── SET α = 0.5 for base model
    ├── Build multiple checkpoints at different α values
    └── Route based on input difficulty estimation

ELSE:
    └── SET α = 0.4-0.6 (balanced approach)

Tertiary Decision: Agent Coordination Pattern

IF environment_stability == "static" AND task_distribution_known == True:
    └── Use Hierarchical Distillation (teacher → student)

ELIF multiple_experts_available == True:
    ├── Use Ensemble Distillation
    ├── Weight teachers by domain expertise
    └── Student learns from weighted combination

ELIF need_continuous_adaptation == True:
    ├── Use Online Distillation
    ├── Agents co-evolve simultaneously
    └── Bidirectional knowledge flow

ELSE:
    └── Use Self-Distillation with iterative refinement

FAILURE MODES

1. Accuracy Mirage

Symptoms: High average accuracy (>90%) but catastrophic failures on edge cases Diagnosis: Standard metrics hide stratified performance degradation Detection Rule: If per-class accuracy variance > 20% or minority class accuracy < 70% of overall accuracy Fix: Implement stratified validation with per-class thresholds; use weighted loss functions for rare classes

2. Temperature Blindness

Symptoms: Student model overconfident, poor calibration, loses "dark knowledge" Diagnosis: Training with temperature=1.0, ignoring probability distribution structure Detection Rule: If student confidence > teacher confidence on incorrect predictions Fix: Use temperature T=3-20 during distillation training; add calibration validation step

3. Capacity Cliff Crash

Symptoms: Model works fine until slight compression increase causes dramatic accuracy drop Diagnosis: Hit minimum capacity threshold for task complexity Detection Rule: If >5% accuracy drop from <10% parameter reduction Fix: Set hard minimum model size; use pruning instead of architecture changes; implement cascade routing

4. Hierarchical Rigidity

Symptoms: System can't adapt to new patterns; student errors persist despite available corrections Diagnosis: Fixed teacher-student roles prevent bidirectional learning Detection Rule: If student discovers edge cases but can't update teacher knowledge Fix: Implement feedback loops; use ensemble loss functions; enable peer learning between agents

5. Compression Amplification Bias

Symptoms: Compressed model maintains average performance but amplifies existing biases Diagnosis: Distillation preserves teacher's biases while losing error correction capacity Detection Rule: If demographic parity decreases >10% or fairness metrics degrade disproportionately Fix: Use bias-aware distillation loss; oversample minority classes; validate on adversarial fairness benchmarks

WORKED EXAMPLES

Example 1: Mobile Deployment Scenario

Context: Deploying sentiment analysis to mobile app, 50MB model limit, 200ms latency requirement Teacher: 800MB BERT model, 95% accuracy, 1.2s inference Constraints: α = 0.7 (heavily prioritize size), maintain >90% accuracy

Decision Process:

  1. Task similarity high (same domain) → Response-based distillation
  2. Compression ratio 16x → Expect significant accuracy loss, need mitigation
  3. Temperature selection: T=4 for sentiment (discrete classes with similarity structure)

Implementation:

  • Train 50MB DistilBERT student on soft labels from BERT teacher
  • Temperature T=4 during training, T=1 during inference
  • Achieve 91.2% accuracy (3.8% drop) with 16x compression
  • Add uncertainty threshold: defer to cloud API when confidence <0.85

Outcome: DS = 0.7×(50/800) + 0.3×(1-91.2/95) = 0.7×0.0625 + 0.3×0.04 = 0.056 (excellent score) Trade-off: 3.8% accuracy loss for 16x size reduction and 10x speed improvement

Example 2: Safety-Critical Multi-Agent System

Context: Autonomous vehicle perception, multiple specialized agents for object detection, depth estimation, trajectory planning Constraints: α = 0.2 (heavily prioritize accuracy), 99.9% reliability requirement

Decision Process:

  1. Different tasks per agent → Feature-based distillation for shared representations
  2. Safety critical → Cascade architecture with redundancy
  3. Multi-expert system → Ensemble distillation with specialist weighting

Implementation:

  • Large teacher models for each perception task
  • Medium student agents learn shared feature representations
  • Tiny monitoring agent validates cross-agent consistency
  • Cascade: students handle confidence >0.95, teachers handle edge cases

Agent Architecture:

  • Object detection student: 100MB (from 500MB teacher)
  • Depth estimation student: 80MB (from 400MB teacher)
  • Trajectory planning: Keep full teacher (no compression for final decisions)
  • Monitor agent: 10MB, watches for inconsistencies

Outcome: System maintains 99.92% safety threshold while reducing compute by 60% Trade-off: Modest efficiency gain for maintained safety with reduced single points of failure

Example 3: Collaborative Research Assistant Agents

Context: Multi-agent system for scientific literature analysis, agents specialize in different domains but share knowledge Constraints: Dynamic environment, new papers daily, agents must learn from each other

Decision Process:

  1. Dynamic environment → Online distillation with peer learning
  2. Different specializations → Relation-based distillation for structural knowledge
  3. Continuous adaptation needed → Bidirectional knowledge flow

Implementation:

  • 5 specialist agents (biology, chemistry, physics, computer science, medicine)
  • Each agent maintains domain expertise but learns general patterns from peers
  • Weekly ensemble sessions where agents teach each other via attention transfer
  • Self-distillation within each agent to compress learned knowledge

Mechanism:

  • Agent A discovers new pattern in biology papers
  • Shares attention weights and feature representations with other agents
  • Other agents evaluate if pattern applies to their domains
  • Successful transfers update shared knowledge base

Outcome: Collective accuracy improves 8% over 6 months vs. isolated training Trade-off: Increased coordination complexity for better adaptation and knowledge sharing

QUALITY GATES

  • Distillation Score (DS) calculated with explicit α parameter and documented rationale
  • Stratified validation completed with per-class accuracy thresholds set and met
  • Temperature parameter tuned (T>1 during training) and calibration validated
  • Capacity cliff analysis performed - confirmed model size is above minimum threshold
  • Failure mode monitoring implemented for bias amplification and edge case degradation
  • Adversarial test suite created covering out-of-distribution and minority class scenarios
  • If compression ratio >5x, cascade architecture evaluated and routing strategy defined
  • If multi-agent system, coordination pattern chosen and feedback loops implemented
  • Deployment readiness confirmed with latency, memory, and accuracy benchmarks met
  • Rollback plan prepared with performance monitoring alerts and degradation thresholds

NOT-FOR BOUNDARIES

Do NOT use this skill for:

  • Simple rule-based systems with <1000 parameters (use direct optimization instead)
  • Single-task agents with abundant computational resources (compression unnecessary)
  • Systems where interpretability is primary requirement (use interpretable-models skill instead)
  • Real-time systems with <10ms latency requirements (use hardware-acceleration skill instead)
  • Prototype/research phases before performance requirements defined (premature optimization)

Delegate to other skills:

  • For model architecture selection → use neural-architecture-search skill
  • For hardware optimization → use model-deployment-optimization skill
  • For interpretable AI requirements → use explainable-ai-design skill
  • For federated learning scenarios → use distributed-learning-coordination skill
  • For adversarial robustness → use adversarial-defense-strategies skill

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/windags-skills162026년 10월 14일 업데이트

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/windags-skills162026년 10월 14일 업데이트

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/windags-skills162026년 10월 14일 업데이트

Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/windags-skills162026년 10월 14일 업데이트

Use for insight, reframing, contradiction, impasse, and anomaly-driven problem solving when execution effort no longer helps. NOT for routine optimization, error correction, or well-specified tasks with known solution paths.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/windags-skills162026년 10월 14일 업데이트

Apply normative BDI reasoning to agents that must detect norms, choose which commitments to internalize, and resolve conflicts by comparing consequences. Use when obligations, prohibitions, or policies collide in autonomous systems. NOT for simple fixed-priority rules, pure constraint satisfaction, or domains where no real normative conflict exists.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

curiositech/windags-skills162026년 10월 14일 업데이트

curiositech의 스킬 모두 보기

이 스킬의 문제 신고