引用imranq · 2026-03
“explains why this works: Pre-LN causes deep transformer layers to converge toward identity functions”
解释为何有效:Pre-LN 使深层趋近恒等函数,中间层才真正计算
Pre-LN让深层近乎恒等,LayerNorm Scaling缓解之
论文提出“深度诅咒”:Llama、Mistral、DeepSeek、Qwen 等主流大模型中近一半的层不如预期有效。作者从理论和实验上认为原因是广泛使用的 Pre-Layer Normalization:它稳定了训练,但输出方差随深度指数增长,使深层 Transformer 块的导数近似单位矩阵,几乎不参与训练。为此提出 LayerNorm Scaling(LNS),把层归一化输出的方差按深度平方根的倒数缩放;在 130M 到 7B 的模型上,LNS 持续优于已有的归一化与缩放技术,并能延续到监督微调。
HN 评论者引它来解释为什么 Pre-LN 会让深层 Transformer 趋向恒等函数,因此真正的计算集中在中间层。
“explains why this works: Pre-LN causes deep transformer layers to converge toward identity functions”