Encoder
The half of a model that reads an input and compresses it into a rich internal representation.
Think of it like
A note-taker who listens to a whole speech and writes a dense summary others can work from.
Example
BERT is encoder-only: it reads a sentence and produces vectors great for classification or search, not generation.
How it actually works
An encoder maps an input sequence into a set of context-rich vectors, seeing the whole input at once (bidirectionally). It’s ideal when you need to understand or embed text rather than produce more of it — search, classification, retrieval. Encoder-only models like BERT dominate those tasks; pure generation uses decoders instead.
For product teams
The right shape when the job is understanding or searching text, not writing it.
For engineers
A stack that maps input tokens to contextual representations, typically with bidirectional attention.
Related
- Decoder — Pairs with a decoder.
- Encoder-Decoder — Together they form encoder-decoder.
- Representation — Produces a representation.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome