Pre-training Distillation for Large Language Models: A Design Space Exploration

Hao Peng, Xin Lv, Yushi Bai, Zijun Yao, Jiajie Zhang, Lei Hou, Juanzi Li

Introduction

Knowledge Distillation (KD) has become a cornerstone of the post-training pipeline for Large Language Models (LLMs), enabling smaller models to inherit the capabilities of larger "teacher" models. However, its application during the resource-intensive pre-training phase—where models ingest trillions of tokens—remains largely underexplored. This research systematically maps the design space of "pre-training distillation" (PD), addressing logistical hurdles and identifying the optimal configurations for foundational training.

The Logistical Challenge: The 4000x Storage Hack

The primary barrier to PD is the sheer volume of data. Storing full teacher logits (e.g., a 150k vocabulary) across a 100-billion-token corpus would require nearly 60 Petabytes of storage. To overcome this, the authors introduce a top-$p$-$k$ truncation method. By applying nucleus sampling ($p=0.95$) followed by a hard cutoff ($k=100$) and re-normalization, storage requirements were slashed to just 15 Terabytes—a 4000x reduction—without sacrificing student performance.

Exploring the Design Space

The study investigates four critical dimensions of pre-training distillation:

  1. Loss Functions: While Mean Squared Error (MSE) is common in other domains, it fails significantly in LLM pre-training. Kullback–Leibler Divergence (KLD) emerged as the superior loss function.
  2. Loss Scheduling: A dynamic Warmup-Stable-Decay (WSD) approach, where the KD loss ratio peaks at approximately 90% during the stable phase, proved most effective.
  3. Teacher-Student Dynamics: The research reveals a "capacity gap." Distilling from a massive 32B teacher into a small 330M student can actually yield worse results than using a smaller 9B teacher, as the student lacks the capacity to model the teacher's complex distributions.
  4. Offline vs. Online: Offline distillation (using a fixed, pre-trained teacher) outperforms online distillation (training teacher and student simultaneously), as early-stage teacher logits are too noisy for effective guidance.

Scaling Laws and the Capacity Gap

A surprising finding is that larger student models benefit more from pre-training distillation than smaller ones. As the student model scales from 330M to 6.8B parameters, the performance gain over standard language modeling (LM) loss increases.

Figure 4: The performance delta (Δ) increases with student size, but a capacity gap appears when the teacher is too large for the student.

Key Results

The optimized PD configuration (PD), utilizing KLD loss and WSD scheduling, consistently outperforms both standard LM loss and "vanilla" distillation approaches. For a 6.8B parameter student, PD improved average benchmark scores from 44.9% to 49.8%.

Figure 1: Comparison of Accuracy (%) across different student model sizes using standard LM loss, vanilla PD, and the optimized PD* configuration.

Conclusion and Future Work

This exploration establishes a practical playbook for pre-training distillation. While the benefits are clear, limitations remain: the study was capped at 500 billion tokens, and the combinatorial complexity of all design variables remains high. Future research may explore "weak-to-strong" generalization, investigating whether smaller teachers can effectively guide the pre-training of even larger student models.

Summary updated

BibTeX
@inproceedings{peng2025pre,
  author = {Hao Peng and Xin Lv and Yushi Bai and Zijun Yao and Jiajie Zhang and Lei Hou and Juanzi Li},
  title = {{Pre-training Distillation for Large Language Models: A Design Space Exploration}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure