Walk through why pre-norm trains stably past 100 layers while post-norm needs warmup tricks
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Explain mechanically why pre-norm trains stably out to 100+ layers without warmup, while post-norm requires a careful learning rate schedule and tends to destabilize past about 20 layers.
Pre-norm keeps the residual stream as a pure identity path, so gradients flow through depth as a sum (not a product) of sublayer contributions.
Picture the residual stream as a highway running straight through the model from input to output. In pre-norm, every block is an exit ramp that adds a small correction back onto the highway, then merges back in. The highway itself never gets rescaled, it just keeps going. Gradients flowing backward have a clean, unobstructed lane to travel down, so even with 100 blocks the signal stays strong. In post-norm, every block puts up a toll booth on the highway itself, rescaling the whole stream after the merge. With 24 such toll booths the stream's scale starts drifting unpredictably and the model gets very hard to train. To make post-norm work past about 20 layers, engineers have to add learning-rate warmup that slowly lets the network find good early weights before the toll booths start interacting badly. Pre-norm avoids the toll booths altogether, which is why every modern LLM with more than a dozen layers uses it.
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.
5 min: state the structural difference, give the residual decomposition for each, explain the sum-vs-product gradient flow, mention the depth cliff and warmup, close with why modern LLMs all pick pre-norm.
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.
Believing pre-norm vs post-norm is just about where the LayerNorm symbol appears in the code. It is actually about whether the residual stream stays an identity path or gets rescaled at every block, which changes the gradient-norm behavior through depth.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.