Why is an additional final LayerNorm needed at the output of a pre-norm Transformer stack?

Last updated 22 November 2026

  • In pre-norm (x + F(LN(x))), LayerNorm sits only on the branch. The residual stream is a raw sum whose scale grows with depth.

  • A final LayerNorm restores a stable scale before the output head, keeping logits bounded and weight tying sensible (e.g. GPT-2's ln_f, LLaMA's final RMSNorm).

  • Post-norm doesn't need it because every block already ends with a normalization.

  • https://sushant-kumar.com/blog/normalization-in-transformer-based-llms
  • https://theorempath.com/compare/pre-norm-vs-post-norm
  • https://medium.com/@VectorWorksAcademy/pre-normalization-vs-post-normalization-in-transformers-e84872e0a3cd
All Transformers interview questions