Normalization 技术:从 LayerNorm 到 DeepNorm 的训练稳定性基石¶
更新日期:2026-04-17
一、为什么 Normalization 如此重要¶
1.1 没有 Normalization 的后果¶
深度 Transformer 在没有 normalization 时,梯度的方差会随层数指数增长或衰减。设网络有 \(L\) 层,每层残差变换为 \(x_{l+1} = x_l + F_l(x_l)\),则输出对输入的梯度为:
\(\frac{\partial x_L}{\partial x_0} = \prod_{l=0}^{L-1}\left(I + \frac{\partial F_l}{\partial x_l}\right)\)
当 \(\|\frac{\partial F_l}{\partial x_l}\| > 1\) 时梯度指数爆炸,\(< 1\) 时指数消失。Normalization 通过约束每层输出的统计量,将各层 Jacobian 的谱范数稳定在 1 附近。
1.2 Internal Covariate Shift:理论与反驳¶
Ioffe & Szegedy (2015) 提出 BatchNorm 时,将其成功归因于减少了 Internal Covariate Shift (ICS) — 每层输入分布因前层参数更新而持续漂移,迫使后层不断适应新分布。
然而 Santurkar et al. (2018) 通过严格实验否定了这一解释:
-
人为向 BatchNorm 后的激活注入随机分布偏移(显著增加 ICS),训练性能几乎不受影响
-
使用非归一化但固定分布的方法(如 \(\ell_p\) 约束),未减少 ICS 却同样加速训练
真正的原因:Loss Landscape 平滑化。Santurkar et al. 证明 normalization 使损失函数的 Lipschitz 常数和 \(\beta\)-smoothness 显著降低:
\(\|\nabla L(w_1) - \nabla L(w_2)\| \leq \beta \|w_1 - w_2\|\)
其中加入 normalization 后 \(\beta\) 更小,意味着梯度变化更平缓,优化器可以使用更大学习率而不震荡。
引用:How Does Batch Normalization Help Optimization? — Santurkar et al., NeurIPS 2018
1.3 Normalization 在 LLM 训练中的核心作用¶
二、Normalization 技术演进¶
flowchart LR
bn["BatchNorm<br/>2015<br/>沿 batch 维度"]
ln["LayerNorm<br/>2016<br/>沿 hidden 维度"]
rms["RMSNorm<br/>2019<br/>去掉均值, 只保 RMS"]
pre["Pre-LN<br/>2020<br/>放在残差前"]
deep["DeepNet<br/>2022<br/>1000 层稳定"]
bn --> ln --> rms
ln --> pre --> deep
classDef stage fill:#fff,stroke:#cc785c,color:#1a1a1a;
class bn,ln,rms,pre,deep stage
| 方法 | 归一化轴 | 训练 / 推理一致 | LLM 中的角色 |
|---|---|---|---|
| BatchNorm | batch | ✗ (需 running stats) | 几乎不用(受 batch size 影响) |
| LayerNorm | hidden | ✓ | GPT-⅔ 主流 |
| RMSNorm | hidden(无 mean) | ✓ | LLaMA / Qwen / DeepSeek 默认 |
| Pre-LN vs Post-LN | — | — | Pre-LN 更稳定,Post-LN 收敛更好但易爆 |
| DeepNorm | hidden + α 缩放 | ✓ | 千层网络稳定 |
引用:Batch Normalization — Ioffe & Szegedy, 2015 | Layer Normalization — Ba et al., 2016 | RMSNorm — Zhang & Sennrich, 2019 | DeepNet — Wang et al., 2022
三、LayerNorm 深度解析¶
3.1 公式与计算¶
给定输入向量 \(x \in \mathbb{R}^d\)(一个 token 的隐藏表示):
\(\text{LN}(x) = \gamma \odot \frac{x - \mu}{\sqrt{\sigma^2 + \epsilon}} + \beta\)
其中:
-
\(\mu = \frac{1}{d}\sum_{i=1}^d x_i\)(沿 hidden dimension 求均值)
-
\(\sigma^2 = \frac{1}{d}\sum_{i=1}^d (x_i - \mu)^2\)(沿 hidden dimension 求方差)
-
\(\gamma, \beta \in \mathbb{R}^d\) 为可学习的仿射参数
-
\(\epsilon \approx 10^{-5}\) 防止除零
def layer_norm(x, gamma, beta, eps=1e-5):
mu = x.mean(dim=-1, keepdim=True)
sigma2 = x.var(dim=-1, keepdim=True, unbiased=False)
x_hat = (x - mu) / torch.sqrt(sigma2 + eps)
return gamma * x_hat + beta
3.2 为什么 LayerNorm 取代了 BatchNorm¶
3.3 仿射参数 \(\gamma\) 和 \(\beta\) 的作用¶
归一化将激活约束到零均值、单位方差,但这过度限制了网络的表达能力。\(\gamma\) 和 \(\beta\) 重新引入了逐维度的缩放和偏移自由度:
-
\(\gamma\)(scale):允许每个隐藏维度有独立的尺度。恒等映射对应 \(\gamma = \mathbf{1}\)
-
\(\beta\)(bias):允许每个隐藏维度有独立的偏移。注意 现代 LLM 普遍去掉 \(\beta\)(如 LLaMA、GPT-NeoX),因为残差连接已提供了偏移能力,去掉 \(\beta\) 可减少参数量且实验表明对性能无影响
3.4 Pre-Norm vs Post-Norm¶
Post-Norm(原始 Transformer, BERT, GPT-2):
\(x_{l+1} = \text{LN}(x_l + \text{Sublayer}(x_l))\)
Pre-Norm(GPT-3, LLaMA, PaLM, DeepSeek, Qwen, Mistral):
\(x_{l+1} = x_l + \text{Sublayer}(\text{LN}(x_l))\)
梯度流分析¶
Post-Norm 的梯度:
对 Post-Norm,\(x_{l+1} = \text{LN}(x_l + F_l(x_l))\),反向传播时:
\(\frac{\partial x_{l+1}}{\partial x_l} = J_{\text{LN}} \cdot \left(I + \frac{\partial F_l}{\partial x_l}\right)\)
其中 \(J_{\text{LN}}\) 是 LayerNorm 的 Jacobian,形式为:
\(J_{\text{LN}} = \frac{\gamma}{\sigma}\left(I - \frac{1}{d}\mathbf{1}\mathbf{1}^T - \frac{\hat{x}\hat{x}^T}{d}\right)\)
关键问题:每层梯度都要经过 \(J_{\text{LN}}\),该矩阵的谱范数 \(< 1\)(因为它是一个投影矩阵去掉了两个方向),因此 \(L\) 层后梯度被衰减 \(L\) 次,深层梯度消失。
Pre-Norm 的梯度:
对 Pre-Norm,\(x_{l+1} = x_l + F_l(\text{LN}(x_l))\),反向传播时:
\(\frac{\partial x_L}{\partial x_0} = I + \sum_{l=0}^{L-1} \frac{\partial F_l}{\partial x_0} + \text{higher order terms}\)
关键优势:\(I\) 项提供了从输出到输入的 直接梯度通路(残差流),不经过任何 LayerNorm 的 Jacobian。深层的梯度信号可以无衰减地直接回传到浅层。
class PreNormTransformerBlock(nn.Module):
def __init__(self, d_model, n_heads, d_ff):
super().__init__()
self.attn_norm = RMSNorm(d_model)
self.ffn_norm = RMSNorm(d_model)
self.attn = MultiHeadAttention(d_model, n_heads)
self.ffn = FeedForward(d_model, d_ff)
def forward(self, x):
x = x + self.attn(self.attn_norm(x))
x = x + self.ffn(self.ffn_norm(x))
return x
class PostNormTransformerBlock(nn.Module):
def __init__(self, d_model, n_heads, d_ff):
super().__init__()
self.attn_norm = LayerNorm(d_model)
self.ffn_norm = LayerNorm(d_model)
self.attn = MultiHeadAttention(d_model, n_heads)
self.ffn = FeedForward(d_model, d_ff)
def forward(self, x):
x = self.attn_norm(x + self.attn(x))
x = self.ffn_norm(x + self.ffn(x))
return x
Pre-Norm vs Post-Norm 对比¶
引用:On Layer Normalization in the Transformer Architecture — Xiong et al., ICML 2020(Pre-Norm 收敛性分析)
四、RMSNorm¶
4.1 公式¶
\(\text{RMSNorm}(x) = \gamma \odot \frac{x}{\text{RMS}(x)}, \quad \text{RMS}(x) = \sqrt{\frac{1}{d}\sum_{i=1}^d x_i^2 + \epsilon}\)
与 LayerNorm 对比,RMSNorm 去掉了减均值(re-centering)和偏置 \(\beta\),仅保留除以 RMS 的 re-scaling 操作。
class RMSNorm(nn.Module):
def __init__(self, dim, eps=1e-6):
super().__init__()
self.eps = eps
self.weight = nn.Parameter(torch.ones(dim))
def forward(self, x):
rms = torch.sqrt(x.pow(2).mean(dim=-1, keepdim=True) + self.eps)
return self.weight * (x / rms)
4.2 为什么去掉均值中心化¶
Zhang & Sennrich (2019) 通过消融实验发现:
-
re-centering 不变性对 Transformer 几乎无贡献:将 LayerNorm 分解为 re-centering(减均值)和 re-scaling(除标准差)两个操作,单独去掉 re-centering 后训练损失几乎不变
-
激活值的均值本身就接近零:Transformer 中 residual stream 的激活经过多层残差叠加后,各维度均值的绝对值远小于方差,re-centering 的效果微乎其微
-
re-scaling 是 normalization 成功的核心:它控制了激活向量的范数,防止了梯度爆炸/消失
引用:Root Mean Square Layer Normalization — Zhang & Sennrich, NeurIPS 2019
4.3 速度优势:为什么快 10-15%¶
在 \(d = 4096\) 的典型 LLM 配置下,RMSNorm 相对 LayerNorm 的延迟节省约 10-15%(仅 norm 层本身)。对于整个 Transformer block,这一节省约占总计算量的 1-3%,但在千亿 token 训练中累积效果显著。
4.4 主流 LLM 的 RMSNorm 配置¶
五、QK-Norm¶
5.1 问题:Attention Logit 爆炸¶
在标准 attention 中,logit 为 \(s_{ij} = \frac{q_i^T k_j}{\sqrt{d_k}}\)。\(\sqrt{d_k}\) 的缩放假设 \(q, k\) 的各维度独立且方差为 1。但实际训练中:
-
\(Q = xW_Q\), \(K = xW_K\),随着训练进行,\(W_Q, W_K\) 的范数持续增长
-
\(\|q\|\) 和 \(\|k\|\) 随训练步数和模型深度单调递增
-
logit 的方差 \(\text{Var}(q^T k) \approx d_k \cdot \text{Var}(q_i) \cdot \text{Var}(k_j)\),当 \(\text{Var}(q_i), \text{Var}(k_j) > 1\) 时,\(\sqrt{d_k}\) 缩放不再足够
后果:softmax 输入出现极大值 → 注意力权重趋向 one-hot → entropy collapse → 梯度趋向零 → 训练崩溃或性能退化。
5.2 解决方案¶
在计算 attention score 前对 \(Q\) 和 \(K\) 施加归一化:
\(\text{Attn}(Q, K, V) = \text{softmax}\!\left(\frac{\text{Norm}(Q) \cdot \text{Norm}(K)^T}{\sqrt{d_k}}\right) V\)
其中 \(\text{Norm}\) 可以是:
-
RMSNorm(DeepSeek-V2/V3):对每个 head 的 \(q, k \in \mathbb{R}^{d_k}\) 分别做 RMSNorm
-
L2 Norm(Gemma 2):\(\hat{q} = q / \|q\|_2\),等价于将 \(q, k\) 投影到单位球面
class QKNormAttention(nn.Module):
def __init__(self, d_model, n_heads, d_k):
super().__init__()
self.n_heads = n_heads
self.d_k = d_k
self.W_Q = nn.Linear(d_model, n_heads * d_k, bias=False)
self.W_K = nn.Linear(d_model, n_heads * d_k, bias=False)
self.W_V = nn.Linear(d_model, n_heads * d_k, bias=False)
self.W_O = nn.Linear(n_heads * d_k, d_model, bias=False)
self.q_norm = RMSNorm(d_k)
self.k_norm = RMSNorm(d_k)
def forward(self, x):
B, T, _ = x.shape
Q = self.W_Q(x).view(B, T, self.n_heads, self.d_k).transpose(1, 2)
K = self.W_K(x).view(B, T, self.n_heads, self.d_k).transpose(1, 2)
V = self.W_V(x).view(B, T, self.n_heads, self.d_k).transpose(1, 2)
Q = self.q_norm(Q)
K = self.k_norm(K)
scale = self.d_k -0.5
attn = torch.matmul(Q, K.transpose(-2, -1)) * scale
attn = F.softmax(attn, dim=-1)
out = torch.matmul(attn, V)
out = out.transpose(1, 2).contiguous().view(B, T, -1)
return self.W_O(out)
5.3 谁在使用 QK-Norm¶
引用:Gemma 2 Technical Report — Google, 2024 | DeepSeek-V2 — DeepSeek-AI, 2024 | Scaling Vision Transformers to 22 Billion Parameters — Dehghani et al., 2023
5.4 Entropy Collapse 现象¶
无 QK-Norm 时,attention entropy 随训练演化:
\(H(\text{attn}) = -\sum_j p_j \log p_j\)
初始阶段 \(H \approx \log T\)(均匀分布),随训练进行 \(H\) 持续下降。在大模型深层中,\(H\) 可降至接近 0(一个 token 获得几乎全部注意力),此时:
-
该 head 有效退化为 "retrieval head",只看一个位置
-
梯度 \(\frac{\partial L}{\partial s_{ij}} = p_j(\delta_{ij} - p_i)\) 在 \(p\) 趋向 one-hot 时趋向零
-
head 丧失学习能力,成为 "dead head"
QK-Norm 通过约束 \(\|q\|, \|k\|\),使 logit 的量级始终保持在 \(\mathcal{O}(\sqrt{d_k})\),softmax 输出保持适度的 entropy。
六、DeepNorm¶
6.1 问题:Pre-Norm 的深层局限¶
Pre-Norm 虽然解决了梯度消失,但引入了新问题:当模型非常深(\(> 100\) 层)时,残差流中的信号随层数线性累积:
\(x_L = x_0 + \sum_{l=0}^{L-1} F_l(\text{LN}(x_l))\)
由于 \(\text{LN}\) 将每层的输入归一化到单位方差,\(F_l\) 的输出量级大致恒定。但 \(x_l\) 的范数随 \(l\) 线性增长,导致 \(\text{LN}(x_l)\) 对 \(x_l\) 中各层贡献的"稀释"越来越严重 — 深层的 \(F_l\) 对最终输出 \(x_L\) 的相对贡献趋于零。这就是 representation collapse。
6.2 DeepNorm 方案¶
Wang et al. (2022) 提出在 Post-Norm 框架下,通过缩放残差连接来恢复训练稳定性:
\(x_{l+1} = \text{LN}(\alpha \cdot x_l + \text{Sublayer}(x_l))\)
同时将 Sublayer 内部的特定权重矩阵初始化时缩放 \(\beta\):
-
Attention 层中 \(W_V, W_O\) 初始化为 \(\beta \cdot \mathcal{N}(0, \sigma)\)
-
FFN 层中第二层线性变换初始化为 \(\beta \cdot \mathcal{N}(0, \sigma)\)
6.3 \(\alpha\) 和 \(\beta\) 的推导¶
对于 \(L\) 层 Transformer(每层包含 attention + FFN 共 \(2L\) 个 sublayer):
\(\alpha = (2L)^{1/4}, \quad \beta = (8L)^{-1/4}\)
推导思路:要求初始化时 \(x_{l+1}\) 与 \(x_l\) 的方差保持不变。设 \(\text{Var}(x_l) = v\),Sublayer 输出方差为 \(\text{Var}(F_l) \approx \beta^2 v\)(因为权重缩放了 \(\beta\)),则:
\(\text{Var}(\alpha x_l + F_l) = \alpha^2 v + \beta^2 v\)
要求 \(\alpha^2 + \beta^2 \approx \alpha^2\)(即 \(F_l\) 在初始化时贡献很小),同时经过 \(2L\) 层后总方差不爆炸。具体推导需要分析 Post-Norm LN 的 Jacobian 与 \(\alpha\) 的交互,最终得到上述闭式解。
def deep_norm_init(model, num_layers):
alpha = (2 num_layers) * 0.25
beta = (8 num_layers) * -0.25
for layer in model.layers:
nn.init.xavier_normal_(layer.attn.W_Q.weight)
nn.init.xavier_normal_(layer.attn.W_K.weight)
layer.attn.W_V.weight.data *= beta
layer.attn.W_O.weight.data *= beta
nn.init.xavier_normal_(layer.ffn.w1.weight)
layer.ffn.w2.weight.data *= beta
return alpha
class DeepNormTransformerBlock(nn.Module):
def __init__(self, d_model, n_heads, d_ff, alpha):
super().__init__()
self.alpha = alpha
self.attn_norm = LayerNorm(d_model)
self.ffn_norm = LayerNorm(d_model)
self.attn = MultiHeadAttention(d_model, n_heads)
self.ffn = FeedForward(d_model, d_ff)
def forward(self, x):
x = self.attn_norm(self.alpha * x + self.attn(x))
x = self.ffn_norm(self.alpha * x + self.ffn(x))
return x
6.4 理论保证¶
Wang et al. 证明了在 DeepNorm 配置下,初始化时的模型更新是有界的:
\(\|x_L^{\text{DeepNorm}} - x_L^{\text{init}}\| = \mathcal{O}(\log L)\)
而标准 Post-Norm 为 \(\mathcal{O}(L)\),标准 Pre-Norm 也只是 \(\mathcal{O}(\sqrt{L})\)。对数增长意味着即使 1000 层,初始更新也是温和的。 引用:DeepNet: Scaling Transformers to 1,000 Layers — Wang et al., MSRA, 2022
七、Norm 的位置:架构决策¶
7.1 三种 Norm 放置策略¶
flowchart LR
subgraph post["Post-Norm (原始 Transformer)"]
direction LR
a1[x] --> a2[Sublayer] --> a3[Add] --> a4[LN] --> a5[out]
end
subgraph pre["Pre-Norm (现代主流)"]
direction LR
b1[x] --> b2[LN] --> b3[Sublayer] --> b4[Add] --> b5[out]
end
subgraph sand["Sandwich-Norm (CogView)"]
direction LR
c1[x] --> c2[LN] --> c3[Sublayer] --> c4[LN] --> c5[Add] --> c6[out]
end
classDef op fill:#fff,stroke:#cc785c,color:#1a1a1a;
classDef io fill:#f5f3eb,stroke:#bdb9ab,color:#1a1a1a;
class a1,a5,b1,b5,c1,c6 io
class a2,a3,a4,b2,b3,b4,c2,c3,c4,c5 op
7.2 Sandwich-Norm¶
CogView (Ding et al., 2021) 提出在 Pre-Norm 基础上,在 sublayer 输出后再加一层 LayerNorm:
\(x_{l+1} = x_l + \text{LN}_2(\text{Sublayer}(\text{LN}_1(x_l)))\) 引用:CogView: Mastering Text-to-Image Generation via Transformers — Ding et al., NeurIPS 2021
7.3 Norm 位置与学习率、模型规模的交互¶
7.4 最终 Norm (Final LN)¶
所有使用 Pre-Norm 的 LLM 在最后一层 Transformer block 之后、lm_head 之前,都会加一个额外的 RMSNorm/LayerNorm:
\(\text{logits} = \text{LN}(x_L) \cdot W_{\text{vocab}}\)
这是因为 Pre-Norm 的残差流是"未归一化的"(每层只在 sublayer 入口做 norm),最后一层的输出 \(x_L\) 的范数可能很大且不稳定。最终 LN 确保输入 lm_head 的表示具有一致的统计量。
八、实践指南¶
8.1 推荐配置¶
8.2 常见故障模式与排查¶
8.3 Fused Kernel 实现¶
生产级 RMSNorm 应使用融合 CUDA/Triton kernel,避免多次显存读写:
import triton
import triton.language as tl
@triton.jit
def rms_norm_kernel(X, Y, W, stride, N, eps,
BLOCK_SIZE: tl.constexpr):
row = tl.program_id(0)
X += row * stride
Y += row * stride
cols = tl.arange(0, BLOCK_SIZE)
mask = cols < N
x = tl.load(X + cols, mask=mask, other=0.0).to(tl.float32)
ms = tl.sum(x * x, axis=0) / N
rms = tl.sqrt(ms + eps)
x_hat = x / rms
w = tl.load(W + cols, mask=mask, other=1.0)
y = x_hat * w
tl.store(Y + cols, y.to(tl.float16), mask=mask)
def rms_norm_triton(x, weight, eps=1e-6):
out = torch.empty_like(x)
N = x.shape[-1]
BLOCK_SIZE = triton.next_power_of_2(N)
num_rows = x.numel() // N
rms_norm_kernel[(num_rows,)](
x, out, weight, x.stride(-2), N, eps,
BLOCK_SIZE=BLOCK_SIZE
)
return out
九、追问延伸¶
Q1: 为什么不在 embedding 层后就做 normalization?¶
一些模型确实这样做(如 Gemma 在 embedding 后乘以 \(\sqrt{d}\)),但大多数模型不在 embedding 后加 LN/RMSNorm。原因:embedding 的输出本身就是可学习的,其尺度可以通过训练自适应。加 norm 反而会破坏 embedding 空间中"距离等于语义相似度"的几何结构,因为 norm 会将所有 token 表示投影到同一超球面。
Q2: Pre-Norm 真的比 Post-Norm "弱" 吗?¶
理论上是的。Xu et al. (2019) 证明 Pre-Norm Transformer 的每层贡献随深度衰减,等效于一个更浅的网络。但实践中,Pre-Norm 的稳定性优势远大于表达力差距。且可以通过增加 hidden dim 来补偿。一个有趣的对比:同为 175B 参数,GPT-3 (Pre-Norm, 96 层, \(d=12288\)) 与假设的 Post-Norm 版本相比,Pre-Norm 的"有效深度"可能只有 ~60 层,但它能稳定训练完成,而 Post-Norm 版本很可能无法收敛。
引用:Understanding the Difficulty of Training Transformers — Xu et al., EMNLP 2020
Q3: RMSNorm 的 \(\gamma\) 初始化为全 1,训练后会怎样?¶
监控 LLaMA-7B 的 RMSNorm \(\gamma\) 分布发现:训练后 \(\gamma\) 值范围通常在 \([0.3, 3.0]\) 之间,分布近似对数正态。某些维度的 \(\gamma\) 显著偏离 1,说明这些维度确实需要不同于单位方差的尺度。这也是为什么不能直接去掉 \(\gamma\) — 去掉后性能明显下降。
Q4: 能否用 Group Normalization 替代 LayerNorm/RMSNorm?¶
理论上可以,但实践中 GroupNorm 将 hidden dim 分组后各组独立归一化,破坏了维度间的信息共享。Transformer 中不同维度之间有强相关性(由 attention 和 FFN 的线性变换产生),分组归一化会导致组间信息不一致。此外,GroupNorm 引入了分组数这一额外超参数,增加调参负担。
Q5: 未来方向¶
-
Dynamic Normalization:根据 token 的"重要性"自适应选择 norm 强度,避免对所有 token 一视同仁
-
Norm-free Architectures:如 NFNet (Brock et al., 2021) 在 CNN 中通过精心设计的初始化和 Scaled Weight Standardization 去掉了所有 norm 层,但在 Transformer 中尚未有成功案例
-
FP8 下的 Norm 精度:当前 RMSNorm 的 reduction 操作必须在 FP32 中完成以保证精度,这成为 FP8 训练的瓶颈之一
引用:High-Performance Large-Scale Image Recognition Without Normalization — Brock et al., ICML 2021
参考文献¶
-
Ioffe, S., & Szegedy, C. (2015). Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift. arXiv:1502.03167
-
Ba, J. L., Kiros, J. R., & Hinton, G. E. (2016). Layer Normalization. arXiv:1607.06450
-
Santurkar, S., Tsipras, D., Ilyas, A., & Madry, A. (2018). How Does Batch Normalization Help Optimization? NeurIPS 2018. arXiv:1805.11604
-
Zhang, B., & Sennrich, R. (2019). Root Mean Square Layer Normalization. NeurIPS 2019. arXiv:1910.07467
-
Xiong, R., Yang, Y., He, D., et al. (2020). On Layer Normalization in the Transformer Architecture. ICML 2020. arXiv:2002.04745
-
Xu, J., Sun, X., Zhang, Z., et al. (2020). Understanding the Difficulty of Training Transformers. EMNLP 2020. arXiv:2004.08249
-
Ding, M., Yang, Z., Hong, W., et al. (2021). CogView: Mastering Text-to-Image Generation via Transformers. NeurIPS 2021. arXiv:2105.13290
-
Wang, H., Ma, S., Dong, L., et al. (2022). DeepNet: Scaling Transformers to 1,000 Layers. arXiv:2203.00555
-
Dehghani, M., Djolonga, J., Mustafa, B., et al. (2023). Scaling Vision Transformers to 22 Billion Parameters. ICML 2023. arXiv:2302.05442
-
Touvron, H., Lavril, T., Izcard, G., et al. (2023). LLaMA: Open and Efficient Foundation Language Models. arXiv:2302.13971
-
Touvron, H., Martin, L., Stone, K., et al. (2023). Llama 2: Open Foundation and Fine-Tuned Chat Models. arXiv:2307.09288
-
DeepSeek-AI. (2024). DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Model. arXiv:2405.04434
-
Gemma Team, Google. (2024). Gemma 2: Improving Open Language Models at a Practical Size. arXiv:2408.00118
-
Brock, A., De, S., Smith, S. L., & Simonyan, K. (2021). High-Performance Large-Scale Image Recognition Without Normalization. ICML 2021. arXiv:2102.06171
-
DeepSeek-AI. (2024). DeepSeek-V3 Technical Report. arXiv:2412.19437
↑ 上级 · A. 基础理论