DeepSeekMath:推动开源语言模型数学推理的极限

DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models

邵智宏 Zhihong Shao · DeepSeek · 2024-02-05 · arXiv:2402.03300 ↗ · 被引 7381

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

数学推理因其复杂和结构化的特性,对语言模型构成了重大挑战。本文介绍了 DeepSeekMath 7B,该模型在 DeepSeek-Coder-Base-v1.5 7B 的基础上,使用来自 Common Crawl 的 1200 亿数学相关 token 以及自然语言和代码数据继续进行预训练。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.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 15)

阅读逐段中英对照全文 →