FDEInterviews logo
LLM & GenAI Fundamentals / 48
hardOpenAIAnthropicGoogle

Pre-norm vs post-norm transformers: why do large models use pre-norm, and how does it affect training stability?

Where you put the LayerNorm changes whether gradients survive a hundred layers. Pre-norm keeps a clean residual highway and well-scaled gradients so deep models train without warmup heroics; post-norm normalizes the output but fights vanishing gradients at depth.

Updated Aug 2026 · Grounded in real Forward Deployed Engineer interview loops and written to a senior-engineer editorial bar.

Where you put the LayerNorm changes whether gradients survive a hundred layers. Pre-norm keeps a clean residual highway and well-scaled gradients so deep models train without warmup heroics; post-norm normalizes the output but fights vanishing gradients at depth.

20 answers per topic instead of 10, plus saved progress and bookmarks · no cardor unlock all 523 remaining answers · ₹2,000 / $25
UP NEXT ON YOUR JOURNEY
FEDITOR'S NOTE

The screen is whether the candidate understands that pre-norm leaves an unnormalized identity path through the residual stream (so gradients flow cleanly to early layers) while post-norm normalizes after the residual add, putting a LayerNorm in the backward path of every layer and making deep stacks gradient-unstable without careful warmup/init. The reserved follow-up: 'what does pre-norm cost you, and what does a final LayerNorm or QK-norm fix.' Saying 'pre-norm is just more stable' without naming the residual-path argument is shallow. Bonus if they mention pre-norm's representation-collapse tradeoff and why some models add extra norms back.

DISCUSSION · 0

No comments yet — be the first to share your approach.