TensorX
返回文献探索

Paper · arXiv 2410.17215

MiniPLM: Knowledge Distillation for Pre-Training Language Models

Yuxian Gu, Hao Zhou, Fandong Meng, Jie Zhou, Minlie Huang

16 upvotesOctober 22, 2024arXiv 预印本
AI 摘要

MiniPLM is a knowledge distillation framework that enhances pre-training efficiency, flexibility, and effectiveness for student language models by refining the training data distribution using offline teacher inference.

knowledge distillationlanguage modelspre-trainingfine-tuningoffline teacher inferencetokenization matchingtraining data distributionlanguage modeling capabilitiesscaling curves

Abstract

Knowledge distillation (KD) is widely used to train small, high-performing student language models (LMs) using large teacher LMs. While effective in fine-tuning, KD during pre-training faces challenges in efficiency, flexibility, and effectiveness. Existing methods either incur high computational costs due to online teacher inference, require tokenization matching between teacher and student LMs, or risk losing the difficulty and diversity of the teacher-generated training data. To address these issues, we propose MiniPLM, a KD framework for pre-training LMs by refining the training data distribution with the teacher's knowledge. For efficiency, MiniPLM performs offline teacher LM inference, allowing KD for multiple student LMs without adding training-time costs. For flexibility, MiniPLM operates solely on the training corpus, enabling KD across model families. For effectiveness, MiniPLM leverages the differences between large and small LMs to enhance the difficulty and diversity of the training data, helping student LMs acquire versatile and sophisticated knowledge. Extensive experiments demonstrate that MiniPLM boosts the student LMs' performance on 9 widely used downstream tasks, improves the language modeling capabilities, and reduces pre-training computation. The benefit of MiniPLM extends to large pre-training scales, evidenced by the extrapolation of the scaling curves. Further analysis reveals that MiniPLM supports KD across model families and enhances the utilization of pre-training data. Our model, code, and data are available at https://github.com/thu-coai/MiniPLM.

北京市昌平区探索星信息技术及软件开发工作室

京ICP备2026059466号
MiniPLM: Knowledge Distillation for Pre-Training Language Models | TensorX