The 60-second answer
A Transformer stacks attention, feed-forward layers, residual connections, and normalization around token representations. Position information is injected explicitly because attention alone is permutation-invariant.
Build the answer in this order
A Transformer stacks attention, feed-forward layers, residual connections, and normalization around token representations.
Position information is injected explicitly because attention alone is permutation-invariant.
Training objective and masking depend on architecture: encoder, decoder, or encoder–decoder.
Discuss sequence-length cost, batching, mixed precision, and serving optimizations when moving from architecture to production.
A useful interview mental model
This is the shape of a strong answer—not a script to memorize.
Senior-level signal
- Discuss memory bandwidth and attention/KV-cache costs, not only FLOPs, when reasoning about real latency.
- Tie architectural choices to the task, context length, training objective, and deployment constraints.
What the interviewer is really testing
Likely follow-up questions
Common weak-answer patterns
- Reciting a definition without mechanism or assumptions.
- Claiming one technique is always better without a data regime.
- Stopping before failure modes, validation, or deployment implications.