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


相关推荐
aiqianji3 小时前
文风接近真人的AI生成短篇小说软件有哪些?
人工智能·python
甲维斯3 小时前
Opus5和gpt5.6修bug又干起来了!
人工智能
Oliver_NI3 小时前
RAG 检索为什么需要 Hybrid Search?从 Dense、BM25 到 Reranker
人工智能·agent
众人皆醒我独醉3 小时前
分布式训练与 Ring AllReduce:从单卡绝望到多卡协同
人工智能·面试·llm
昭阳3 小时前
4 个 vibe coding 项目,一个普通前端的半年
前端·人工智能·设计
阿古大王3 小时前
Youtube视频笔记工具怎么选:NoteAi、billNotes、NoteGPT 横向对比
人工智能
科技新资讯3 小时前
AIGC重构工业设计 一号设计解锁智造新势能
人工智能·重构·aigc
东方小月3 小时前
从零开发一个 Coding Agent(八):如何使用 Agent 类管理对话状态
前端·人工智能
这张生成的图像能检测吗4 小时前
(论文速读)基于鸡群算法变分模式分解的超低温振动传感器去噪
人工智能·信号处理·信号去噪·鸡群算法·模态分解