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 数学研究平台、数学教育工具开发等。


相关推荐
汤姆宝库20 小时前
蒸馏的三层实现:logits级、序列级与数据级
人工智能·深度学习·机器学习
双鬼带单21 小时前
轻松实现 Token 自由(一):Magpie + WPS灵犀
aigc·ai编程·aiops
云半S一21 小时前
Agent学习总结补充:2
人工智能·经验分享·笔记·agent·学习分享
wflynn1 天前
Inkling 2 Mini:26B 参数循环 Transformer 的本地多模态模型
人工智能·ai
hryou09221 天前
模型已经会欺骗评估员?24人爆料,OpenAI为何考虑停训
人工智能·ai编程
Csvn1 天前
Agent 能调工具那天,权限就该已经修好了——最小权限 + 人工确认(S03)
人工智能·aigc·agent
Eyfcom1 天前
〖物流低代码实战 06〗AI 生成 Schema 的工程边界:大模型能否直接接管快递软件的页面搭建?
人工智能·低代码·快递软件·物流低代码实战
甲维斯1 天前
GLM5.4和GPT6.1赛马,搞定超级玛丽32关!
人工智能
qyr67891 天前
全球汽车和航空航天用磁铁材料市场竞争格局变化趋势
大数据·人工智能·物联网·自动化·汽车和航空航天用磁铁材料