Making Knowledge Distillation Cheap Enough to Run at Scale
New research introduces two system changes—offline top-K logits caching and a fused chunked KL loss—to significantly reduce the memory and computational cost of knowledge distillation for large language models.
Intelligence analysis by Gemini 2.5 Flash

The high VRAM demands of knowledge distillation, a technique used to compress large language models into smaller, more efficient versions, have historically limited its scalability. This paper proposes novel methods that drastically cut these costs, making large-scale experimentation and deployment of compressed LLMs more practical and accessible.
Imagine you have a super-smart robot (a big AI model) and you want to teach a smaller, faster robot to be just as smart. Normally, both robots need to be in the same room, which takes up a lot of space and energy. This new trick is like having the big robot write down its best ideas on a small notepad (only the most important ones) and then leaving. The smaller robot can then learn from the notepad without the big robot taking up space. Plus, the smaller robot learns in tiny pieces instead of trying to remember everything at once, making it much cheaper and easier to train.
Analysis
Knowledge distillation is a cornerstone technique in machine learning, enabling smaller 'student' models to emulate the performance of larger 'teacher' models. This process is particularly vital for Large Language Models (LLMs), where models like Kimi-K3 can boast trillions of parameters, demanding prohibitive amounts of VRAM for deployment. The core challenge lies in the distillation step itself, which traditionally requires both teacher and student models to reside in memory simultaneously, generating full probability distributions over vast vocabularies for every token. This setup can easily consume hundreds of gigabytes of VRAM, pushing beyond the capabilities of even high-end GPUs like the H200 or B200.
Offline Top-K Logits
The first significant innovation presented is the concept of offline distillation, specifically by caching the teacher's top-K logits. Instead of requiring the teacher model to perform a full forward pass at every training step, its output—specifically the top 100 most likely tokens per position—is computed and cached just once. This strategic shift means the teacher model never needs to be loaded into memory alongside the student during training, leading to substantial VRAM savings. Furthermore, this cached data can be reused across multiple experimental runs, drastically reducing the computational overhead for iterative research and ablation studies.
This approach fundamentally alters the resource allocation during distillation. By decoupling the teacher's presence from the student's training loop, it frees up critical memory that would otherwise be duplicated. The ability to reuse the cached logits also accelerates the experimental cycle, allowing researchers to test various student architectures or training parameters without incurring the full cost of teacher inference repeatedly. This makes the entire distillation pipeline more agile and cost-effective, particularly for organizations with limited access to vast GPU clusters.
Fused Chunked KL
The second major contribution addresses the memory intensity of the Kullback-Leibler (KL) divergence loss itself. Traditional KL loss computation, especially with large vocabularies and long sequence lengths, involves constructing enormous grids representing the student's and teacher's probability distributions. For a model like gpt-oss-120b with a vocabulary of over 200,000 tokens and a sequence length of 32,000, these tensors can consume 50GB of VRAM for a single probability distribution, leading to peak VRAM usage of around 250GB per training iteration when combined with gradients and model states.
The 'fused chunked KL' loss is designed to circumvent this memory bottleneck. Unlike the 'dense KL' or 'forward-chunked KL' methods, which still materialize large parts of the student's output logits, the fused chunked KL integrates the model's output projection directly into the loss computation. It processes the sequence in small chunks, projecting hidden states to logits for only that chunk, immediately folding the result into the running loss, and then discarding the chunk before moving to the next. This prevents the full vocabulary × sequence length grid from ever being formed in memory, dramatically reducing VRAM requirements and enabling distillation on much more modest hardware configurations.
gpt-oss-120b
The practical implications of these innovations are best understood through concrete examples, such as the gpt-oss-120b model. This model, with its immense vocabulary of 201,088 tokens, exemplifies the memory challenges faced in LLM distillation. A single training iteration for such a model, using a sequence length of 32K and batch size 4, could demand approximately 250GB of VRAM with standard online distillation methods. This figure far exceeds the capacity of even advanced GPUs like the H200, which offers 141GB, or the B200.
The new techniques directly address this scale problem. By implementing offline top-K logits and the fused chunked KL loss, the peak VRAM usage for such a scenario can be reduced to about 128GB, as demonstrated in the paper. This reduction is transformative, making it feasible to perform long-context healing—a critical aspect of improving LLM performance—on a single GPU. It also makes large-scale experimentation, which was previously limited to organizations with massive computational resources, practical and affordable for a broader range of researchers and developers, thereby democratizing access to advanced LLM development.
Key points
- Knowledge distillation for LLMs is expensive due to high VRAM requirements for teacher and student models.
- The new approach introduces offline top-K logits caching, eliminating the need for the teacher model to be in memory during student training.
- A fused, chunked KL loss processes data in segments, avoiding the creation of large, memory-intensive probability grids.
- These two system changes reduce VRAM usage from approximately 250GB to 128GB for a single training iteration.
- The innovations make long-context healing possible on a single GPU and large-scale experimentation more practical and affordable.
These advancements promise to significantly lower the cost and resource requirements for training and deploying large language models, making advanced AI more accessible to a wider range of researchers and businesses. This could accelerate innovation in LLM development, leading to more efficient and powerful AI applications.
While these methods improve efficiency, the absolute cost of training and distilling extremely large models may still remain substantial, potentially limiting their adoption to well-funded entities. Furthermore, the complexity of implementing these new system changes might pose a barrier for some developers, despite the potential benefits.



