LearnBenchStart learning →

AI Research Scientist · Transformer Architecture Components

Layer normalization mechanics

Real lesson card · Page 1 of 4

Layer normalization mechanics

LayerNorm sublayer

LayerNorm is applied around each attention block and each feed-forward block — normalizing either the block’s input before it runs (pre-norm) or the residual sum just after the block’s output rejoins the stream (post-norm).
Example
One transformer layer has two LayerNorms: one wrapping self-attention, one wrapping the feed-forward block.

Recall check from the same lesson

In a pre-norm transformer block, LayerNorm is applied to the input before it enters the attention or feed-forward sublayer, and the raw unnormalized input is what gets added into the residual sum.

Sources

· Editorial policy

One sitting · 20–30 minutes

A focused session on your AI Research Scientist interview

LearnBench starts from what you already know — skip what you have, master what you’re missing.

Start now

More Transformer Architecture Components questions