DeepSeek-Prover-V2-671B 简介、下载、体验、微调、数据集:专为数学定理自动证明设计的超大垂直领域语言模型(在线体验地址)

DeepSeek-Prover-V2-671B 最新发布:专为数学定理自动证明设计的超大语言模型

体验地址Hugging Face 在线体验
推荐入口Novita 平台直达链接(含邀请码)


一、模型简介

DeepSeek-Prover-V2-671B 是 DeepSeek 团队于 2025 年4月30日发布的开源超大垂直领域语言模型,专为在 Lean 4 语言中进行数学定理的形式化证明(formal theorem proving)而打造。该模型是 DeepSeek-V3 架构的继承者,采用冷启动推理数据合成与强化学习相结合的训练策略,成功将非形式化数学推理与形式化证明能力融合为一体。


二、技术亮点概览

1. 冷启动推理数据合成

DeepSeek-Prover-V2 通过一个递归推理流程合成"冷启动数据":

  • 使用 DeepSeek-V3 拆解复杂定理为一系列子目标(subgoals);
  • 利用较小的 7B 规模模型生成每个子目标的 Lean 4 形式化证明;
  • 将这些步骤组合为完整证明,并结合 DeepSeek-V3 的思路链(chain-of-thought)形成训练样本。

2. 强化学习提升推理泛化

在冷启动数据的基础上,模型进一步经过强化学习微调:

  • 通过难题的子目标解构,组合完成的定理证明;
  • 使用"对错"二分类反馈(binary correct/incorrect)作为强化信号;
  • 大幅提升模型处理复杂逻辑结构的能力。

三、权威评测成果

数据集 表现
MiniF2F-test 88.9% 通过率
PutnamBench 解出 49/658 道高难度数学题

这些结果表明 DeepSeek-Prover-V2-671B 在神经网络定理证明领域中达到了当前最先进水平。


四、ProverBench:覆盖高中到大学的数学题集

团队同步发布了专用评测数据集 ProverBench,共计 325 道题,题目来源涵盖:

  • AIME 24/25 竞赛题(15题)
  • 初等代数、数论、线性代数、微积分等主流教材题(310题)
数学领域 题量
数论 40
微积分 90
线性代数 50
高中竞赛题 15
抽象代数、实分析等 若干

五、模型与数据开放获取

模型名称 下载地址
DeepSeek-Prover-V2-7B Hugging Face
DeepSeek-Prover-V2-671B Hugging Face
数据集名称 下载地址
ProverBench Hugging Face

六、快速使用示例(基于 Transformers)

模型可直接接入 Hugging Face Transformers 框架进行使用,以下为 Lean 4 数学题自动证明示例(使用 7B 或 671B 均可):

python 复制代码
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
torch.manual_seed(30)

model_id = "DeepSeek-Prover-V2-7B"  # or DeepSeek-Prover-V2-671B
tokenizer = AutoTokenizer.from_pretrained(model_id)

formal_statement = """
import Mathlib
import Aesop

set_option maxHeartbeats 0

open BigOperators Real Nat Topology Rat

/-- What is the positive difference between $120\%$ of 30 and $130\%$ of 20? Show that it is 10.-/
theorem mathd_algebra_10 : abs ((120 : ℝ) / 100 * 30 - 130 / 100 * 20) = 10 := by
  sorry
""".strip()

prompt = """
Complete the following Lean 4 code:

```lean4
{}
/```

Before producing the Lean 4 code to formally prove the given theorem, provide a detailed proof plan outlining the main proof steps and strategies.
The plan should highlight key ideas, intermediate lemmas, and proof structures that will guide the construction of the final formal proof.
""".strip()

chat = [
  {"role": "user", "content": prompt.format(formal_statement)},
]

model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", torch_dtype=torch.bfloat16, trust_remote_code=True)
inputs = tokenizer.apply_chat_template(chat, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)

import time
start = time.time()
outputs = model.generate(inputs, max_new_tokens=8192)
print(tokenizer.batch_decode(outputs))
print(time.time() - start)

七、总结

DeepSeek-Prover-V2-671B 是首个同时在 数学语言理解、链式推理与形式化构造 三方面取得全面突破的开源大模型。其精度、上下文理解能力和复杂任务适配性,已然跻身世界顶级 AI 推理系统之列。

推荐用途:大学级数学自动化解题系统、AI 辅助证明系统、Lean 4 数学研究平台、数学教育工具开发等。


相关推荐
AI袋鼠帝25 分钟前
开源「仓颉.Skill」2.0,你现在可以蒸馏任何视频!
开源·aigc
AI袋鼠帝29 分钟前
懂事的Agent已经自己看屏幕干活了!效率起飞~
aigc
冬奇Lab11 小时前
Workflow 系列(03):状态管理——持久化、幂等性与版本绑定
人工智能·工作流引擎
冬奇Lab12 小时前
每日一个开源项目(第146篇):openpilot - 开源自动驾驶辅助系统,曾在 Consumer Reports 评测中超过特斯拉 Autopilot
人工智能·开源·自动驾驶
threerocks12 小时前
一用一个不吱声的视频解析 Skill,你值得拥有
aigc·ai编程
吴佳浩13 小时前
AI 工程师知识地图:模型格式、框架、部署工具一次讲明白
人工智能·aigc·ai编程
IT_陈寒13 小时前
Java的Date类又坑了我一次,改用时间戳真香
前端·人工智能·后端
码农胖大海14 小时前
AI额度不够用的解决方案
人工智能
后端小肥肠14 小时前
小红书虚拟商品怎么做?我先用 Skill 跑通了壁纸品类
人工智能·aigc·agent