# DeepSeek-Prover-V2

> Open-weight Lean 4 theorem prover in 7B and 671B sizes, trained with RL for subgoal decomposition — 88.9% on miniF2F-test.

- Maker: DeepSeek
- Line: DeepSeek Prover
- Canonical page: https://ai-tldr.dev/models/deepseek-prover-v2/
- Updated: 2026-06-18

## In short

DeepSeek-Prover-V2 is DeepSeek's open-weight model line for formal mathematical theorem proving in the Lean 4 proof assistant, released on 30 April 2025. It costs $0.70 per million input tokens and $2.50 per million output tokens. You can use it through Novita AI and OpenRouter.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 164K (671B); 32K (7B) (max output Not separately specified) | [1] |
| Input price | $0.70 / 1M tokens | [2] |
| Output price | $2.50 / 1M tokens | [2] |
| Licence | DeepSeek Model License (code MIT) · open weights | [1] |
| Released | 30 April 2025 | [3] |
| Parameters | 671B total / ~37B active per token (671B MoE); 7B (dense) | [1] |
| Knowledge cutoff | Not disclosed | [1] |

## Sources

1. [DeepSeek-Prover-V2-671B — Hugging Face model card](https://huggingface.co/deepseek-ai/DeepSeek-Prover-V2-671B)
2. [Novita AI — API & pricing](https://novita.ai/models/model-detail/deepseek-deepseek-prover-v2-671b)
3. [DeepSeek-Prover-V2 — GitHub repository](https://github.com/deepseek-ai/DeepSeek-Prover-V2)

## Overview

DeepSeek-Prover-V2 is DeepSeek's open-weight model line for formal mathematical theorem proving in the Lean 4 proof assistant, released on 30 April 2025. It ships in two sizes: DeepSeek-Prover-V2-7B, a dense model built on DeepSeek-Prover-V1.5-Base with a 32K context, and DeepSeek-Prover-V2-671B, a Mixture-of-Experts model built on DeepSeek-V3-Base that activates roughly 37B of its parameters per token and inherits DeepSeek-V3's 163,840-token (164K) context window. Both produce machine-checkable Lean 4 proofs rather than free-text math.

The defining idea is reinforcement learning for subgoal decomposition. DeepSeek-V3 is prompted to break a hard theorem into a chain of subgoals and formalize each as a Lean 4 statement; once the smaller subgoals are proved, their proofs are recombined with the informal reasoning into a single chain-of-thought example. This 'cold-start' synthetic data trains the prover, and a follow-up RL stage with a binary correct/incorrect reward teaches it to connect natural-language reasoning to formal proof steps. The approach is described in the paper 'DeepSeek-Prover-V2: Advancing Formal Mathematical Reasoning via Reinforcement Learning for Subgoal Decomposition' (Ren et al., arXiv 2504.21801).

DeepSeek-Prover-V2-671B reaches state-of-the-art results among neural theorem provers, with an 88.9% pass ratio on the miniF2F-test benchmark and 49 of 658 problems solved on PutnamBench. DeepSeek also released ProverBench, a 325-problem evaluation set that includes 15 formalized AIME 2024-2025 competition problems. The weights are openly downloadable on Hugging Face (BF16 and FP8) under the DeepSeek Model License, and the 671B model is also served through hosted APIs such as Novita.

## Benchmarks

- miniF2F-test (pass ratio, 671B): 88.9% ([source](https://github.com/deepseek-ai/DeepSeek-Prover-V2))
- PutnamBench (problems solved, 671B): 49problems ([source](https://github.com/deepseek-ai/DeepSeek-Prover-V2))
- ProverBench AIME 24-25 (formalized, 671B): 6problems ([source](https://arxiv.org/abs/2504.21801))

## Pricing

- Input: $0.70 / 1M tokens per 1M tokens
- Output: $2.50 / 1M tokens per 1M tokens

Hosted-API pricing for DeepSeek-Prover-V2-671B on Novita AI (160K context). The model weights are also free to download and self-host from Hugging Face. DeepSeek does not list this model on its own first-party API.

Source: https://novita.ai/models/model-detail/deepseek-deepseek-prover-v2-671b

## Strengths

- State-of-the-art neural theorem proving: 88.9% pass ratio on miniF2F-test (671B)
- Produces fully machine-checkable Lean 4 proofs, not just informal math text
- Recursive subgoal decomposition lets it tackle hard problems by proving smaller pieces and recombining them
- Open weights (7B and 671B) on Hugging Face under the DeepSeek Model License — free to self-host
- 671B inherits DeepSeek-V3's efficient MoE backbone (~37B active params) and 164K context for long proofs
- Small 7B variant runs on far more modest hardware while still being a capable Lean 4 prover

## Best for

- Automated formal theorem proving and proof search in Lean 4
- Formalizing competition mathematics (e.g. AIME-style problems) into verifiable proofs
- Research on neural theorem proving, subgoal decomposition, and autoformalization
- Assisting mathematicians and Lean users with machine-checkable proof drafts
- Self-hosted formal-math tooling where open weights are required

## How to access

- [Novita AI](https://novita.ai/models/model-detail/deepseek-deepseek-prover-v2-671b) — model id `deepseek/deepseek-prover-v2-671b`
- [OpenRouter](https://openrouter.ai/deepseek/deepseek-prover-v2) — model id `deepseek/deepseek-prover-v2`

## DeepSeek Prover versions

- DeepSeek-Prover-V2 (30 April 2025) — this page
- [DeepSeek-Prover-V1.5](https://ai-tldr.dev/models/deepseek-prover-v1/) (August 2024)

## FAQ

### What is DeepSeek-Prover-V2?

It is DeepSeek's open-weight model line for formal theorem proving in the Lean 4 proof assistant, released on 30 April 2025. It generates machine-checkable Lean 4 proofs and comes in two sizes: a 7B dense model built on DeepSeek-Prover-V1.5-Base and a 671B Mixture-of-Experts model built on DeepSeek-V3-Base.

### How is it trained?

DeepSeek-V3 decomposes each hard theorem into subgoals and formalizes them in Lean 4; the proofs of the resolved subgoals are recombined with the informal reasoning into a chain-of-thought 'cold-start' dataset. The prover is fine-tuned on that data and then refined with a reinforcement-learning stage that rewards correct formal proofs, teaching it to bridge informal reasoning and formal proof construction.

### How well does it perform?

The 671B model reaches state-of-the-art neural-theorem-proving results: an 88.9% pass ratio on the miniF2F-test benchmark and 49 of 658 problems solved on PutnamBench. DeepSeek also released ProverBench, a 325-problem set that includes 15 formalized AIME 2024-2025 problems.

### Is it open source, and how can I use it?

Both the 7B and 671B weights are openly downloadable from Hugging Face under the DeepSeek Model License (the code is MIT), so you can self-host them. The 671B model is also offered through hosted APIs such as Novita AI and OpenRouter for those who prefer not to run it themselves.

## Links

- [DeepSeek-Prover-V2 — GitHub repository](https://github.com/deepseek-ai/DeepSeek-Prover-V2)
- [DeepSeek-Prover-V2-671B — Hugging Face model card](https://huggingface.co/deepseek-ai/DeepSeek-Prover-V2-671B)
- [DeepSeek-Prover-V2-7B — Hugging Face model card](https://huggingface.co/deepseek-ai/DeepSeek-Prover-V2-7B)
- [Paper — arXiv 2504.21801](https://arxiv.org/abs/2504.21801)
- [Novita AI — API & pricing](https://novita.ai/models/model-detail/deepseek-deepseek-prover-v2-671b)
- [OpenRouter — DeepSeek Prover V2](https://openrouter.ai/deepseek/deepseek-prover-v2)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/deepseek-prover-v2/
