BERT has been the unkillable workhorse of practical AI since 2018—68 million monthly downloads doesn’t lie. But today, Answer.AI and LightOn are finally shipping a genuine replacement. Meet ModernBERT, an encoder-only model family that takes the architectural and training advances poured into massive generative models over the last few years and ports them back to the lean, mean BERT paradigm.

What you actually get: a base model at 149 million parameters and a large at 395 million, both with an 8,192 token context length. That’s 16 times what most existing encoders can handle. The speed difference is equally stark—ModernBERT is designed for Flash Attention 2 and processes sequences much faster than its predecessors, all while delivering better downstream performance on tasks like classification and retrieval.

This isn’t an academic exercise. The model is a slot-in replacement for any BERT-like pipeline, and it’s landing in Hugging Face’s transformers library starting with version 4.48.0. One minor API shift: you can drop token_type_ids entirely. The real unlock here is what the extended context window makes possible. Suddenly, full-document retrieval for RAG pipelines goes from a multi-step hack to a straightforward operation. Code search across entire files is viable. The training data itself includes a significant amount of code—a first for any open encoder model.

I’m most curious whether the 8K context length holds up in real-world retrieval benchmarks, or if we’ll see the same degradation patterns that plague long-context decoders. But for anyone running classification, content moderation, or entity extraction at scale, this is the first credible upgrade path in half a decade. The old BERT checkpoints aren’t going anywhere, but the performance gap just got wide enough to matter.