
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.
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.
Summaries like this, every morning.
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.
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 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.
On the Hard Fork podcast, Terence Tao described "Big Math," where human-AI teams systematically map thousands…

LG AI Research is automating data preparation, building expert foundation models, and setting up an autonomous…

SemiAnalysis posted that GPT-6.2 Sol scored 11.5% on its GDPx benchmark at $9.22 per task, within half a point…

Google Deepmind created "Humanity's First Exam" to measure AI reliability rather than peak performance, and ea…

A researcher sent unique trackable URLs inside prompts to MiniMax models via OpenRouter between July and Octob…

Kong AI Cost Management records per-request costs reported by the AI Gateway; without a model price at runtime…
