Exercises — Transformer architectures
Self-check questions and worked answers
← Back to the lesson: Transformer architectures
Check your understanding
Extended exercises on this topic.
- Why can BERT use tokens that appear after the token being represented? Its encoder generally uses bidirectional attention over the full input; it is not subject to GPT’s causal mask.
- Which operation particularly distinguishes an encoder–decoder from a decoder-only model? The encoder–decoder’s decoder has cross-attention to representations produced by the encoder.
- Does next-token prediction define every Transformer? No. It is a typical objective for autoregressive decoders, not a property of all Transformers.
- Is a Transformer necessarily an LLM? No. Architecture alone does not determine model scale or whether it qualifies as an LLM.