UltraBERT: Beyond the Limit of BERT Pre-Training
Reading guide · Based on sections of the original paper
Why read this
Practitioners pre-training or choosing a sub-500M encoder for both classification and retrieval can use its controlled experiments on token budgets, masking ratios and distillation.
What the authors found
- In the authors' Table 3, UltraBERT-380M scores 91.0 on GLUE and 47.7 on BEIR nDCG@10. The closest medium baselines are Ettin-395M at 90.8 GLUE and LFM2.5-Encoder-355M at 47.3 BEIR. It trails LFM2.5 only on MLDR (44.1 vs 44.5). The 152M model scores 89.5 GLUE and 45.2 BEIR. Some baseline scores come from the literature and others were re-run by the authors. 4.2 Results
- In a 150M ablation, mixing 5% and 50% masked sequences with decoupled heads gave 89.4 GLUE and 45.1 BEIR. This roughly matches the best single ratios: 6% masking gave 89.5 GLUE and 50% masking gave 45.0 BEIR. A shared head gave 88.9 GLUE and 44.7 BEIR. Decaying ratios and uniformly sampled ratios did not help. 3.4 Mixing Masking Ratios with LM Head Decoupling
- The authors trained 150M and 1.3B encoders at 30% masking for 8.8T tokens. Downstream scores plateaued around 1–2T tokens even though training and validation losses kept falling. BEIR showed no significant gain after the first 275B-token checkpoint. 3.1 Training Token Scaling and Downstream Saturation
Main limitation
For each model, the MS MARCO learning rate is chosen by BEIR score, so the reported BEIR numbers are best-attainable figures rather than held-out ones. Several of the leads are small, for example 0.2 GLUE points at medium size. The supplied tables show no variance for these comparisons. B.2 Retrieval Tasks
Where to start
3.4 Mixing Masking Ratios with LM Head Decoupling · See the masking-mixing ablation table and the LM-head geometry evidence. These underpin the core recipe and show why range-sampled masking reduces to the effect of its average ratio.
Abstract
Recent bidirectional encoders have been modernized with innovations from causal large language models (LLMs). However, the pretraining recipe itself remains inherited from small-scale conventions, leaving encoders underoptimized, with no single model performing competitively across both classification and retrieval tasks. In this work, we investigate how far encoder performance can be pushed by revisiting core design choices in training, revealing three key findings: (1) Encoders saturate on downstream tasks beyond a few trillion tokens, indicating that additional compute past this point does not help. (2) Across model sizes, lower masking ratios benefit classification while higher ones benefit retrieval, contradicting prior work suggesting larger ratios for larger models. (3) Distillation with pruning improves classification at low masking ratios but degrades retrieval at high ones. Guided by these findings, we present UltraBERT, a single encoder that assigns separate LM heads to low and high masking ratios within a batch and restricts the distillation objective to the low ratio. To our knowledge, UltraBERT is the first encoder to achieve state of the art on both classification and retrieval tasks, reaching 91.0 on GLUE and 47.7 on BEIR. Together, these results show how far encoder performance can be pushed and provide a principled basis for compute allocation, masking ratio design, and knowledge transfer in bidirectional models.