Encoder
Domain: LLM Concepts
π― Motivation
The encoder part of a transformer processes the entire input simultaneously, building a rich understanding (contextualized representations) of the text.
π Concrete Example
Input βThe cat satβ goes through encoder layers. Each tokenβs representation is enriched with context from other tokens. Output: deep understanding vectors for each token.
π Analogy
A scholar studying a text - they read the whole thing, cross-reference, take notes, and build a deep understanding. The encoder does this mathematical version of deep reading.