用生成式评估发现蒸馏模型质量被困惑度低估,提出高效混合模型蒸馏新方法
When Perplexity Lies: Generation-Focused Distillation of Hybrid Sequence Models
- 设计多阶段蒸馏流程GenDistill,联合优化学生模型架构与训练策略
- 在自回归生成任务中,蒸馏模型比教师低20.8困惑度,而困惑度评估仅差0.2
- 选对数据集、掩码方式和冻结注意力层,可提升生成质量并减少75%显存
通过蒸馏将预训练Transformer转化为更高效的混合模型,是降低推理成本的有前景路径。然而,高质量生成需精心设计学生架构与蒸馏过程。现有许多工作仅用对答案的对数似然排序来评估下游多选任务,忽略了自回归生成的关键差异。例如,在重叠基准上,一个7B的蒸馏模型在对数似然评分下仅落后教师0.2困惑度,但在自回归生成时却落后20.8困惑度。我们提出GenDistill,用于将预训练Transformer蒸馏为高效Hybrid-KDA学生模型。以Qwen3-0.6B为测试平台,系统消融六个设计维度(训练目标、损失掩码、训练时长、数据集选择、参数冻结、架构选择),并在对数似然与生成式协议下评估每项选择。结果表明,基于对数似然的评估会持续低估师生差距,甚至颠倒设计选择排名,结论可能误导。其中,数据集选择、仅完成掩码和后训练中冻结注意力层对生成质量影响最大。最佳蒸馏方案使用Hybrid-KDA学生,在知识类基准上保留教师86-90%准确率,同时使KV缓存内存减少75%,128K上下文下的首次词生成时间提升2-4倍。
原文摘要 · Abstract (English)
Converting a pretrained Transformer into a more efficient hybrid model through distillation offers a promising approach to reducing inference costs. However, achieving high-quality generation in distilled models requires careful joint design of both the student architecture and the distillation process. Many prior distillation works evaluate downstream multiple-choice benchmarks by ranking candidate answers with log-likelihood rather than requiring autoregressive generation, which can obscure important differences in model quality. For example, on overlapping benchmarks, we show that a 7B distilled model that nearly matches its teacher to within 0.2 pp under log-likelihood scoring falls behind by 20.8 pp when it must generate answers autoregressively. We investigate this phenomenon with GenDistill, a multi-stage pipeline we designed for distilling a pretrained Transformer into an efficient Hybrid Kimi Delta Attention (Hybrid-KDA) student. Using it as a controlled testbed on Qwen3-0.6B, we systematically ablate six design axes (training objective, loss masking, training duration, dataset selection, parameter freezing, and architecture choice) and evaluate every choice under both log-likelihood and generation-based protocols. We find that log-likelihood-based evaluation consistently underestimates the gap between teacher and student, and can in some cases reverse the ranking of design choices, so conclusions drawn from perplexity-only evaluation may be misleading. Among the factors we study, dataset selection, completion-only masking, and freezing attention layers during post-training have the largest impact on generation quality. Our best distillation recipe, using a Hybrid-KDA model as the student, retains 86-90% of teacher accuracy on knowledge benchmarks while reducing KV cache memory by up to 75% and improving time-to-first-token by 2-4x at 128K-token contexts.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。