skills/knowledge-distillation-in-deep-learning/SKILL.md
Design deployment-focused distillation systems that balance model size, accuracy, calibration, and cascade escalation under real resource limits. Best for teacher-student compression, threshold design, and failure-aware deployment. Activate on "model compression", "teacher- student", "distillation score", "cascade model", "edge deployment", or "model calibration". NOT for generic deep-learning overviews, prompt optimization, or training work without a concrete distillation objective.
npx skillsauth add curiositech/windags-skills knowledge-distillation-in-deep-learningInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill when the core design question is how to compress a capable model into something smaller, cheaper, or more routable without hiding unacceptable losses in calibration, robustness, or edge-case performance.
This skill is not the primary fit for:
Distillation can transfer logits, soft labels, feature maps, or other internal structure. Deployment success depends on choosing the representation that preserves the behavior you actually care about.
The paper's distillation-score framing matters because it forces the team to say what it is optimizing for. Mobile and edge deployments tolerate more loss than safety-critical paths. If the priority is hidden, the system will drift toward accidental risk.
Low-level feature extraction can often live in smaller students. High-level semantic or reasoning-heavy decisions usually require more capacity. Uniform compression across all layers or roles is usually the wrong move.
When the input distribution has easy and hard cases, a small-first, large-backup cascade often dominates "one tiny model for everything." Distillation should support escalation, not eliminate it.
Compressed models often fail first on rare classes, borderline examples, and out-of-distribution inputs. Average accuracy can stay high while the risk profile becomes much worse.
See the richer flow, quadrant, and sequence diagrams in diagrams/INDEX.md.
flowchart TD
A[Deployment distillation request] --> B{What is the hard constraint?}
B -->|Latency, memory, battery| C[Prioritize smaller student]
B -->|Safety or quality floor| D[Prioritize accuracy and calibration]
C --> E{Do easy and hard inputs differ sharply?}
D --> E
E -->|Yes| F[Design cascade or backup escalation]
E -->|No| G[Single student may be acceptable]
F --> H{What must transfer?}
G --> H
H -->|Decision behavior| I[Response-based distillation]
H -->|Internal abstractions| J[Feature-based distillation]
H -->|Confidence and structure| K[Multi-level or relation-aware transfer]
I --> L[Validate slices, calibration, and OOD behavior]
J --> L
K --> L
Surface understanding says "the student only lost 2% accuracy, so ship it."
Deeper understanding says:
data-ai
license: Apache-2.0 NOT for unrelated tasks outside this domain.
development
Use when designing caching strategies (cache-aside, write-through, write-behind), implementing distributed locks, building rate limiters, leaderboards, real-time streams (XADD/consumer groups), pub/sub, or tuning eviction policies. Triggers: thundering-herd on cache miss, dogpile on key expiry, Redlock vs SET-NX-PX choice, sliding-window rate limiter, hot-key on a single cluster slot, big-key blowup, MULTI/EXEC across slots, KEYS in production. NOT for Redis Cluster operations/admin (different domain), embedded KV (SQLite, leveldb), in-process LRU caches, or Memcached.
tools
Drawing the `'use client'` boundary correctly in React Server Components apps (Next.js App Router, RSC frameworks) — leaf-pushing, slot composition, serialization rules, and environment poisoning prevention. Grounded in react.dev and Next.js 16 docs.
development
Use when designing rate limiting for an API, choosing between token bucket / sliding window / leaky bucket / fixed window, implementing it in Redis, deciding edge (Cloudflare/Upstash) vs origin enforcement, sizing per-user vs per-IP vs per-endpoint quotas, returning the right 429 response with Retry-After, or fixing the boundary-burst bug in fixed-window limiters. Triggers: 429 too many requests, INCR + EXPIRE, ZADD + ZREMRANGEBYSCORE + ZCARD, X-RateLimit-Remaining header, Cloudflare WAF rate limiting rules, Upstash @upstash/ratelimit, leaky bucket shaping vs policing, distributed rate limiter consistency. NOT for DDoS mitigation specifically (different scale), CAPTCHA / bot management, full WAF design, or per-user quota billing.