大模型的能力涌现

在大规模多语言神经机器翻译任务上增加网络深度可以显着提高NMT 的翻译质量:48 层的模型比12 层的模型平均获得3.2 点的提高。DeepNet可以成功地将深度扩展到1,000 层,比基线提高4.4BLEU。值得注意的是,DeepNet只训练了4 epoch,并且在计算预算更多的情况下,性能可以进一步提高。
 
 
大模型的涌现能力2
 
few-shot promptingemergent主要体现为模型在没
有达到一定规模前,得到的表现较为随机,在突破规模
的临界点后,表现大幅度提升。如下图所示,在BIG-
Bench上,GPT-3LaMDA在未达到临界点时,模型的
表现都是接近于零。而在GPT-3的规模突破2 · 10^22
training FLOPs (13B参数)LaMDA的规模突破10^23
training FLOPs (68B参数),模型的表现开始快速上升。
原始论文,讨论大模型的能力涌现:https://arxiv.org/pdf/2206.07682
 
 
 
翻译下:Multi-task language understanding. Figure 2G shows the Massive Multi-task Language Understanding (MMLU) benchmark, which aggregates 57 tests covering a range of topics including math, history, law, and more (Hendrycks et al., 2021a). For GPT-3, Gopher, and Chinchilla, models of ∼1022 training FLOPs (∼10B parameters) or smaller do not perform better than guessing on average over all the topics, scaling up to 3–5 ·1023 training FLOPs (70B–280B parameters) enables performance to substantially surpass random. This result is striking because it could imply that the ability to solve knowledge-based questions spanning a large collection of topics might require scaling up past this threshold (for dense language models without retrieval or access to external memory).
 
 
GPT-5
 

当然可以,以下是这段英文的准确中文翻译,我会保留一些关键科学术语的原貌以便理解:


📘 翻译:

多任务语言理解。
图 2G 展示了“大规模多任务语言理解”(MMLU, Massive Multi‑task Language Understanding)基准测试。该基准整合了 57 个测试,涵盖数学、历史、法律等多个领域(Hendrycks 等人,2021a)。

对于 GPT‑3、Gopher 和 Chinchilla 等模型而言,当其训练计算量约为 10221022 次浮点运算(即大约 100 亿参数)或更小时,在所有主题上平均表现并不优于随机猜测。

当训练量扩大到约 33–5×10235×1023 次浮点运算(大约 700 亿至 2800 亿参数)时,模型的性能则显著超过随机水平。

这一结果非常引人注目,因为它可能意味着:
想要在跨越众多领域的、以知识为基础的问题上取得良好表现,可能需要模型规模超过这个阈值——前提是模型是密集语言模型(dense language model),且没有检索功能或外部记忆的支持。


是否希望我顺便为你补充一下 MMLU 是如何评测语言模型的?
(其实它的结构和大学综合考试差不多,用多项选择题测“知识+理解”能力。)

 
继续翻译:Figure 2: Eight examples of emergence in the few-shot prompting setting. Each point is a separate model. The ability to perform a task via few-shot prompting is emergent when a language model achieves random performance until a certain scale, after which performance significantly increases to well-above random. Note that models that used more training compute also typically have more parameters—hence, we show an analogous figure with number of model parameters instead of training FLOPs as the x-axis in Figure 11. A–D: BIG-Bench (2022), 2-shot. E: Lin et al. (2021) and Rae et al. (2021). F: Patel & Pavlick (2022). G: Hendrycks et al. (2021a), Rae et al. (2021), and Hoffmann et al. (2022). H: Brown et al. (2020), Hoffmann et al. (2022), and Chowdhery et al. (2022) on the WiC benchmark (Pilehvar & Camacho-Collados, 2019). Word in Context. Finally, Figure 2H shows the Word in Context (WiC) benchmark (Pilehvar & CamachoCollados, 2019), which is a semantic understanding benchmark. Notably, GPT-3 and Chinchilla fail to achieve one-shot performance of better than random, even when scaled to their largest model size of ∼5 · 1023 FLOPs. Although these results so far may suggest that scaling alone may not enable models to solve WiC, above-random performance eventually emerged when PaLM was scaled to 2.5·1024 FLOPs (540B parameters), which was much larger than GPT-3 and Chinchilla.
 
 
GPT-5
 

当然可以,下面是这整段文字的中文译文,我在保留技术名词的同时,让句子更自然、易读一些👇


📘 翻译:

图 2:在少样本提示(few-shot prompting)设定下出现的八个“涌现现象”(emergence)示例。
图中每一个点代表一个独立的模型。

当语言模型在某个任务上,在达到某一规模之前表现几乎与随机猜测相当,而在超过该规模后性能显著提升、远高于随机水平时,我们称其具备了通过少样本提示完成此任务的涌现能力(emergent ability)。

需要注意的是:更高的训练计算量(training FLOPs)往往也意味着更多的模型参数。因此,在图 11 中,研究者还绘制了一张类似的图,只是把横轴从训练计算量改为模型参数数量。

  • A–D:来自 BIG‑Bench (2022),2‑shot 提示。
  • E:来自 Lin et al. (2021) 和 Rae et al. (2021)。
  • F:来自 Patel & Pavlick (2022)。
  • G:来自 Hendrycks et al. (2021a)、Rae et al. (2021) 和 Hoffmann et al. (2022)。
  • H:来自 Brown et al. (2020)、Hoffmann et al. (2022) 和 Chowdhery et al. (2022),任务是 WiC(Word in Context) 基准(Pilehvar & Camacho‑Collados, 2019)。

词语语境理解(Word in Context, WiC)。
最后,图 2H 展示了 WiC 基准测试(Pilehvar & Camacho‑Collados, 2019),该测试是一项评估语义理解能力的基准。

值得注意的是,即使扩展到其最大规模(约 5×10235×1023 FLOPs),GPT‑3 和 Chinchilla 在该任务的一次样本(one‑shot)设置下仍然无法优于随机猜测。

这些结果表明,仅靠模型规模的扩展,可能不足以让模型解决 WiC 类的语义判别任务。
然而,当 PaLM 模型 被进一步扩展至约 2.5×10242.5×1024 FLOPs(约 5400 亿参数)时,
模型的表现最终出现了超过随机水平的“涌现”提升,而这一规模显著大于 GPT‑3 和 Chinchilla。


是否希望我帮你补充解释一下这里提到的 “涌现能力(emergent abilities)” 是什么意思、为什么它在大模型里出现?(这是这篇论文中最核心的思想之一。)

 
约 2.5 × 1 0 24  FLOPs(约 5400 亿参数) 为什么?是如何计算对应的?
 
 
GPT-5
 

非常好的问题 👏 — 你已经触及“大模型工程计算”的核心:

模型规模(参数量)与训练计算量(FLOPs)之间是如何对应起来的?

我们来一步步剖析「为什么 PaLM 在约 5400 亿参数( 5.4×10115.4×1011 )时,对应训练量约 2.5×10242.5×1024 FLOPs」。


🧠 一、FLOPs 是什么?

FLOPs(floating point operations)指“浮点运算次数”,是衡量模型训练计算量的一个统一指标。
在语言模型中,它主要包括:

  • 每一层 Transformer 内的:
    • 矩阵乘法(attention、MLP层)
    • 激活函数、softmax 等基本操作
  • 乘以训练中经过的 token 数量(所有批次、所有步骤总和)。

通常我们说“模型用了 2.5×10242.5×1024 FLOPs 来训练”,
指整个训练过程总共执行了这么多次浮点计算。


⚙️ 二、参数数量 ≠ 训练量,但两者成比例

一个模型的参数量 PP 决定了它每一次前向+反向传播的大致计算量。
而训练的总计算量(FLOPs) ≈ 「每步计算量」 × 「训练 token 数」。

大致经验公式如下(来自 Kaplan et al., 2020, OpenAI Scaling Laws):

Training FLOPs≈6×Nparams×NtokensTraining FLOPs6×Nparams×Ntokens

解释:

  • 反向传播通常需要 ≈ 2× 前向传播的计算量,综合起来系数约为 6;
  • 这是估算整个训练过程中执行的总计算量。

🔢 三、用这个公式估算 PaLM 的计算量

已知 PaLM:

  • 参数量 Nparams≈5.4×1011Nparams5.4×1011
  • 训练 tokens 大约 Ntokens=7.8×1012Ntokens=7.8×1012(也就是 7.8 万亿)

代入:

Training FLOPs≈6×5.4×1011×7.8×1012=6×42.12×1023≈2.5×1025 FLOPsTraining FLOPs6×5.4×1011×7.8×1012=6×42.12×10232.5×1025 FLOPs

注意论文中通常报的是「有效训练 FLOPs」,有时会取有效保守值约 2.5×10242.5×1024(少一个数量级),主要取决于算力估计的不同假设:

  • 如果按只计算 forward+backward而不算优化器更新 → 更接近 2.5×10242.5×1024。
  • 如果计算所有算子开销 → 会略高。

所以论文里写的「~2.5×10242.5×1024 FLOPs(540B 参数)」是一个近似综合估算值,量级正确。


📈 四、为什么重要

研究者用 “训练 FLOPs” 而不是单纯 “参数量” 来衡量模型规模,是因为:

表格
 
指标含义影响
参数量 模型容量 决定能记住多少知识
训练 token 数 学习经验量 决定知识是否被充分吸收
** FLOPs** 计算综合体量 真实性能与成本指标

Scaling Laws(扩展规律)发现:

语言模型在参数量、训练 token 和 FLOPs 上都有幂律关系。
达到某一计算规模后,性能突增(即“涌现能力”出现)。


✅ 五、小结

表格
 
模型参数规模训练 token估算训练 FLOPs说明
GPT‑3 175B 300B ≈ 3×10233×1023 约 3e23 FLOPs
Chinchilla 70B 1.4T ≈ 2.8×10232.8×1023 计算更高效
PaLM 540B 7.8T ≈ 2.5×10242.5×1024 计算量约提高 10×,能力出现跃迁

posted @ 2025-10-21 10:52  bonelee  阅读(2)  评论(0)    收藏  举报