Manuscript Offprint

arXiv:2610.17644

DisaggKD: Efficient Knowledge Distillation through Teacher-Student Disaggregation and a Fused Loss

Ruixuan Tu, Yuyang Dong

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.

Abstract

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. Code will be released upon acceptance.

1 Introduction

Knowledge distillation (KD) trains a student on its teacher’s output distribution (Hinton et al., 2015), and at pretraining scale SlimQwen uses it to recover the quality of compressed students (Tang et al., 2026).

The 3 open frameworks we ran place the teacher on the student’s GPUs, keeping its weights beside the student’s weights, gradients, and optimizer state (NVIDIA, 2025a, 2024–2026) or offloading it between phases (NeMo RL, 2025; Zhang et al., 2026), as KDFlow optionally does. Colocated, the 2 models share 1 per-GPU memory budget, and the KD loss adds a logits tensor over the full vocabulary for every token the student processes. That budget is the limit: with ModelOpt’s loss the colocated stack on the Qwen3.5 pair at 3 nodes runs out of memory (OOM) where the separated one fits (Figure 1), and our fused loss moves it but not the weights of larger teachers (Table 3).

We separate the 2 roles: the teacher runs forward-only on its own nodes, so no GPU holds the layers of both models. The teacher sends its final hidden states, which are narrower than its vocabulary-wide logits, and the student recovers the logits with a copy of the teacher's output head. A fused kernel then evaluates the KD loss over vocabulary shards from per-row statistics that combine across tensor-parallel (TP) ranks, without forming a full-vocabulary tensor, so trainer memory stays low.

Whether the split pays depends on per-GPU memory and on NVLink and InfiniBand traffic, so we derive closed-form estimates of both.

Our contributions are:

• Estimation models ( §3§3) of per-GPU memory ( §3.1§3.1) and of traffic inside the student, inside the teacher, and between them ( §3.2§3.2), for both layouts ( §3.3§3.3); the memory model is fitted on measured peaks and OOM events, the traffic model checked against node counters (Appendices A.1, A.2).

• A disaggregated KD algorithm, DisaggKD ( §4§4): teacher replicas stream hidden states over NVIDIA Collective Communications Library (NCCL) point-to-point (P2P) links ( §4.1§4.1), the student evaluates a fused loss over row windows and vocabulary shards, equal to the full-vocabulary loss in exact arithmetic ( §4.2§4.2, Appendix B.3), and a prefetch ring paces both ( §4.3§4.3).

• A measured evaluation ( §5§5). On the Qwen3.5 pair the language-modeling (LM) losses of the 2 layouts match, the disaggregated run is faster than the colocated runs with ModelOpt’s loss balancer and with the same loss, and a colocated run with our fused loss is as fast or faster on

*Work was done during the internship at SB Intuitions Corp.

Figure

Figure 1: Per-GPU memory of the Qwen3.5-35B-A3B to 9B pair on 3 nodes: bars stack student states S, activations and buffers A, teacher weights, logits buffers (colocated) or the memory κ\kappa retained by the streamed loss (trainer), and other memory; diamonds are measured peaks (ModelOpt bar: allocated plus requested bytes at the OOM error). The first colocated bar (ModelOpt's loss) is the model's demand; the fused-W bar (Table 3; fused loss, model cross-entropy fusion off) splits a measured peak, with κ\kappa the remainder. Trainer and producer nodes hold separate stacks and exchange hidden-state slots Ht(q)H_t^{(q)} over NCCL P2P.

as few nodes but holds more memory per GPU when the student spans several nodes ( §5.2§5.2); on 3 larger pairs the disaggregated layout trains where the colocated stack runs OOM, also with a fused loss, and is faster on Llama.

References (61)