技术分享·Oct 28, 2026Transformer(6) - LayerNormattention 输出的长度取决于注意力有多集中,不同 token 之间能差好几倍。LayerNorm 把每个 token 的向量拉回均值 0、方差 1,这一篇只说它怎么算、按什么方向统计。