arXiv:2402.03300 · 中英对照阅读
DeepSeekMath:突破开放语言模型数学推理的极限
DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models
中文速览
让语言模型更会做复杂数学题、同时让开源模型追上闭源强者,是这项研究的核心目标。研究者先从海量网页中筛出高质量数学内容,建成含 1200 亿个数学词元的数据集,再用数学训练、解题示范微调和一种更省显存的强化学习方法 GRPO 来训练模型。最终,7B 版本在竞赛级 MATH 测试上取得 51.7% 的成绩,不用外部工具也接近 GPT-4 和 Gemini-Ultra;多次采样后成绩还能提高到 60.9%。这说明,精心筛选的数据和更高效的训练方法,能让较小的开源模型显著提升数学推理能力,也为训练其他领域的模型提供了可借鉴的思路。
摘要
由于数学推理具有复杂且结构化的特性,因此对语言模型构成了重大挑战。本文介绍了DeepSeekMath 7B,该模型在DeepSeek-Coder-Base-v1.5 7B的基础上继续进行预训练,使用了来自Common Crawl(CC)的1200亿个数学相关词元,以及自然语言和代码数据。DeepSeekMath 7B在竞赛级MATH基准测试中取得了令人瞩目的51.7%,且未依赖外部工具包和投票技术,表现已接近Gemini-Ultra和GPT-4的水平。对DeepSeekMath 7B的64个样本进行自一致性处理后,其在MATH上的得分达到60.9%。DeepSeekMath的数学推理能力归因于两个关键因素:首先,我们通过精心设计的数据筛选流程,充分发掘了公开网络数据的巨大潜力。其次,我们提出了组相对策略优化(GRPO),这是一种近端策略优化(PPO)的变体,能够增强数学推理能力,同时优化PPO的内存使用。
Mathematical reasoning poses a significant challenge for language models due to its complex and structured nature. In this paper, we introduce DeepSeekMath 7B, which continues pre-training DeepSeek-Coder-Base-v1.5 7B with 120B math-related tokens sourced from Common Crawl, together with natural language and code data. DeepSeekMath 7B has achieved an impressive score of 51.7% on the competition-level MATH benchmark without relying on external toolkits and voting techniques, approaching the performance level of Gemini-Ultra and GPT-4. Self-consistency over 64 samples from DeepSeekMath 7B achieves 60.9% on MATH. The mathematical reasoning capability of DeepSeekMath is attributed to two key factors: First, we harness the significant potential of publicly available web data through a meticulously engineered data selection pipeline. Second, we introduce Group Relative Policy Optimization (GRPO), a variant of Proximal Policy Optimization (PPO), that enhances mathematical reasoning abilities while concurrently optimizing the memory usage of PPO.
术语表
- DeepSeekMath
- DeepSeekMath
- DeepSeek-Coder-Base-v1.5 7B
- DeepSeek-Coder-Base-v1.5 7B
- DeepSeekMath-Base
- DeepSeekMath-Base
- DeepSeekMath-Instruct
- DeepSeekMath-Instruct
- DeepSeekMath Corpus
- DeepSeekMath语料库
- Common Crawl (CC)
- Common Crawl(CC)
- OpenWebMath
- OpenWebMath
- fastText-based classifier
- 基于fastText的分类器
- mathematical reasoning
- 数学推理
- large language model (LLM)
- 大语言模型(LLM)
- pre-training
- 预训练
- mathematical instruction tuning
- 数学指令微调
- chain-of-thought (CoT)
- 思维链(CoT)
- program-of-thought
- 程序思维
- tool-integrated reasoning
- 工具集成推理
- Group Relative Policy Optimization (GRPO)
- 组相对策略优化(GRPO)
- Proximal Policy Optimization (PPO)
- 近端策略优化(PPO)
- reinforcement learning (RL)
- 强化学习(RL)
- critic model
- 评论家模型
- Rejection Sampling Fine-Tuning (RFT)
- 拒绝采样微调(RFT)
- Direct Preference Optimization (DPO)
- 直接偏好优化(DPO)
- self-consistency
- 自一致性
- outcome supervision
- 结果监督
- process supervision
- 过程监督
- GSM8K
- GSM8K
- MATH
- MATH
- MMLU
- MMLU
- BBH
- BBH
- CMATH
- CMATH