MiniPLM: Knowledge Distillation for Pre-Training Language Models
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.
Community
MiniPLM: a knowledge distillation framework for pre-training languge models, with the following benefits:
- Efficiency: The inference of the teacher LM is completely offline, avoiding introducing online inference cost during the student LM pre-training. MiniPLM achieves 2.2x pre-training acceleration.
- Flexibility: Minimal modifications are introduced to the highly-optimized pre-training code bases. KD across different model families is available with MiniPLM.
- Effectiveness: Teacher LM's knowledge is distilled into the pre-training data distribution. MiniLLM outperforms various baselines on 9 downstream tasks.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Data Selection via Optimal Control for Language Models (2024)
- Exploring and Enhancing the Transfer of Distribution in Knowledge Distillation for Autoregressive Language Models (2024)
- Speculative Knowledge Distillation: Bridging the Teacher-Student Gap Through Interleaved Sampling (2024)
- Enhancing Knowledge Distillation of Large Language Models through Efficient Multi-Modal Distribution Alignment (2024)
- Mentor-KD: Making Small Language Models Better Multi-step Reasoners (2024)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 13
Browse 13 models citing this paperDatasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper