
如何合法蒸馏开源模型:逐步指南
使用许可宽松的开源教师模型、你自己的领域数据和清晰的法律路径进行模型蒸馏的实用指南。
Anthropic/DeepSeek 事件展示了蒸馏出错时会发生什么:24,000 个账户被封禁。但技术本身是合理的——问题在于来源,而非方法。
合法 vs. 非 法蒸馏
合法蒸馏: 使用许可宽松的开源模型作为教师。许可证授予你创建衍生作品的权利。
非法蒸馏(或违反 ToS): 违反服务条款使用闭源 API 模型作为教师。
第 1 步:选择开源教师模型
| 模型 | 许可证 | 蒸馏允许 | 商业使用 |
|---|---|---|---|
| Llama 3 | Meta Community | 是 | 是(7 亿 MAU 以下) |
| Qwen 2.5 | Apache 2.0 | 是 | 是 |
| DeepSeek-R1 | MIT | 是 | 是 |
| Gemma 2 | Gemma Terms | 是 | 是 |
第 2 步:设置教师
本地部署、云 GPU 租赁或开源 API 提供商。
第 3 步:从你的领域生成合成训练数据
使用教师处理你的领域特定内容。目标数据集:500-5,000 个示例。
第 4 步:准备数据集
JSONL 格式。质量过滤:去重、移除矛盾、验证格式一致性。
第 5 步:微调学生模型
教师 70B → 学生 7B-14B 是生产部署的最佳选择。LoRA/QLoRA 使之实用。
第 6 步:评估学生 vs. 教师
目标:分类和提取任务 90-95% 准确率,生成任务在教师质量的 5-10% 以内。
第 7 步:导出到 GGUF 并部署
ollama create my-model -f Modelfile
ollama run my-model
你的模型现在在本地运行。没有 API 调用。没有每 token 成本。没有能弃用它的供应商。
正确的方法:开源教师 + 你的领域数据 + 合法微调 + GGUF 导出 + 完全所有权。
Ship AI that runs on your users' devices.
Early bird pricing starts at $14.50/mo — locked in for life. Plans for builders and agencies.
Keep reading

Distilling Claude/GPT into a 7B Model for Production: Step-by-Step
A step-by-step tutorial for distilling the capabilities of Claude or GPT-4o into a 7B parameter model for local production deployment — from dataset generation through fine-tuning to GGUF export.

Model Distillation Is Not Theft — But Here's Why You Should Do It Yourself
Model distillation is a legitimate ML technique — every major lab does it. The DeepSeek incident was a contractual violation, not theft. Here's why fine-tuning open-source models on your own data is the ethical, legal, and strategically sound path.

AI Model IP and Distillation: What the Law Actually Says in 2026
Copyright probably doesn't protect AI model outputs. Anti-distillation ToS clauses are the real enforcement mechanism — but their limits are being tested. Here's the full legal landscape for AI model IP in 2026.