Encoder-only models (BERT family)

Pretrained language models · neural · 2018 · text · code

What it is

Masked-language pretraining over a bidirectional encoder; produces contextual embeddings, not generated text.

When to use it

Classification, embeddings, retrieval, extraction — anything that reads rather than writes.

Caveats

They are not built to generate text, and the original models are limited to 512 tokens. The [MASK] token seen in pretraining never appears at fine-tuning time, and most uses require task-specific fine-tuning.

Key ideas

  • RoBERTa: train longer, drop NSP, more data
  • DeBERTa: disentangled attention; ELECTRA: replaced-token detection
  • ModernBERT adds rotary positions and long context

Related architectures

Original paper

BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding (2018, arXiv)

Browse all 198 architectures

The architecture landscape, in one place.

Two things get called “ML architecture”: the classical statistical model families, and the neural network wirings. Both are here, tagged by what they are and what data they eat.

Start from your problem

Architectures

0 shortlisted