NormFormer: Improved Transformer Pretraining with Extra Normalization
Sam Shleifer, Jason Weston, Myle Ott

TL;DR
NormFormer introduces additional normalization steps in transformer layers to address gradient mismatch issues, leading to faster and more effective pretraining and improved downstream task performance with minimal computational overhead.
Contribution
The paper proposes NormFormer, a novel architecture that adds three normalization operations to each transformer layer, significantly enhancing training efficiency and model performance.
Findings
Faster convergence in pretraining (up to 24%)
Improved downstream task performance (up to 1.9% on GLUE)
Negligible increase in computational cost (+0.4% parameters)
Abstract
During pretraining, the Pre-LayerNorm transformer suffers from a gradient magnitude mismatch: gradients at early layers are much larger than at later layers. These issues can be alleviated by our proposed NormFormer architecture, which adds three normalization operations to each layer: a Layer Norm after self attention, head-wise scaling of self-attention outputs, and a Layer Norm after the first fully connected layer. The extra operations incur negligible compute cost (+0.4% parameter increase), but improve pretraining perplexity and downstream task performance for both causal and masked language models ranging from 125 Million to 2.7 Billion parameters. For example, adding NormFormer on top of our strongest 1.3B parameter baseline can reach equal perplexity 24% faster, or converge 0.27 perplexity better in the same compute budget. This model reaches GPT3-Large (1.3B) zero shot…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
- 🤗laion/CLIP-ViT-L-14-laion2B-s32B-b82Kmodel· 275k dl· ♡ 63275k dl♡ 63
- 🤗lysandre/CLIP-ViT-L-14-laion2B-s32B-b82Kmodel· 39 dl39 dl
- 🤗igotech/text2imagemodel
- 🤗ericlewis/CLIP-ViT-L-14-laion2B-s32B-b82Kmodel· 6 dl6 dl
- 🤗1xiaozhu/CLIP-ViT-L-14-laion2B-s32B-b82Kmodel· 29 dl29 dl
- 🤗gd20031029/CLIP-ViT-L-14-laion2B-s32B-b82Kmodel· 30 dl30 dl
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsTopic Modeling · Speech Recognition and Synthesis · Domain Adaptation and Few-Shot Learning
MethodsLayer Normalization · Dense Connections · Position-Wise Feed-Forward Layer · NormFormer
