Peri-LN: Revisiting Normalization Layer in the Transformer Architecture
Jeonghoon Kim, Byeongchan Lee, Cheonbok Park, Yeontaek Oh, Beomjun Kim, Taehwan Yoo, Seongjin Shin, Dongyoon Han, Jinwoo Shin, Kang Min Yoo
TL;DR
The paper analyzes how layer normalization placement—Post-LN, Pre-LN, and a proposed Peri-LN—shapes activation variance and gradient flow in large-scale Transformers. Through analytical bounds and extensive experiments up to 3.2B parameters, it demonstrates that Peri-LN consistently yields better variance control, steadier gradients, and greater training stability than the conventional LN placements. It also discusses practical implications for precision and hyperparameter robustness, showing Peri-LN reduces instability and improves benchmark performance, including instruction tuning. Overall, Peri-LN is presented as a unifying, effective normalization strategy that merits broader adoption in future large-scale Transformer architectures.
Abstract
Selecting a layer normalization (LN) strategy that stabilizes training and speeds convergence in Transformers remains difficult, even for today's large language models (LLM). We present a comprehensive analytical foundation for understanding how different LN strategies influence training dynamics in large-scale Transformers. Until recently, Pre-LN and Post-LN have long dominated practices despite their limitations in large-scale training. However, several open-source models have recently begun silently adopting a third strategy without much explanation. This strategy places normalization layer peripherally around sublayers, a design we term Peri-LN. While Peri-LN has demonstrated promising performance, its precise mechanisms and benefits remain almost unexplored. Our in-depth analysis delineates the distinct behaviors of LN strategies, showing how each placement shapes activation variance and gradient propagation. To validate our theoretical insight, we conduct extensive experiments on Transformers up to $3.2$B parameters, showing that Peri-LN consistently achieves more balanced variance growth, steadier gradient flow, and convergence stability. Our results suggest that Peri-LN warrants broader consideration for large-scale Transformer architectures, providing renewed insights into the optimal placement of LN.
