A Transformer turns a sequence into representations it can use.
The original Transformer paper introduced an encoder–decoder architecture for sequence tasks such as translation. It replaced recurrence with attention: the model processes relationships between sequence positions through stacked layers, alongside position-wise feed-forward networks.
Many later language models use Transformer variants, but the architecture family is broader than chatbots. An encoder can build representations from an input; a decoder can generate a sequence; an encoder–decoder model can combine both. The exact blocks and training objective vary.
To place the architecture among other neural approaches, see the deep-learning guide ↗. For the next-token generation task, continue with how language models work ↗.
