Loading…
Topic
Distillation
9 posts about Distillation. Every summary links to the original.
- 9 posts
- 6 companies
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
Newest first
Posts
Toward sample-efficient agentic post-training
Standard reinforcement learning for agentic post-training assigns the same final reward to every action in a rollout, making it hard to distinguish helpful steps from harmful ones. Generating more rollouts to improve credit assignment is expensive. The post presents seven methods that extract per-step or per-token credit from existing rollouts. These methods include merging equivalent steps across attempts, passing credit from successful revisions back to earlier failed attempts, and reweighting distillation signals by their estimated effect on reward. The methods are demonstrated on a running example where an agent writes a function to return the nth prime. The post extracts five lessons from the results, showing how different types of information from rollouts can be turned into training signals tied to task success.
Distilling Kimi-K3.1-Pro into Qwen3.8-27B: Teaching a model a new language
Qwen3.8-27B, a popular small language model, cannot write Lao and instead answers in Thai when asked for Lao, scoring 5.5 chrF++ on the FLORES-200 test set. The authors used Kimi-K3.1-Pro as a teacher and distilled its Lao translation ability into Qwen3.8-27B via off-policy distillation with Together Post-Training. After training on about 3,800 of Kimi-K3.1-Pro’s translations, the student scored 44.3 chrF++, reaching 93% of the teacher’s score, and wrote Lao on every test sentence. Adding about 1,000 Kimi-K3.1-Pro Thai translations to the training data prevented regression in Thai, which had collapsed in earlier runs. All experiments together cost $260, and the code and settings are available in the post-training cookbook.
Learning from explanations
The post investigates whether training a risk assessment model on explanations, in addition to labels, improves decision performance. Standard supervised fine-tuning (SFT) on both labels and explanations together degrades performance because the loss is dominated by the longer explanation tokens. The authors propose two-stage SFT: first train on labels and explanations (knowledge distillation), then train on labels alone (decision calibration), with the label placed before the explanation to avoid conditioning on generated reasoning. This approach achieves 39% higher recall at human-review precision on fraud review compared to label-only SFT, and the gains scale with the amount of explanation data across multiple risk assessment tasks. On-policy distillation (OPD) is used to restore explanation quality lost during the second stage, while preserving the decision gains, by having the student generate responses and the frozen teacher score each token to provide a token-level reward.
Attention to Mamba: A Recipe for Cross-Architecture Distillation
State Space Models like Mamba offer lower memory and higher throughput than Transformers, but naive cross-architecture distillation from Transformers to Mamba fails to preserve teacher performance. The authors propose a principled two-stage distillation recipe: first distill a Transformer into a linearized Attention model via a kernel trick, then distill that into a Mamba model without any Attention blocks. The distilled Mamba model reaches a perplexity of 14.01, close to the teacher Pythia-1B Transformer’s 13.86. This performance largely carries over to downstream tasks, though gaps appear on tasks relying on in-context recall. The recipe is validated through ablations at 1B scale with 10B tokens, scaling analysis on model sizes and total distillation tokens, and sensitivity analysis on token allocation between stages.
LEAF: Distillation of State‑of‑the‑Art Text Embedding Models
MongoDB Research introduced LEAF, a knowledge distillation framework that trains compact text embedding models to approximate a larger teacher’s embedding space. Unlike earlier methods that align attention matrices or hidden states across layers, LEAF aligns only the teacher and student output embeddings using an L2 loss. The resulting students are interoperable with their teachers, enabling asymmetric retrieval where documents use a larger model and queries use a fast local model. Two 23M-parameter Apache 2.0 models were released: mdbr-leaf-ir for retrieval and RAG, and mdbr-leaf-mt for classification, clustering, sentence similarity, and summarization. LEAF retains up to 97% of teacher performance while being 5×–15× smaller and 7×–24× faster; mdbr-leaf-ir ranks first on BEIR and RTEB for models up to 100M parameters, and mdbr-leaf-mt ranks first on MTEB v2 English for models up to 30M.
Speeding up language models for travel applications
Travel platforms like Booking.com use LLMs for AI Trip Planner, Smart Filters, and accommodation description generation, but models with tens of billions of parameters introduce latency and cost challenges at scale. The authors combined knowledge distillation (KD) with Medusa: KD trains a 1.1-billion-parameter TinyLlama student to mimic a 70-billion-parameter Llama-3.1 teacher, closing over 90% of the quality gap, while Medusa adds prediction heads for parallel token decoding, yielding a 2-3.6x speedup. The unified pipeline produced a model matching the teacher’s quality while running 10-20 times faster and costing less than one-third. For Smart Filters, 99% of queries responded 15 times faster; AI Trip Planner saw 2.9% more engagement than GPT-3.5; and accommodation descriptions got 1.4% more helpful ratings. The approach was presented at ACL and won the Industry Track best-paper award.
Strengthening our defenses against distillation attacks
Distillation attacks are covert campaigns to extract capabilities from frontier models like Claude and replicate them in unauthorized models, often using fraudulent account networks that control hundreds of thousands of accounts. These attacks enable companies to mimic frontier capabilities at reduced cost, raising concerns about inadequate safeguards and national security risks when capabilities are integrated into foreign military and surveillance systems, as seen with GLM-5.3. Anthropic developed three defenses: preserved thinking restricting access to reasoning, a two-stage classifier blocking extraction attempts, and stricter enforcement banning accounts often within two hours. After implementation, the reasoning tokens distillers could extract fell by 10 to 100 times, and tens of thousands of accounts were banned. Anthropic acknowledges trade-offs including required integration updates and a less than 0.1% false positive rate for benign requests but considers the costs worth bearing for national security.
Normalizing Trajectory Models
Diffusion models decompose sampling into many small Gaussian denoising steps, an assumption that breaks down when generation is compressed to a few coarse transitions. Existing few-step methods address this through distillation, consistency training, or adversarial objectives, but sacrifice the likelihood framework. Normalizing Trajectory Models (NTM) models each reverse step as an expressive conditional normalizing flow with exact likelihood training. Architecturally, NTM combines shallow invertible blocks within each step with a deep parallel predictor across the trajectory, forming an end-to-end network trainable from scratch or initializable from pretrained flow-matching models. On text-to-image benchmarks, NTM matches or outperforms strong image generation baselines in just four sampling steps while uniquely retaining exact likelihood over the generative trajectory.
Compressing Streaming Neural Audio Encoders via Latent-Space Distillation
Apple’s on-device dictation tokenizer maps waveform to latent representations for a sparsely activated language model, and compressing it reduces memory and latency demands. The authors compress it via latent-space distillation, using the teacher’s pre-quantizer latent as the supervision target rather than tokens or output distributions. A student encoder is trained to regress the teacher’s per-frame latent with a squared-error objective, and an affine layer absorbs width mismatch. This recipe works for both token interfaces and for tokenizers pretrained alone or jointly with a language model, requiring no fine-tuning. At 2.8x compression, the student stays within 1.9% relative WER of its teacher on five of six pairs and outperforms an independently trained tokenizer of identical capacity by 3.9% relative.
Related topics
All topics →Weekly digest
The best engineering reads, once a week.