Finally, a Replacement for BERT: Introducing ModernBERT – Answer.AI
This title could be clearer and more informative.Try out Clickbait Shieldfor free (5 uses left this month).
ModernBERT is a new family of encoder-only models from Answer.AI and LightOn that replaces BERT with a Pareto improvement across speed, accuracy, and context length. It supports 8,192-token sequences (16x more than standard BERT), is trained on 2 trillion tokens including code and scientific text, and outperforms DeBERTaV3 on GLUE while using less than 1/5th the memory. Key architectural upgrades include RoPE positional embeddings, GeGLU layers, alternating local/global attention, unpadding with sequence packing, and hardware-aware model design. Available in base (149M) and large (395M) sizes, it integrates as a drop-in replacement for BERT-like models via HuggingFace Transformers and is especially suited for RAG pipelines, code search, classification, and entity extraction.