TL;DRNormalization layers (batch, layer norm) stabilize and speed up training.
Deep nets train better when activations stay well-scaled. Batch norm normalizes across a batch (great for CNNs, but batch-dependent). Layer norm normalizes across features within one example (batch-independent — the standard in transformers). They reduce sensitivity to initialization and learning rate, letting you train deeper, faster. Layer norm is why transformers train stably at scale.
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>batch norm: normalize across the batch (CNNs)
layer norm: normalize across features (one example)
→ transformers use layer norm (batch-independent)</pre></body></html>