Don't Ignore the Tail: Decoupling top-K Probabilities for Efficient Language Model Distillation
Organizations: School of Computing and Information Systems, University of Melbourne, Melbourne, Australia.
Abstract
The core learning signal used in language model distillation is the standard Kullback-Leibler (KL) divergence between the student and teacher distributions. Traditional KL divergence tends to be dominated by the next tokens with the highest probabilities, i.e., the teacher's modes, thereby diminishing the influence of less probable yet potentially informative components of the output distribution. We propose a new tail-aware divergence that decouples the contribution of the teacher model's top-K predicted probabilities from that of lower-probability predictions, while maintaining the same computational profile as the KL Divergence. Our decoupled approach reduces the impact of the teacher modes and, consequently, increases the contribution of the tail of the distribution. Experimental results demonstrate that our modified distillation method yields competitive performance in both pre-training and supervised distillation of decoder models across various datasets. Furthermore, the distillation process is efficient and can be performed with a modest academic budget for large datasets, eliminating the need for industry-scale computing.
Figures & tables
| Teacher/Student | HS | WG | OBQA | ARC-E | ARC-C | PIQA | SIQA | Story | Avg | ||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Qn1.5 1.8B 1.2B | CLM (no KD) | 39.4 | 51.8 | 28.4 | 46.0 | 25.7 | 67.0 | 39.5 | 62.2 | 45.0 | 0.7 |
| Vanilla KD | 40.7 | 53.2 | 29.8 | 46.1 | 25.5 | 67.3 | 39.2 | 63.5 | 45.6 | ||
| Seq-KD | 38.5 | 51.9 | 29.2 | 46.5 | 25.1 | 66.3 | 39.0 | 61.0 | 44.7 | 0.9 | |
| MiniLLM | 36.1 | 51.2 | 28.5 | 44.1 | 25.3 | 65.8 | 37.9 | 61.4 | 43.8 | 1.9 | |
| MiniPLM | 42.8 | 53.3 | 31.0 | 46.8 | 26.9 | 68.3 | 39.8 | 64.0 | 46.6 | 1.0 | |
| TAD ( ) | 42.3 | 53.8 | 30.5 | 52.0 | 27.0 | 67.3 | 41.2 | 63.9 | 47.2 | 1.2 |
| 0.5 | 1 | 2 | 5 | 10 | ||
|---|---|---|---|---|---|---|
| 1.2B | Avg | 47.0 | 47.6 | 47.8 | 47.7 | 47.6 |
| 1.4 | 2.0 | 2.2 | 2.1 | 2.0 | ||
| 0.5B | Avg | 45.0 | 45.1 | 45.4 | 45.1 | 44.9 |
| 1.0 | 1.2 | 1.5 | 1.2 | 1.0 |
| # P(M) | Vanilla | MiniPLM | TAD | MiniLLM | Seq-KD |
|---|---|---|---|---|---|
| 1.2B | 9.2 | 12.4 | 9.3 | 39.0 | 65.0 |
| 0.5B | 6.4 | 9.7 | 6.5 | 21.8 | 43.2 |
| Teacher/Student | HS | WG | OBQA | ARC-E | ARC-C | PIQA | SIQA | Story | Avg | F-ECE | ||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Phi2 2.8B 1.1B | CLM (no KD) | 38.2 | 51.1 | 27.4 | 51.2 | 24.1 | 66.3 | 40.8 | 63.1 | 45.3 | 4.3 | 1.57 |
| CLM (Mat.) | 40.2 | 51.9 | 28.6 | 52.3 | 24.8 | 67.6 | 41.7 | 64.7 | 46.5 | 2.4 | 1.50 | |
| Vanilla KD | 43.6 | 53.5 | 33.0 | 57.3 | 30.0 | 68.0 | 43.2 | 64.3 | 49.1 | 1.45 | ||
| MiniPLM | 43.7 | 52.5 | 30.6 | 57.1 | 29.9 | 68.1 | 43.8 | 64.3 | 48.8 | 1.62 | ||
| RKL | 42.3 | 54.1 | 31.6 | 58.0 | 28.7 | 68.2 | 43.8 | 64.9 | 49.0 | 1.77 | ||
| TAD ( ) | 45.2 | 55.3 | 34.0 | 58.0 | 30.7 | 68.3 | 44.4 | 64.9 | 50.1 | 0.9 | 1.19 |
| Model | Data (#Tkns) | GSM8K | MATH | SVAMP | ASDiv | MAWPS | TAB | MQA | SAT | Avg | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| TinyLlama(TL) 1.1B | Web (2.5T) | 2.0 | 2.6 | 9.5 | 16.3 | 20.1 | 12.7 | 12.8 | 15.6 | 11.4 | |
| CLM (no KD) | + OWM(2.5B) | 3.9 | 3.8 | 17.9 | 29.7 | 39.5 | 12.2 | 10.8 | 15.6 | 16.7 | |
| Phi3 4B TL | Vanilla KD | + OWM(2.5B) | 6.1 | 4.2 | 21.1 | 33.5 | 41.5 | 15.5 | 11.2 | 16.7 | 18.7 |
| MiniPLM | 3.3 | 3.4 | 13.4 | 27.3 | 34.0 | 10.8 | 10.5 | 12.5 | 14.4 | ||
| TAD ( ) | + OWM(2.5B) | 6.1 | 6.2 | 22.1 | 33.1 | 41.5 | 14.0 | 11.3 | 21.9 | 19.5 | |
| TAD ( ) | 7.1 | 4.8 | 19.2 | 35.9 | 46.7 | 15.9 | 10.0 | 22.6 | 20.3 |
| Model | Data (#tokens) | GSM8K | MATH | SVAMP | ASDiv | MAWPS | TAB | MQA | SAT | Avg. | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| TinyLlama(TL) 1.1B | Web (2.5T) | 2.0 | 2.6 | 9.5 | 16.3 | 20.1 | 12.7 | 12.8 | 15.6 | 11.4 | |
| CLM SFT | +OWM(2.5B) ’ +ORCAMEL | 19.6 | 4.0 | 49.4 | 58.8 | 74.3 | 21.8 | 18.0 | 28.1 | 34.3 | |
| Phi3 4B TL | Vanilla KD | +OWM(2.5B) ’ +ORCAMEL | 30.8 | 6.8 | 64.6 | 62.5 | 80.7 | 20.1 | 16.7 | 27.5 | 38.7 |
| TAD ( ) | +OWM (2.5B) ’ +ORCAMEL | 36.8 | 6.8 | 67.8 | 67.9 | 81.7 | 25.4 | 16.3 | 28.1 | 41.4 | |
| TAD ( ) | 33.2 | 7.4 | 65.4 | 68.7 | 85.6 | 27.6 | 17.9 | 34.4 | 42.5 | ||
| TAD ( ) | 30.1 | 9.0 | 65.7 | 68.4 | 85.4 | 24.1 | 18.2 | 29.8 | 41.3 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Teacher | #P(M) | ||||||
|---|---|---|---|---|---|---|---|
| Qwen1.5-1.8B | B | 151,936 | 1,536 | 24 | 16 | 96 | 4,224 |
| Qwen1.5-1.8B | B | 151,936 | 1,024 | 24 | 16 | 64 | 2,816 |
| Phi2-2.8B | 1.1B | 52,000 | 2,560 | 16 | 32 | 80 | 5,120 |
| Qwen2.5-3B | 1.2B | 151,936 | 2,048 | 18 | 16 | 128 | 7,680 |
| Gemma2-9B | 2B | 256,000 | 3,584 | 14 | 16 | 224 | 4,096 |
Language Model Distillation
Language model distillation transfers a larger model’s capabilities to smaller or specialized models using outputs, probabilities, or internal representations.
See all 508 papers