混合硬软标签可更好压缩大模型,降低生成偏差。
The Bridge-Garden Dilemma in LLM Distillation: Why Mixing Hard and Soft Labels Works

- 按生成阶段动态混合硬标签与软标签,分场景优化。
- 在7组模型对上优于基线,训练成本降9.7倍。
- 适合需要高效压缩大模型的开发者使用。
知识蒸馏(KD)将大模型知识迁移到小模型。在语言建模中,学生模型可基于教师模型采样的词元(硬标签)或完整下一词分布(软标签)进行训练。尽管软标签信息更丰富,但混合使用硬软标签始终表现更优。关键发现是:这种提升并非源于训练中更贴近教师模型,而是减少了训练与推理分布之间的暴露偏差。为此,我们提出桥园分解理论,将生成步骤分为两类:桥(必须精确预测下一词)和园(允许灵活选择)。纯硬标签在桥上表现优异,避免了风险偏离;纯软标签在园中保持多样性。混合策略同时应对两类场景,从而降低序列整体暴露偏差。基于此理论,我们设计了一类自适应平衡硬软标签的桥园混合监督方法。在包括Qwen、Llama、Gemma和DeepSeek在内的7组师生模型对上,该方法在推理与编码任务中均超越基于发散性和在线策略的基线,训练成本降低9.7倍,实现高效模型压缩。代码已开源。
原文摘要 · Abstract (English)
Knowledge distillation (KD) transfers knowledge from a large teacher model to a smaller student. In language modeling, the student is trained either on tokens sampled from the teacher (hard labels) or the teacher's full next-token distribution (soft labels). Despite soft labels appear strictly richer, we find that mixing hard and soft labels consistently yields better results. Crucially, we show that this gain cannot be explained by closer teacher matching during training. Instead, it comes from reduced exposure bias, the mismatch between training and inference distributions. To explain this phenomenon, we introduce the Bridge-Garden Decomposition theory, which categorizes generation steps into two types: Bridges, where the next token must be exact, and Gardens, where it can be flexible. We show that hard-only KD excels in Bridges by avoiding risky deviations, while soft-only KD preserves diversity in Gardens. A hybrid strategy handles both cases and, as a result, reduces exposure bias across the sequence. Guided by this theory, we develop a family of Bridge-Garden hybrid supervision methods that adaptively balance hard and soft labels. Across a primary suite of seven teacher-student pairs (including Qwen, Llama, Gemma, and DeepSeek) and benchmarks in reasoning and coding, our approach outperforms divergence-based and on-policy KD baselines while reducing training cost by 9.7x, enabling efficient model compression. Code is available at https://github.com/ghwang-s/bridge_garden_hybrid_kd_release.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。