KDFlow: A User-Friendly and Efficient Knowledge Distillation Framework for Large Language Models
Not on the map. Why?
Abstract (arXiv)
Knowledge distillation (KD) is widely used to compress and post-train large language models (LLMs), yet many existing frameworks execute teacher inference with the same training-oriented backend as student optimization, leading to suboptimal efficiency. In this paper, we propose KDFlow, a novel framework for LLM distillation that features a decoupled architecture and employs SGLang for teacher inference. KDFlow combines SGLang for teacher inference with PyTorch FSDP2 for student optimization, allowing each model to run on a backend tailored to its workload. To enable efficient full-vocabulary distillation in this decoupled architecture, KDFlow transfers the teacher's final hidden states via Ray's object store and recomputes teacher logits on each student worker using a frozen copy of the teacher's output head. Furthermore, our framework supports both off-policy and on-policy distillation and incorporates cross-tokenizer algorithms through highly extensible and user-friendly APIs. Experiments show that KDFlow achieves a 1.44× to 6.36× speedup over MS-SWIFT in off-policy distillation and a 1.43× to 1.75× speedup over verl in on-policy distillation. KDFlow further scales to 64 GPUs, achieving 3.68× and 2.52× strong-scaling speedups in two representative model configurations. The code and documentation are publicly available.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 16 of its 23 references that are in the map. First posted on arXiv 2 Mar 2026.
Builds on
16 of 23 references.
References · 16
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2024HybridFlow: A Flexible and Efficient RLHF Frameworkcited by 1,980
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,107
- 2024Length-Controlled AlpacaEval: A Simple Way to Debias Automatic Evaluatorscited by 865
- 2023On-Policy Distillation of Language Models: Learning from Self-Generated Mistakescited by 840
- 2016Sequence-Level Knowledge Distillationcited by 761
- 2017Ray: A Distributed Framework for Emerging AI Applicationscited by 516
- 2023LMSYS-Chat-1M: A Large-Scale Real-World LLM Conversation Datasetcited by 449
- 2024SWIFT:A Scalable lightWeight Infrastructure for Fine-Tuningcited by 345
- 2025Stabilizing MoE Reinforcement Learning by Aligning Training and Inference Routerscited by 67
- 2025Defeating the Training-Inference Mismatch via FP16cited by 62
4 more
- 2024Towards Cross-Tokenizer Distillation: the Universal Logit Distillation Loss for LLMscited by 61
- 2024Multi-Level Optimal Transport for Universal Cross-Tokenizer Knowledge Distillation on Language Modelscited by 35
- 2023Towards Understanding and Improving Knowledge Distillation for Neural Machine Translationcited by 10
- 2025Enhancing Cross-Tokenizer Knowledge Distillation with Contextual Dynamical Mappingcited by 10
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Uni-OPD: Unifying On-Policy Distillation with a Dual-Perspective Recipecited by 43
- 2026SimCT: Recovering Lost Supervision for Cross-Tokenizer On-Policy Distillationcited by 11
- 2026Cornerstones or Stumbling Blocks? Deciphering the Rock Tokens in On-Policy Distillationcited by 11
- 2026Self-Boosting Vision-Language Models with Noisy Student On-Policy Self-Distillationcited by 4
- 2026AsyncOPD: How Stale Can On-Policy Distillation Be?cited by 3
- 2026Self-Boosting Vision-Language Models with Noisy Student On-Policy Self-Distillation25 Jul 2026
- 2026AsyncOPD: How Stale Can On-Policy Distillation Be?23 Jun 2026
- 2026Cornerstones or Stumbling Blocks? Deciphering the Rock Tokens in On-Policy Distillation10 May 2026
- 2026SimCT: Recovering Lost Supervision for Cross-Tokenizer On-Policy Distillation8 May 2026
- 2026Uni-OPD: Unifying On-Policy Distillation with a Dual-Perspective Recipe5 May 2026