ProtModernBERT: Compute-Efficient Protein Language Modeling
Organizations: Multiverse Computing, Parque Científico y Tecnológico de Gipuzkoa, Paseo de Miramón 170, 20014 Donostia-San Sebastián, Spain. · Multiverse Computing, 7 rue de la Croix Martre, 91120 Palaiseau, Paris, France
Abstract
Large protein language models provide a powerful framework for learning sequence-function relationships and guiding experimental design. However, architectural improvements are underexplored, especially in low-compute regimes of relevance for resource-constrained research laboratories. We show that the training cost for encoder-only transformer architectures can be reduced by leveraging modern architectural refinements, offering an encouraging performance / compute-efficiency trade-off. We introduce ProtModernBERT, a modernized BERT-style model pre-trained on amino acid sequences, and compare it with ProtBert, Amplify, and ESM2 across a set of supervised structural tasks -encompassing secondary structure prediction, disorder prediction, and subcellular localization- and ProteinGym's zero-shot functional benchmark. We find that ProtModernBERT matches or closely tracks the performance of Amplify-120M and ProtBert with up to 80-90% reduction in pre-training FLOPs, and narrows the gap to ESM2 when controlling for pre-training. Our analysis using a cluster-based validation protocol for hyperparameter selection and randomly initialized models disentangles the contributions of architecture and data, showing that modern components provide stronger inductive biases that are more consequential than parameter count in low-compute regimes.
Figures & tables
| Hyperparameter | ModernBERT (Base, 140M) | Amplify (Base, 120M) | ProtModernBERT |
|---|---|---|---|
| Optimizer | StableAdamW ( , ) | AdamW ( , ) | AdamW ( , ) |
| Learning rate | (pretrain), (context) | 0.001 | |
| Weight decay | 0.01 | 0.01 | |
| LR schedule | Trapezoidal | Cosine decay (Stage 1), none (Stage 2) | Trapezoidal |
| Global Batch size | 4,608 (pretrain), 72 (context) | 4,096 | 12288 |
| Precision | fp16/bf16 (via FlashAttention) | bf16 (mixed precision) | bf16 (via FlashAttention) |
| Dataset | Task | Train | Test |
| DeepLoc | Localization (10-class) | 6,622 | 1,842 |
| Membrane (binary) | 6,622 | 1,842 | |
| Train_HHblits | Sec. structure | 10,792 | – |
| CASP12 | Sec. structure | – | 20 |
| TS115 | Sec. structure | – | 115 |
| CB513 | Sec. structure | – | 511 |
| Model | Parameters | FLOPs |
|---|---|---|
| ProtBert | 420M | |
| ESM2-150M | 150M | * * * Training FLOPs for ESM2-150M are not reported in original ESM2 publications. ESM2-150M does not seem to be the most computationally expensive model in our comparison: based on our estimates, its total pre-training budget lies in the range – FLOPs, we report the most conservative estimate and further discuss this in the Appendix ( A-D ). |
| Amplify-120M | 120M | |
| Amplify-350M | 350M | |
| ProtModernBERT | 140M | |
| Early ProtModernBERT | 140M |
| Model | Total (Overall) | Org. Fitness | Binding | Expression | Activity | Stability |
|---|---|---|---|---|---|---|
| ProtBert | 0.376 | 0.357 | 0.211 | 0.338 | 0.363 | 0.448 |
| ProtModernBERT | 0.373 | 0.379 | 0.282 | 0.385 | 0.342 | 0.400 |
| Early ProtModernBERT | 0.327 | 0.331 | 0.288 | 0.354 | 0.316 | 0.331 |
| ESM2-150M | 0.387 | 0.305 | 0.326 | 0.402 | 0.391 | 0.510 |
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
| Model | LR | Epochs | Weight Decay |
| Amplify 120M | 3e-5 | 4 | 0.02 |
| Amplify 120M RandInit | 3e-5 | 4 | 0.02 |
| Amplify 350M | 3e-5 | 4 | 0.02 |
| Amplify 350M RandInit | 3e-5 | 4 | 0.02 |
| ESM150M | 5e-5 | 4 | 0.10 |
| ESM150M RandInit | 5e-5 | 4 | 0.10 |
| Label | Learning Rate | Epochs | Weight Decay |
|---|---|---|---|
| Fine-tune 0 | 3e-5 | 4 | 0.02 |
| Fine-tune 1 | 3e-5 | 4 | 0.10 |
| Fine-tune 2 | 3e-5 | 6 | 0.02 |
| Fine-tune 3 | 3e-5 | 6 | 0.10 |
| Fine-tune 4 | 5e-5 | 4 | 0.02 |
| Fine-tune 5 | 5e-5 | 4 | 0.10 |
Protein Language Models
Protein language models learn patterns in amino-acid sequences to predict protein properties, interpret mutations, and design new proteins.
See all 69 papers