CHAPTER 07 · Glossary: Foundational Modelling · 13 / 27
Encoder and decoder
These are the two halves of the original Transformer. The encoder reads and builds an understanding of an input (helpful for tasks like translation, where you must fully digest the source sentence). The decoder generates output one token at a time.
Most chat models today, such as the GPT family, use only the decoder half, because their primary job is to generate text. You will still hear "encoder" and "decoder" constantly, so it is worth knowing that encoder means "understand the input" and decoder means "produce the output."