Spot the error: 'Pre-norm and post-norm are interchangeable, just a stylistic choice'
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Click any words you think contain an error. Click again to unmark.
Calling pre-norm and post-norm 'interchangeable' is wrong. Pre-norm keeps the residual an identity path; post-norm rescales it.
Imagine a relay race where each runner adds their effort to a baton's weight. Pre-norm weighs each runner's contribution before they add it to the baton, so the baton's weight only grows by what each runner could carry. Post-norm weighs the baton *after* the addition, which means the baton's total weight gets rescaled at every handoff. If the rescaling is even slightly off, the baton either grows or shrinks across many handoffs; by runner 30, the race is ruined. Pre-norm avoids this by leaving the baton alone and only weighing the addition. Calling these two strategies 'interchangeable' misses why pre-norm trains stably past 100 runners and post-norm falls apart past 20.
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.
3 min: name the equations, explain the identity-vs-rescaled residual, give the depth-cliff number (~20 layers), confirm modern LLMs use pre-norm.
| Property | Post-norm (2017 original) | Pre-norm (GPT-2+) |
|---|---|---|
| Block equation | `LayerNorm(x + Sublayer(x))` | `x + Sublayer(LayerNorm(x))` |
| Residual path | Rescaled at every layer | Identity (untouched) |
| Gradient behavior | Multiplicative chain | Identity-plus-delta chain |
| Trains to ~20 layers | Needs careful warmup | Trivial |
| Trains to 100+ layers | Routinely diverges | Stable with minimal warmup |
| Used by 2026 LLMs | None (DeepNet research only) | All (Llama, Mistral, Qwen, Claude, GPT) |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Treating norm placement as cosmetic. The choice changes whether the residual path is an identity (pre-norm) or gets rescaled at every layer (post-norm), which determines depth stability.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.