Abstract
Training large-scale Transformer models entails significant computational costs and environmental impact. While progressive training—gradually increasing model depth—offers a potential solution to reduce training FLOPs, it often suffers from functional mismatch between layers of different depths and training instability during expansion. This paper presents Apollo, a framework that optimizes progressive training by "preparing lessons" for the model. By utilizing weight sharing and a novel sampling strategy, Apollo ensures that shallow layers anticipate the functional requirements of deeper architectures. Experimental results across BERT and GPT architectures demonstrate that Apollo reduces training costs by up to 48% while maintaining or exceeding the performance of standard training-from-scratch methods.
Introduction
The standard paradigm for training Transformer-based language models involves initializing a fixed, deep architecture and training all parameters simultaneously. This approach is computationally intensive and often redundant in the early stages of learning. Progressive training seeks to mitigate this by starting with a shallow model and incrementally adding layers. However, existing methods like StackBERT face two primary challenges: functional mismatch, where layers trained in a shallow context are ill-suited for a deep context, and training instability, characterized by gradient spikes during model expansion.
Apollo addresses these hurdles by introducing a training regime where shallow models are taught to behave like deep ones before the actual expansion occurs. This "lesson preparation" allows for a seamless transition across depths, achieving state-of-the-art efficiency without the need for pre-trained initialization.
Methodology
Apollo incorporates three innovative components into the training pipeline to bridge the gap between varying model depths:
1. Low-Value-Prioritized Sampling (LVPS)
Instead of training a fixed depth at each step, Apollo dynamically samples a depth $L^{(t)}$ for each training iteration. The sampling distribution is biased toward shallower depths to maximize computational savings but periodically includes deeper configurations. This ensures the model is exposed to long-range dependencies and complex hierarchical features early on, despite primarily training on a reduced parameter set.
2. Weight Sharing as a Regularization Mechanism
During the initial stages of training, Apollo employs weight sharing across the sampled depths. For instance, a model might utilize only three unique sets of weights that are mapped across a 12-layer architecture via interpolation. This forces the unique weights to learn a generalized functionality that remains robust across different positions in the stack, effectively "teaching" the weights the roles they will eventually play in a fully expanded model.
3. Stable Layer Interpolation
When the training schedule dictates a permanent increase in the number of unique layers, Apollo utilizes mathematical interpolation rather than simple layer stacking (copying). Traditional stacking often causes a sudden shift in the distribution of activations, leading to optimization shocks. Apollo’s interpolation method preserves the internal activation distribution, ensuring that the "internal weather" of the model remains stable during expansion.
Experimental Evaluation
Datasets and Architectures
The authors validated Apollo using standard large-scale benchmarks to ensure broad applicability:
- Pre-training: English Wikipedia and the Toronto Book Corpus.
- Downstream Tasks: The GLUE benchmark for general language understanding and SQuAD (v1.1 and v2.0) for machine reading comprehension.
- Architectures: The framework was tested on both Encoder-only (BERT) and Decoder-only (GPT) models to demonstrate its versatility across different Transformer variants.
Performance and Efficiency
Apollo demonstrated substantial gains in training efficiency across multiple scales:
- BERT-Base: Achieved a 41.6% reduction in FLOPs and a 41.1% reduction in wall-clock time compared to training from scratch.
- GPT-Base: Realized a 47.9% saving in FLOPs.
- BERT-Large: Efficiency gains scaled with model size, reaching a 55.1% saving in total training FLOPs.
Crucially, these savings did not come at the cost of accuracy. Apollo matched or slightly outperformed the baseline "from-scratch" models on GLUE and SQuAD benchmarks, and it consistently surpassed previous efficiency-focused methods such as LiGO and bert2BERT.
Discussion and Insights
The success of Apollo suggests that weight sharing is more than a memory-saving trick; it acts as a powerful regularization technique. By forcing a single layer to serve multiple roles during the sampling process, the model develops more robust representations. Furthermore, the transition from "from-scratch" training to a progressive regime is made viable by interpolation, which prevents the catastrophic forgetting or instability typically associated with architectural changes mid-training.
Apollo also challenges the necessity of "warm-starting" from smaller pre-trained models. The results indicate that a well-designed progressive strategy starting from scratch can be more efficient than reusing existing weights, providing a cleaner path for developing novel architectures without dependency on legacy models.
Conclusion and Future Work
Apollo represents a significant step toward "Green AI" by making the training of large-scale language models more accessible and less resource-intensive. While the framework is highly effective, future research may focus on automating the hyperparameter selection for the LVPS sampling schedule and testing the limits of this approach on ultra-large models exceeding 175 billion parameters. By integrating Apollo with other efficiency techniques like quantization or pruning, the path toward sustainable large-scale modeling becomes increasingly clear.
Summary updated