Skip to content
Preprint

Efficient Knowledge Distillation for LLMs: Offline Top-K Logits and a Fused Chunked KL Loss

Aug 2026 · 0 citations · 18 references
Computer Science

TL;DR

A practitioner's study of how to make distillation training efficient is presented, organised around two systems contributions, and a fused, chunked KL loss is introduced, making peak memory linear in the sequence length.

Abstract

Small language models are often the only option for deployment under tight latency, cost, and on-premises constraints, but they are rarely trained from scratch: a compressed model is usually recovered through knowledge distillation (KD). This recovery step largely decides the final quality, yet it is expensive. We present a practitioner's study of how to make distillation training efficient, organised around two systems contributions. First, we show that offline KD (caching the teacher's top-$K$ logits once and training the student against the cache) matches online distillation at near-identical training loss while removing the teacher from memory, running about 29\% faster per iteration, and reaching up to 41\% higher throughput on a single H200 GPU. Second, we introduce a \emph{fused, chunked KL loss} that never materialises the full vocabulary-sized logit tensor, making peak memory linear in the sequence length. This removes the memory spike that otherwise caps context length and lets us train at four times the context (32{,}768 tokens) on a single GPU. A separate output-head-only toy benchmark isolates the loss kernel and confirms its memory and iteration-rate scaling from 4K to 256K tokens. Together these make large-scale healing and hundreds of ablations affordable. We also report supporting ablations on loss design and sequence packing. We release our chunked-loss implementation: https://github.com/CompactifAI/Full-Chunked-KL-Loss.

View source

Similar papers

Jul 2026

REPREC: Representation Driven Parameter-Efficient Recommendation System

REPREC is a lightweight framework that conditions a frozen LLM using compact user-level representations and consistently improves recommendation performance across different sequential encoders, LLM backbones, and user activity levels.

Harshini Kavuru, Dwipam Katariya, Giri Iyengar et al. · 0 citations
Jul 2026

Distilling large language models for code generation via ranking supervision.

This work proposes a distillation approach based on ranking supervision that consistently outperforms supervised fine-tuning as well as FKL and RKL baselines in Python code generation, multilingual generation, and data-science scenarios and offers guidance for future research in model compression.

Zhe Ding, Hui Ji, Su Pan et al. · 0 citations
Jul 2026

Score-Only Distillation for Compact Dense Retrieval

Externally-transfer performance after distillation remains mixed, so the evidence supports compression of teacher rankings under matched retrieval protocols.

K. Dubovikov, Martin Takác, S. Lahlou · 0 citations
Preprint Aug 2026

Giga-Embeddings: Mixture-of-Experts Encoders for High-Throughput Text Embeddings

This work introduces Giga-Embeddings, a family of text embedding models designed to combine strong retrieval quality with efficient serving, and trains the compact model using a dimension-agnostic objective that aligns teacher and student similarity distributions.

Egor Kolodin, Egor Krasnoperov, Evgeniy Kosarev et al. · 0 citations
Preprint Aug 2026

Tail-Aware Top-$k$ On-Policy Distillation

Tail-Aware Top-$k$ OPD is proposed, a novel distillation method that restores the missing tail probability signal and better aligns the student's next-token distribution with the teacher's, preventing the increase in tail probability and entropy caused by top-$k$ normalization.

Huipeng Huang, Hong-Xin Wei · 5 citations · ⚡1
Jul 2026

When Does Knowledge Distillation Hurt? Reliability-Aware Distillation for Low-Resource Language Summarization

The stronger method is evaluated across 15 typologically diverse XL-Sum languages organised into three sets, beating the CE-only baseline on 10/15 languages; gains are most reliable where the two teachers contribute complementary signal, and weakest where they have saturated or jointly weak target-language coverage.

Dipto Sumit, Ankan Kumar Roy Srizon, Sadia Khair Rodela et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.