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 9 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 31 Aug 2026

Hugging Face Unveils StepGuard: Step-Level Guardrails for Safer AI Agents

StepGuard, a new step-level guard model from Hugging Face, audits agent actions before execution, reducing attack success rates by...

1
Research paper
Hugging Face 31 Aug 2026

Hugging Face Researchers Unveil ABot-Recon for Stable Long-Horizon 3D Reconstruction

ABot-Recon, a new streaming 3D reconstruction model from Hugging Face, achieves stable long-horizon performance using only local t...

1
Research paper
Hugging Face 31 Aug 2026

ContextPilot: Teaching Agents Proactive Context Management via Fine-Grained RL

Hugging Face researchers introduce ContextPilot, a framework that enhances long-horizon agent reasoning by expanding context-editi...

1