[Paper Review] bert2BERT: Towards Reusable Pretrained Language Models
This paper proposes bert2BERT, a method to accelerate pre-training of large language models by reusing knowledge from smaller pre-trained models via advanced parameter initialization and a two-stage training strategy. By initializing large models with knowledge from smaller ones—specifically using advanced knowledge initialization (AKI) and function-preserving initialization (FPI)—the approach reduces pre-training computation by up to 47% for GPT and 45% for BERT, demonstrating strong efficiency gains across diverse architectures.
In recent years, researchers tend to pre-train ever-larger language models to explore the upper limit of deep models. However, large language model pre-training costs intensive computational resources and most of the models are trained from scratch without reusing the existing pre-trained models, which is wasteful. In this paper, we propose bert2BERT, which can effectively transfer the knowledge of an existing smaller pre-trained model (e.g., BERT_BASE) to a large model (e.g., BERT_LARGE) through parameter initialization and significantly improve the pre-training efficiency of the large model. Specifically, we extend the previous function-preserving on Transformer-based language model, and further improve it by proposing advanced knowledge for large model's initialization. In addition, a two-stage pre-training method is proposed to further accelerate the training process. We did extensive experiments on representative PLMs (e.g., BERT and GPT) and demonstrate that (1) our method can save a significant amount of training cost compared with baselines including learning from scratch, StackBERT and MSLT; (2) our method is generic and applicable to different types of pre-trained models. In particular, bert2BERT saves about 45% and 47% computational cost of pre-training BERT_BASE and GPT_BASE by reusing the models of almost their half sizes. The source code will be publicly available upon publication.
Motivation & Objective
- To reduce the high computational cost and carbon footprint of pre-training large-scale language models.
- To explore efficient pre-training by reusing knowledge from smaller, already-trained models instead of training from scratch.
- To develop a generic, model-agnostic method applicable to diverse Transformer-based pre-trained models like BERT and GPT.
- To improve training efficiency through parameter initialization and a two-stage pre-training strategy.
Proposed method
- Extends function-preserving initialization (FPI) from Chen et al. (2016) to Transformer-based language models, ensuring the large model behaves similarly to the small one at initialization.
- Proposes advanced knowledge initialization (AKI), which duplicates and stacks weights from different layers of the small model to accelerate convergence, even if it slightly violates function preservation.
- Employs a two-stage pre-training strategy to further speed up optimization, improving training efficiency.
- Uses the smaller pre-trained model (e.g., BERT BASE with D=512) to initialize a larger target model (e.g., BERT LARGE with D=768) via parameter duplication and stacking.
- Applies the method to both BERT and GPT architectures, demonstrating its generic applicability across different model types and normalization schemes (e.g., post-LN vs. pre-LN).
- Employs standard pre-training objectives (masked language modeling and next sentence prediction) on the initialized large model with fine-tuned hyperparameters to achieve faster convergence.
Experimental results
Research questions
- RQ1Can knowledge from a smaller pre-trained model be effectively transferred to initialize a larger model, reducing pre-training cost?
- RQ2Does advanced knowledge initialization (AKI) outperform standard function-preserving initialization in accelerating convergence during large model pre-training?
- RQ3To what extent can the proposed method reduce computational cost across different architectures like BERT and GPT?
- RQ4Is the method generic enough to be applied to diverse pre-trained models, including those with different normalization schemes (e.g., post-LN vs. pre-LN)?
- RQ5How does the two-stage pre-training strategy contribute to improved training efficiency compared to end-to-end training from initialized weights?
Key findings
- bert2BERT reduces pre-training computational cost by 45% for BERT BASE and 47% for GPT BASE when initializing from a smaller model of roughly half the size.
- The method achieves significant efficiency gains across different model architectures, including BERT (post-LN) and GPT (pre-LN), demonstrating its generic applicability.
- Advanced knowledge initialization (AKI) leads to faster convergence than standard function-preserving initialization, despite slightly violating the function-preserving principle.
- The two-stage pre-training strategy further accelerates training, contributing to the overall efficiency improvement.
- The method outperforms baselines such as StackBERT and MSLT in terms of computational cost reduction while maintaining competitive performance on downstream tasks.
- Empirical results show that attention patterns in small and large models are highly similar, validating the feasibility of knowledge transfer between models of different sizes.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.