AIToday
Large Language ModelsOpen-Source AIHugging Face BlogPublished: Aug 10, 2026, 22:00 JST

Knowledge distillation made cheap enough for single GPU

Knowledge distillation made cheap enough for single GPU

3 Key Points

  1. What happened

    Researchers at Multiverse Computing published a paper describing two systems changes—caching a teacher model's top-100 logits and using a fused, chunked KL-divergence loss—that reduce peak VRAM use from roughly 250GB to 128GB or less, allowing long-context knowledge distillation to run on a single H200 GPU instead of hundreds.

  2. Why it matters

    Knowledge distillation (training a smaller model to match a larger one's performance) is standard practice for deploying expensive large language models—like Kimi-K3, which has 2.8 trillion parameters and requires 3TB of VRAM—but the distillation step itself has been the most memory-intensive bottleneck. These optimizations make large-scale experimentation practical and affordable for teams, not just a one-off exercise for well-funded labs.

  3. What to watch

    The code for the chunked-loss implementation is open-sourced at github.com/CompactifAI/Full-Chunked-KL-Loss. At 32K token context, the method shrinks a distillation setup from four GPU nodes down to one and speeds up step time from 57.0 to 12.23 seconds; at 256K tokens, memory use drops to 11.6 GiB versus 134.2 GiB for the next-best approach. A 3.2B student distilled from Llama 3.1 8B Instruct retains most teacher accuracy on BoolQ and HellaSwag, within about nine points on MMLU.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

Knowledge distillation has become the standard way to compress large language models for deployment, but the process itself has remained prohibitively expensive. The distillation step traditionally requires keeping both the teacher model (which can have trillions of parameters) and the student model in memory simultaneously, computing a probability distribution over the entire vocabulary for every token position in the sequence. For models like gpt-oss-120b with a 201,088-token vocabulary at 32K sequence length and batch size 4, this creates a single teacher-probability tensor of roughly 50GB, and a total training iteration that can spike to 250GB of VRAM—more than even the largest single GPUs can hold. This has meant distillation campaigns could only be run at scale with specialized infrastructure: hundreds of GPUs, careful tensor-parallelism strategies, and significant engineering overhead.

The two optimizations address this directly. First, offline distillation eliminates the need to recompute the teacher at every training step; instead, the teacher's top-100 most likely tokens per position are cached once, and the student trains against that cache. This removes the teacher from memory entirely during training and eliminates redundant computation. Second, the fused chunked KL loss avoids ever materializing the full vocabulary-size × sequence-length matrix; instead of building the entire comparison grid before computing the loss, it processes the sequence in chunks, computing each chunk end-to-end and discarding it before moving to the next, recomputing during backpropagation as needed. Together, these changes reduce peak memory consumption from 250GB to 128GB or less in the original example, and achieve far more dramatic reductions at longer context lengths—at 256K tokens, memory use drops to 11.6 GiB versus 134.2 GiB for the next-best method.

FAQ
How much does this reduce memory usage?
At 32K token context, peak VRAM falls from 85.2 GiB with the dense loss to 5.45 GiB with the fully chunked version—a 15.6× reduction. At 256K tokens, memory drops to 11.6 GiB compared to 134.2 GiB for the next-best variant.
What does the smaller student model lose in performance?
A 3.2B student distilled from Llama 3.1 8B Instruct retains most of the teacher's accuracy on BoolQ and HellaSwag, and stays within about nine points of it on MMLU, at less than half the parameter count.
How much faster does training become?
When distilling a GPT-OSS 20B model at 32,768-token context, step time fell from 57.0 to 12.23 seconds (about 5× faster), and throughput per GPU rose from 74.2 to 345.7 TFLOP/s.
Hugging Face BlogRead Original Article

Get the latest Large Language Models news every morning

For example, today's edition would include:

  • OpenAI, Anthropic probe tens of thousands of AI incidentsTHE DECODER · 54m ago
  • Microsoft folds Word, Excel, PowerPoint into CopilotYahoo Finance AI · 3h ago
  • Google tests Flipkart checkout inside Gemini, AI ModeTechCrunch AI · 6h ago

AI-summarized, only the topics you pick: one digest a day via Email, LINE, or Slack.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleTSMC July revenue hits record $14.5B, 2026 growth forecast exceeds 40%