DisaggKD:通过师生解聚与融合损失实现高效知识蒸馏

·

研究论文 · 2026/10/20

知识蒸馏框架通常将教师和学生模型放在同一GPU上,因此每GPU内存限制了可容纳的教师模型。DisaggKD将二者分离到不同节点:教师副本将隐藏状态流式传输给学生,基于行窗口和词汇分片的KD损失在精确算术下等于全词汇损失,且无需形成全词汇logits,预取环调节生产者和训练者的节奏。闭式内存和流量模型定位了每种布局的内存限制。在Qwen3.5-35B-A3B到9B的模型对上,分离布局在相同损失下匹配共置运行的LM损失,且速度更快;融合损失还允许共置运行以更少节点更快训练,而当学生跨多个节点时,分离布局内存高效。在更大的模型对上,使用融合损失的共置运行仍会OOM,而分离布局可以训练,因为教师权重和学生状态填满了预算。

DisaggKD通过解耦教师和学生模型,解决了知识蒸馏中的内存瓶颈问题,并在多个模型对上验证了其高效性,为大规模知识蒸馏提供了可行的分布式方案。

Knowledge distillation (KD) frameworks place teacher and student on the same GPUs, so per-GPU memory limits the teachers that fit. DisaggKD separates them across nodes: teacher replicas stream hidden states to the student, a KD loss over row windows and vocabulary shards equals the full-vocabulary loss in exact arithmetic without forming the full-vocabulary logits, and a prefetch ring paces producer and trainer. Closed-form memory and traffic models locate the memory limits of each layout. On the Qwen3.5-35B-A3B to 9B pair, the disaggregated layout matches the LM loss of the colocated run with the same loss and is faster than that run; our fused loss also lets a colocated run train on as few nodes at faster speed, while the split is memory efficient when the student spans several nodes. On the larger pairs, colocated runs with a fused loss still run OOM where the split trains, because teacher weights and student states fill the budget.

阅读原文

参与讨论