Skip to main content
QUICK REVIEW

[论文解读] Phi-4 Technical Report

Marah Abdin, Jyoti Aneja|arXiv (Cornell University)|Dec 12, 2024
Advanced Research in Science and Engineering被引用 24
一句话总结

Phi-4 是一个 14B 参数的语言模型,通过大量合成数据、先进的数据筛选和新颖的后训练,在 STEM 推理基准上超越其 GPT-4o 老师,同时在小规模下保持有竞争力的表现。

ABSTRACT

We present phi-4, a 14-billion parameter language model developed with a training recipe that is centrally focused on data quality. Unlike most language models, where pre-training is based primarily on organic data sources such as web content or code, phi-4 strategically incorporates synthetic data throughout the training process. While previous models in the Phi family largely distill the capabilities of a teacher model (specifically GPT-4), phi-4 substantially surpasses its teacher model on STEM-focused QA capabilities, giving evidence that our data-generation and post-training techniques go beyond distillation. Despite minimal changes to the phi-3 architecture, phi-4 achieves strong performance relative to its size -- especially on reasoning-focused benchmarks -- due to improved data, training curriculum, and innovations in the post-training scheme.

研究动机与目标

  • 证明高质量合成数据在提高较小LLMs 的推理和问题解决能力中的必要性。
  • 提出一个结合合成数据生成、有机数据筛选和后训练改进的多阶段数据策略。
  • 证明数据质量与训练方案能够在推理基准上超越更大模型。
  • 显示证据表明 phi-4 在多项需要推理的任务上可匹配或超过更大基线,同时保持效率。

提出的方法

  • 开发一个 14B 解码器仅变换器,具备 4096 的上下文长度(在中期训练时扩展至 16K)以及多语言标记化。
  • 通过多种技术(多智能体提示、自我改写、指令反转、关键令牌策略)生成约 400B 未加权符号的合成数据。
  • 筛选并过滤高质量有机数据(网络、书籍、代码),以种子化合成生成并提高与推理任务的对齐。
  • 采用分阶段的训练方案,包含预训练、中期训练和后训练;根据消融和目标基准调整数据混合和课程设置。
  • 使用后训练方法包括改进的 SFT 数据集和带有关键令牌搜索的直接偏好优化(DPO),以引导输出朝向高精度推理和安全性。
Figure 1 : Average performance of different models on the November 2024 AMC-10 and AMC-12 tests. This is the average score (with maximum score 150) over the four tests on 100 runs with temperature $t=0.5$ . We chose $t=0.5$ to follow simple-evals [ 24 ] . Error bars are $2\sigma$ of the estimate. On
Figure 1 : Average performance of different models on the November 2024 AMC-10 and AMC-12 tests. This is the average score (with maximum score 150) over the four tests on 100 runs with temperature $t=0.5$ . We chose $t=0.5$ to follow simple-evals [ 24 ] . Error bars are $2\sigma$ of the estimate. On

实验结果

研究问题

  • RQ1数据为中心的合成数据训练配方如何影响 14B 模型的推理能力?
  • RQ2合成数据与优化后的后训练是否能够缩小与更大模型在 GPQA、MATH 等 STEM 基准上的差距?
  • RQ3哪些数据混合和课程设置能够最大化 phi-4 的长上下文推理与知识保持?
  • RQ4后训练方法(SFT、DPO、关键令牌搜索)对安全性、鲁棒性和对齐性有何影响?

主要发现

  • Phi-4 在与其规模相比的推理基准上取得较强的性能,包括在若干 STEM 任务中与更大模型的比较。
  • 合成数据是性能的核心驱动因素,通过有针对性的数据生成和中期训练的数据混合,提升长上下文和推理能力。
  • 后训练技术(修订的 SFT、带关键令牌搜索的 DPO、评估者引导的 DPO)进一步优化输出并增强对齐性与安全性。
  • 一种全新、考虑污染的评估方法表明 phi-4 的增益并非测试集泄露所驱动,包括在 fresh AMC-2024 比赛上的评估显示在数学基准上具有竞争力的结果。
  • 中期训练以扩展上下文长度(从 4K 到 16K)并结合长上下文数据,提升对长上下文任务的表现。
  • 数据消融研究表明优先使用合成数据和有针对性的高质量有机数据比均匀数据混合带来更好的推理提升,且后训练在知识与推理能力之间取得平衡。
Figure 2 : 5-shot MMLU score for phase 2 pretraining runs with 4 and 12 epochs of synthetic data. All models are trained for the same token horizon, thus the model with 4 epochs of synthetic has seen more (unique) web tokens. We see that despite many epochs on synthetic data, we do not see overfitti
Figure 2 : 5-shot MMLU score for phase 2 pretraining runs with 4 and 12 epochs of synthetic data. All models are trained for the same token horizon, thus the model with 4 epochs of synthetic has seen more (unique) web tokens. We see that despite many epochs on synthetic data, we do not see overfitti

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。