AIToday
Large Language ModelsQiita 機械学習Published: Nov 29, 2026, 01:00 JST

Peri-LN beats Pre-LN at 400M–3.2B, normalization memo finds

Send on LINE
Peri-LN beats Pre-LN at 400M–3.2B, normalization memo finds

3 Key Points

  1. What happened

    A Qiita literature memo compares three ways of placing normalization layers in Transformers: Pre-LN (Xiong2020), Sandwich-LN (Ding2021) and Peri-LN (Kim2025). It reports that Peri-LN pretrained at 400M, 1.5B and 3.2B parameters on 30B tokens with lower loss than Post-LN or Pre-LN.

  2. Why it matters

    The memo argues Sandwich-LN and Peri-LN add the same normalization layer at the sub-layer exit, differing mainly in motivation and analysis, so teams choosing a placement can treat them as close relatives rather than separate designs.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The memo frames normalization placement as a long-running design question in Transformer training. It traces Pre-LN back to earlier work by Baevski & Auli, Child et al. and Wang et al., which used the placement to ease training of deep models but still relied on warmup; Xiong2020 showed Pre-LN could drop warmup, reaching comparable performance faster and about 40% faster in BERT pretraining.

Sandwich-LN emerged from CogView's effort to train a 4B-parameter text-to-image model in FP16, where a Pre-LN model hit NaN loss within 1,000 iterations and values in output-side layers exploded to $10^4 \sim 10^5$. Adding a LayerNorm before the residual join kept input scales in range, and with PB-relax it enabled stable training of CogView and an 8.3B-parameter CogView-large, while PB-relax alone also resolved overflow in a 10B-parameter GLM.

Peri-LN then revisited the question at scale: tracking hidden-state variance from initialization through training showed Pre-LN variance growing exponentially and producing massive activations, while an exit-side normalization bounded the gradient norm. Across 400M, 1.5B and 3.2B parameter models trained on 30B tokens over 5 seeds, Peri-LN reported lower loss, fewer gradient-norm spikes, higher benchmark averages and less than half the seed-to-seed standard deviation. The memo also notes DeepNet's counterpoint that large output-side gradients alone do not explain Post-LN instability, suggesting the debate over why placements matter is not fully settled.

FAQ
What is the difference between Sandwich-LN and Peri-LN?
Both add a normalization layer at the sub-layer exit before the residual connection joins. Sandwich-LN focuses on FP16 numerical overflow observed during training, while Peri-LN tracks hidden-state variance and analyzes gradient norms.
What results does Peri-LN report?
Pretraining 400M, 1.5B and 3.2B parameter models on 30B tokens over 5 seeds, Peri-LN had lower loss than Post-LN and Pre-LN at every scale, with far fewer gradient-norm spikes and divergences.
Does Pre-LN really remove the need for warmup?
The memo says Pre-LN reached comparable performance to Post-LN with warmup faster, including about 40% speedup in BERT pretraining. It also notes a later paper, DeepNet, disputes the explanation that large gradients in output-side layers alone cause Post-LN instability.
Qiita 機械学習Read Original Article
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleJP Morgan: 24 million knowledge jobs at AI risk by 2031