arXiv:2608.21570cs.AIcs.LG2026-08

用知识蒸馏打造可在普通CPU运行的安全分类模型。

A Reproducible, License-Aware Distillation Recipe for CPUDeployable Safety Classification

  • 用开源大模型标注9.7万条提示,训练小模型复现安全分类信号。
  • 最小生成模型在无害提示上误报率仅3.8%,优于80亿参数教师模型的4.8%。
  • 方案可复现且考虑许可证限制,适合部署在资源受限的硬件上。

在通用硬件上部署大型语言模型的安全层面临诸多限制:现有开源安全模型参数量在10亿至90亿之间,专为图形处理器设计,单次请求在中央处理器上需数秒响应。本文提出一种可复现、考虑许可证的知识蒸馏方法,解决此问题。使用一个强开源安全模型对约9.7万条提示(来自24个公开数据集)进行标注,涵盖七类与公开危害分类体系对齐的安全类别。训练一系列小型学生模型(涵盖词法、浅层、编码器和生成式架构),使其复现该分类信号。数据集按许可证边界划分,使可部署模型与研究模型仅在训练数据上差异,从而可量化许可限制的成本。所有模型在独立的6,361行黄金基准上评估,包含四个子集,其中包含无害提示子集以衡量过度防御。蒸馏后的学生模型在对抗性文本上的表现与教师模型在重叠置信区间内相当,并显著降低对无害提示的误报率;最小生成模型误报率为3.8%,低于80亿参数教师模型的4.8%。编码器类模型在CPU上每请求耗时约24毫秒。唯一关键改进是每类样本的再平衡策略。不声称蒸馏模型超越教师模型;在干净参考子集上,教师模型仍占优。

原文摘要 · Abstract (English)

Deploying a safety layer for large language models on commodity hardware is constrained by the guards available to do it: current open guard models hold between 1 and 9 billion parameters, are oriented toward the graphics processing unit, and answer in seconds per request on a central processing unit. This paper presents a reproducible, license-aware knowledge-distillation recipe addressing that constraint. A strong open guard labels a corpus of roughly 97,000 prompts, drawn from 24 public datasets, into seven safety categories aligned to a public hazard taxonomy, and a fleet of small students spanning lexical, shallow, encoder and generative architectures is trained to reproduce that signal. The corpus is partitioned at the license boundary, so that a deployable and a research model differ only in their training data and the cost of that restriction becomes measurable. Every model is scored against an independent gold benchmark of 6,361 rows over four slices, labeled apart from the teacher and including a slice of harmless prompts that makes over-defense measurable. The distilled students match the teachers on adversarial text within overlapping confidence intervals and reduce false alarms on harmless prompts, the smallest generative student reaching 3.8% against 4.8% for the 8-billion-parameter teacher, while the encoder classifies in roughly 24 ms per request on CPU. Per-class rebalancing is the only decisive ingredient of the recipe. No superiority over the distilled guards is claimed; on the clean reference slice they remain ahead.

安全分类知识蒸馏轻量化部署CPU优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。