跳到正文
cccskills
免费在 GitHub 公开

distillation

Distill large models into smaller ones — teacher-student training, data generation, loss design, and quality validation. Use when you need big-model behavior at small-model cost.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md4.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Model Distillation

Distillation transfers capability from a large teacher model to a smaller student: train the student to mimic the teacher's outputs (or output distributions) on a representative dataset. The result runs cheaper and faster while retaining much of the teacher's behavior.

Overview

The core idea: the teacher's soft outputs (probability distributions, reasoning traces) contain more information than hard labels — "dark knowledge" about similarities between classes and plausible alternatives. The student trains on teacher-generated data, often with a loss combining teacher imitation and ground-truth labels. Modern practice extends this to distilling reasoning: training students on teachers' chain-of-thought traces to transfer reasoning ability, not just answers.

When to use

  • Deploying big-model quality on limited hardware or budget.
  • Reducing latency: smaller models respond faster.
  • Creating specialized small models from a general large teacher.
  • Offline/precompute scenarios where teacher cost is one-time and student cost is per-query.

Core concepts

  • Teacher-student setup: the teacher generates training signal; the student learns from it. The teacher should be strong on the target task — distilling a weak teacher teaches weakness.
  • Soft targets: training on the teacher's output distribution, not just its top answer. Temperature softens the distribution to expose more dark knowledge.
  • Distillation data: representative of deployment inputs. Coverage matters more than volume — the student only learns what it sees the teacher do.
  • Reasoning distillation: including the teacher's reasoning traces in training data transfers problem-solving patterns, not just final answers. The current best practice for reasoning tasks.
  • Loss design: balancing imitation loss (match the teacher) with task loss (match ground truth). Pure imitation inherits teacher errors; pure task loss wastes the teacher.
  • Capacity gap: students too small can't absorb the teacher. Match student size to task complexity; sometimes a medium student beats a tiny one at similar cost.

Practical workflow

  1. Define the target behavior and build an eval set measuring it.
  2. Choose the teacher (strong on the task) and student (fits the deployment budget) sizes.
  3. Generate distillation data: diverse, representative inputs with teacher outputs (and reasoning traces for reasoning tasks).
  4. Filter teacher outputs for quality — distilling teacher mistakes teaches mistakes. Keep ground-truth labels where available.
  5. Train the student with combined imitation + task loss; tune temperature and loss weights.
  6. Evaluate student vs. teacher vs. task baseline on the eval set; check where the student still lags and target those with more data.
Distillation checklist:
[ ] Eval set for the target behavior
[ ] Teacher strong on the task; student fits budget
[ ] Distillation data covers deployment distribution
[ ] Teacher outputs quality-filtered
[ ] Loss balances imitation + ground truth
[ ] Student evaluated vs teacher; gaps analyzed

Common pitfalls

  • Distilling teacher errors: unfiltered teacher outputs bake mistakes into the student. Filter aggressively.
  • Unrepresentative data: distilling on data unlike deployment. The student learns the wrong distribution.
  • Answers without reasoning: distilling final answers only for reasoning tasks. Include traces — that's where the capability lives.
  • Student too small: expecting a tiny model to absorb complex reasoning. Respect the capacity gap.
  • No ground-truth anchoring: pure imitation with no task loss drifts from correctness. Anchor with labels where they exist.
  • Skipping the eval: assuming the student retained "most" capability. Measure it — the gap is often task-specific.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.

中文简介正在准备中。当前显示原文说明。

aicodedecode/awesome-muse-skills282026年10月10日 更新

Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.

中文简介正在准备中。当前显示原文说明。

aicodedecode/awesome-muse-skills282026年10月10日 更新

Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.

中文简介正在准备中。当前显示原文说明。

aicodedecode/awesome-muse-skills282026年10月10日 更新

Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.

中文简介正在准备中。当前显示原文说明。

aicodedecode/awesome-muse-skills282026年10月10日 更新

Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.

中文简介正在准备中。当前显示原文说明。

aicodedecode/awesome-muse-skills282026年10月10日 更新

Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.

中文简介正在准备中。当前显示原文说明。

aicodedecode/awesome-muse-skills282026年10月10日 更新

查看 aicodedecode 的全部技能

报告此技能的问题