Towards the Law of Capacity Gap in Distilling Language Models

Chen Zhang, Qiuchi Li, Dawei Song, Zheyu Ye, Yan Gao +1 more
11/13/2023
61 citations
cs.CLcs.AIcs.LG
distillation

Official code: GeneZC/MiniMA (102 stars, Python, Apache-2.0, last commit 2024-07-09).

Abstract

Language model (LM) distillation aims at distilling the knowledge in a large teacher LM to a small student one. As a critical issue facing LM distillation, a superior student often arises from a teacher of a relatively small scale instead of a larger one, especially in the presence of substantial capacity gap between the teacher and student.

Show full abstract

This issue, often referred to as the \textit{curse of capacity gap}, suggests that there is likely an optimal teacher yielding the best-performing student along the scaling course of the teacher. Consequently, distillation trials on teachers of a wide range of scales are called for to determine the optimal teacher, which becomes computationally intensive in the context of large LMs (LLMs). This paper addresses this critical bottleneck by providing the \textit{law of capacity gap} inducted from a preliminary study on distilling a broad range of small-scale (<3B) LMs, where the optimal teacher consistently scales linearly with the student scale across different model and data scales. By extending the law to LLM distillation on a larger scale (7B), we succeed in obtaining versatile LLMs that outperform a wide array of competitors.

View on arXivView PDF

Code Implementations(1)

GeneZC/MiniMAOfficial100%
Apache-2.0

Code for paper titled "Towards the Law of Capacity Gap in Distilling Language Models"

1025Python, ShellNov 11, 20232 years agoApache-2.0

Similar Papers

Cite this paper

@article{zhang2023towards,
  title  = {Towards the Law of Capacity Gap in Distilling Language Models},
  author = {Chen Zhang and Qiuchi Li and Dawei Song and Zheyu Ye and Yan Gao and Yan Hu},
  year   = {2023},
  eprint = {2311.07052},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.07052v4}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.07052.svg)](https://codeofpaper.com/paper/2311.07052)

Discussion