Summary
This paper proposes a new efficient recipe for training BERT, matching the original performance of BERT on GLUE in ~1h on 8x A100. To do so, the authors leverage a number of architectural/implementation improvements: FlashAttention, ALiBi, GeGLU, `bf16` layer norm, unpadding, and tweaks to the masking ratio. The authors find that their recipe is optimal even when considering longer runs, and that it transfers well to BERT-Large.
Strengths
* **S1.** Reducing the costs associated with training language models can help practitioners iterate faster, improving downstream research outcomes. This makes this paper potentially valuable to the community, as it improves upon previously introduced similar recipe such as CrammingBERT.
* **S2.** The authors detail their contributions and open-source their code, making these results reproducible and enabling the community to build upon them.
* **S3.** The authors feature an updated baseline (BERT-Base) that helps for fair comparisons in their setup.
Weaknesses
* **W1. It is difficult to untangle individual contributions to the final result.**
* **W1.1.** The proposed recipe visibly has some positive impact on GLUE score, as Figure 3 shows that it achieves significantly better performance than BERT-Base after the same amount of training. However, that impact is never quantified in the paper. Here, the ablations should not only focus on throughput, but also on how the proposed interventions might impact the GLUE score.
* **W1.2.** The proposed baseline is very strong (which is a positive point), and it would be good in Table 1 to also showcase the time it take for it to reach a 79.6 GLUE score. Furthermore it would be interesting to identify what makes the baseline such a strong one (with a final score much higher than BERT-Base). Is it the change in data to C4 (which authors acknowledge as an important factor l161)? Something else?
* **W1.3.** l112 the authors discuss using ALiBi to pretrain with a shorter sequence length and extrapolate at test time. It's unclear if this end up being used, and if it is included in the ALiBi ablations.
* **W1.4.** l251 it is disappointing to not ablate adequately every component, especially since the value of this paper lies in having a potentially systematic approach to performance improvements of BERT models.
* **W2. The Pareto frontiers described may be slightly misleading, as they do not account for LR schedule.** The so-called Pareto optimality is obtained by taking points from the same run, instead of having one run per pretraining budget on the plot. This approximation penalises intermediate budgets, as they are evaluated with an incomplete LR schedule. While I don't think this has a significant influence in this work, since the authors discuss Pareto optimality so much, this should at the very least be clearly discussed as a limitation to avoid misleading other authors. This issue is particularly relevant, as it has lead to significant misunderstandings around scaling laws for instance (see Hoffmann et al., 2022).
* **W3.** The paper feels a bit repetitive, as if it had been stretched to fit the 9 pages of content. Section 3.2 and 3.3 are particularly egregious in this regard, and more time could instead be spent on ablations.
* **W4.** (minor nits) l98 reference to Triton should cite "Triton: An Intermediate Language and Compiler for Tiled Neural Network Computations" (Tillet et al., 2019); l145 the sentence "results from NVIDIA and others" is confusing, as the final work cited is not from NVIDIA -- there should be a citation somewhere for the NVIDIA results.
Questions
This has the potential to be a valuable paper to the community, by systematically identifying and detailing interventions that can accelerate the training of large language models like BERT. Reducing iteration costs is in particular a great enabler for researchers. Unfortunately, the lack of systematic ablations on GLUE score and the limited throughput ablations make this paper fall somewhat short of its promise. Accordingly, I am rating it as a **Borderline Reject (4)** but would be willing to increase my score to an accept should some of my concerns be addressed.
**EDIT: following rebuttal, I have updated my score to a Weak Accept (6).**
* **Q1.** Could the authors explain why Figure 3 shows a significant improvement in GLUE score for RapidBERT over BERT? Would it be possible to ablate for this improvement, to ultimately better understand which intervention improves throughput and which improves "modelling performance" (i.e., GLUE score)?
* **Q2.** Could the authors explain why the baseline used is so much above the original BERT-Base?
* **Q3.** Could the authors clarify whether they use for RapidBERT a shorter training seqlen to accelerate training as proposed?
* **Q4.** Could the authors provide further performance ablations for FlashAttention/unpadding?
* **Q5.** (more of a suggestion) Could the authors better describe the limitation of their approach regarding Pareto-optimality?
Small suggestions:
* l13/14 in the abstract "When pretrained from scratch on the C4 dataset, this base model achieves the downstream average GLUE score of 79.6 in 1.13 hours on 8 A100 80 GB GPUs at a cost of roughly USD 20" it would be good to mention this is the GLUE score achieved by the original BERT; for instance "RapidBERT achieves the same downstream average GLUE score as the original BERT (79.6) in 1.13 hours on 8 A100 80 GB GPUs at a cost of roughly USD 20".
Rating
6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.
Confidence
5: You are absolutely certain about your assessment. You are very familiar with the related work and checked the math/other details carefully.
Limitations
While there is no explicit section, some limitations in terms of scope are discussed in the conclusion.