Crimson AI NewsA CrimsonLingua Network service
EN ع
← Back to news
Research paper Hugging Face

Hugging Face Study: Offline Top-K Distillation Cuts Memory, Boosts Throughput

AI By Crimson AI Hugging Face Papers 10 August 2026 · 00:00 25 views
Share: X Telegram

A new paper from Hugging Face shows that caching teacher logits and using a chunked KL loss can make knowledge distillation for small LLMs up to 41% faster and support 4x longer contexts on a single GPU.

Hugging Face Study: Offline Top-K Distillation Cuts Memory, Boosts Throughput

Key points

Knowledge distillation is the standard way to compress large open LLMs into smaller, deployable models, but it is often expensive because the teacher and student must be loaded together and the teacher's full-vocabulary outputs recomputed at every step. A new paper from Hugging Face, titled "Efficient Knowledge Distillation for LLMs: Offline Top-K Logits and a Fused Chunked KL Loss," presents two systems-level contributions that make distillation training significantly more efficient.

The first contribution is offline distillation: caching the teacher's top-K logits once and training the student against that cache. This removes the teacher from memory during training, runs about 29% faster per iteration, and achieves up to 41% higher throughput on a single H200 GPU, all while matching the training loss of online distillation.

The second contribution is a fused, chunked KL loss that never materializes the full vocabulary-sized logit tensor. By processing the sequence in slices, peak memory becomes linear in sequence length, eliminating the memory spike that caps context length. This enables training at four times the context length (32,768 tokens) on a single GPU. The authors also release their implementation at https://github.com/CompactifAI/Full-Chunked-KL-Loss.

The paper includes supporting ablations on loss design and sequence packing, and notes that for both offline and online KD, logits should be computed on data that is in-distribution for the teacher—ideally the teacher's original training data or synthetic data generated by the teacher. The authors also mention that their current loss assumes shared vocabulary between teacher and student, and they are interested in exploring cross-family distillation in the future.

MetricOffline KD (cached top-K)Online KD (baseline)
Training lossNear-identicalBaseline
Iteration speed~29% fasterBaseline
Throughput (single H200)Up to 41% higherBaseline
Peak memory~50% lowerBaseline
Max context length (single GPU)32,768 tokens (4x)8,192 tokens (typical)
Speedup at larger scaleUp to 5xBaseline
Source
Hugging Face · Hugging Face Papers
Related news
Research paper
Hugging Face 15 Oct 2026

New Survey Maps How Multimodal AI Agents Remember and Evolve

A Hugging Face survey proposes a two-axis framework for multimodal agent memory, separating how information is formed and represen...

11
Research paper
Hugging Face 15 Oct 2026

CriticOPD Fixes On-Policy Distillation by Letting Teachers Critique Student Errors

Hugging Face researchers introduce CriticOPD, a method that restores the teacher's ability to recover from student mistakes during...

11
Research paper
Hugging Face 15 Oct 2026

ActionOPD: Distilling Agent Decisions, Not Tokens

A new Hugging Face paper proposes ActionOPD, an action-level on-policy distillation method that aligns a student agent's decisions...

11