Which design choices from the original 'Attention Is All You Need' are no longer standard?
The 2017 Vaswani transformer is a recognizable ancestor of modern LLMs but four of its ingredients were swapped between 2018 and 2024: post-norm became pre-norm, sinusoidal PE became RoPE, ReLU became SwiGLU, and
Think of the 2017 transformer like a 2017 sports car. Same number of wheels, same shape of the body, same idea of how the engine sits up front. But over the next ten years they swapped the fuel injection (sinusoidal positions became RoPE), the engine block (ReLU became SwiGLU), where the cooling system sits (post-norm became pre-norm), and how many cylinders share a spark plug (MHA became GQA). The car still looks like a car. The two-seat layout, the chassis, the four-wheel arrangement, those did not change. That is the block recipe. The interview trap option says the chassis got rebuilt; it did not.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
4 min: four real swaps (post-norm→pre-norm, sinusoidal→RoPE, ReLU→SwiGLU, MHA→GQA) + the LayerNorm→RMSNorm bonus + identify the trap option (block recipe unchanged) + articulate the 'recipe stable, ingredients evolved' framing.
| Component | Vaswani 2017 | Modern 2026 (Llama/Mistral) |
|---|---|---|
| Block recipe | Attention + FFN, each residual-wrapped | Attention + FFN, each residual-wrapped (unchanged) |
| Norm placement | Post-norm | Pre-norm |
| Norm function | LayerNorm | RMSNorm |
| Positional encoding | Sinusoidal absolute, added to input | RoPE, applied inside attention |
| FFN activation | ReLU | SwiGLU |
| Attention variant | Multi-head attention | Grouped-query attention or MLA |
| Overall structure | Encoder-decoder | Decoder-only |
Real products, models, and research that use this idea.
- Llama 3.1 8B: pre-norm, RoPE (with NTK-aware scaling for 128k context), SwiGLU FFN, GQA (8 KV heads for 32 query heads), RMSNorm. Every Vaswani 2017 ingredient swapped.
- Mistral Large 3: pre-norm, RoPE, SwiGLU, GQA, RMSNorm. Same swap inventory.
- DeepSeek V4: pre-norm, RoPE, SwiGLU, MLA (instead of GQA), RMSNorm. The MoE replaces some FFN sublayers but the block recipe is otherwise unchanged.
- Vaswani 2017 (original): post-norm, sinusoidal PE, ReLU FFN, full MHA, LayerNorm. Every ingredient on the swap list.
What an interviewer would ask next. Try answering before peeking at the approach.
QIf pre-norm is so much better than post-norm at depth, why did Vaswani 2017 use post-norm?
QWhat is the structural difference between RoPE and learned absolute positional embeddings (used in GPT-2 and BERT)?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Including the block recipe itself as 'no longer standard'. It is the single most stable design in deep learning; every modern LLM still uses the attention then FFN two-sublayer template wrapped in residuals.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
- Vaswani et al., Attention Is All You Need (2017)
- Xiong et al., On Layer Normalization in the Transformer Architecture (2020)
- Su et al., RoFormer: Enhanced Transformer with Rotary Position Embedding (2021)
- Shazeer, GLU Variants Improve Transformer (2020)
- Ainslie et al., GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints (2023)
Same topic, related formats. Practice these next.