Abstract
Recent studies have uncovered that language model distillation is less effective when facing a large capacity gap between the teacher and the student, and introduced teacher assistant-based distillation to bridge the gap. As a connection, the scale and the performance of the teacher assistant is of vital importance to bring the knowledge from the teacher to the student. However, existing teacher assistant-based methods require maximally many trials before scheduling an optimal teacher assistant. To this end, we propose a minimal distillation schedule (MiniDisc) for scheduling the optimal teacher assistant in minimally one trial. In particular, motivated by the finding that the performance of the student is positively correlated to the scale-performance tradeoff of the teacher assistant, MiniDisc is designed with a $\lambda$-tradeoff to measure the optimality of the teacher assistant without trial distillation to the student. MiniDisc then can schedule the optimal teacher assistant with the best $\lambda$-tradeoff in a sandwich framework. MiniDisc is evaluated with an extensive set of experiments on GLUE. Experimental results demonstrate the improved efficiency our MiniDisc compared to several state-of-the-art baselines. We further apply MiniDisc to a language model with billions of parameters and show its scalability.
Introduction
Knowledge Distillation (KD) is the standard approach for compressing Large Language Models (LLMs) into smaller, deployable versions. However, when the target student model is significantly smaller than the teacher—a process known as extreme compression (e.g., 5% of the original size)—the student often fails to learn effectively due to the massive capacity gap.
To bridge this gap, researchers utilize Teacher Assistants (TAs): intermediate-sized models that act as stepping stones. The primary challenge is that finding the "perfect" TA (balancing size and performance) has traditionally required an exhaustive search (MaxiDisc), involving dozens of expensive training runs to determine which TA yields the best final student performance.
Methods: The MiniDisc Framework
We propose MiniDisc (Minimal Distillation Schedule), which identifies the optimal TA in just a single training trial. The framework consists of three key components:
- The $\lambda$-tradeoff Metric: We discovered that a student's final performance is positively correlated with a specific balance of the TA's scale ($s_a$) and performance ($m_a$). We define the metric $t_a = m_a + \lambda \cdot (1 - s_a)$ to quantify TA optimality without needing to train the final student.
- Specification: The search space is discretized into a grid of potential TA scales, and structured pruning is used to create candidate architectures for each scale.
- Sandwich Optimization: Instead of training each TA candidate separately, we use parameter-sharing in a "sandwich-like" model where smaller TA candidates are nested sub-networks of larger ones. This allows the entire pool of TA candidates to be optimized simultaneously in one run.
Key Results
MiniDisc was evaluated across the GLUE benchmark, Wikipedia (task-agnostic), and the Alpaca dataset (LLaMA2-7B).
- 10x Efficiency Gain: MiniDisc identifies the optimal TA in roughly 4 GPU hours, compared to over 40 GPU hours for exhaustive search (MaxiDisc), while achieving nearly identical student performance.
- Superior Performance at Scale: At extreme 5% compression, MiniDisc-distilled students consistently outperformed conventional distillation and other state-of-the-art baselines like TinyBERT and MiniLM.
- Scalability: The method successfully compressed the 1.1-billion-parameter EncT5 and the 7-billion-parameter LLaMA2, demonstrating its applicability to modern large-scale architectures.
Discussion and Future Work
Our findings suggest that a single, optimally chosen TA is generally sufficient to bridge the capacity gap; adding more TAs to the chain provides diminishing returns. While the current method relies on pruning the teacher's architecture, future work will explore more automated ways to identify optimal model structures and investigate how this "one-run" philosophy can be applied to broader neural architecture search (NAS) domains.
Summary updated