Encoder
A model, or part of one, that reads a whole text at once in both directions to build a representation of its meaning.
Also: encoder-only model
An encoder lets every token attend to every other token, before and after it. This gives it a full view of the text, which suits tasks like classification, search, extracting names and judging whether two sentences mean the same thing. BERT, RoBERTa and many embedding models are encoder-only. Encoders do not naturally generate text, since they have no left-to-right order. In encoder-decoder models, the encoder reads the input and hands its representation to a decoder that writes the output.