8 3 weeks ago

ByteDance Seed’s BFS-Prover-V2 is a 32B Qwen2.5-based Lean4 tactic generator trained with multi-turn off-policy RL plus multi-agent best-first search on Mathlib, Lean GitHub, and NuminaMath.

3 weeks ago

4c51d091ddf6 · 20GB ·

qwen2
·
32.8B
·
Q4_K_M
{{- range $i, $m := .Messages }}{{- if eq $m.Role "user" }}{{ $m.Content }}:::{{ end }}{{- if eq $m.
You are BFS-Prover-V2, a 32B Lean4 tactic generator distilled from Qwen2.5-32B using multi-turn off-
Apache-2.0
{ "num_ctx": 131072, "temperature": 0.2, "top_p": 0.95 }

Readme

BFS-Prover-V2-32B for Ollama

Lean4 tactic generator built by ByteDance Seed — BFS-Prover-V2 pairs the Qwen2.5-32B backbone with multi-turn off-policy reinforcement learning and multi-agent best-first search. The model ingests Lean proof states and proposes the next tactic, enabling high-throughput tree search in automated theorem proving pipelines.

Highlights

  • Training recipe: Multi-turn off-policy RL + multi-agent best-first search leveraging Mathlib (LeanDojo), curated Lean GitHub proofs, and autoformalized NuminaMath problems.
  • Performance: 95.08% miniF2F solve rate when paired with the BFS tree-search planner; 41.4% ProofNet accuracy without planning.
  • Prompt format: Provide the Lean proof state and append :::. The model replies with a single Lean tactic. Example:
  a b c : ℝ
  h₀ : 0 < a ∧ 0 < b ∧ 0 < c
  h₁ : c < a + b
  h₂ : b < a + c
  h₃ : a < b + c
  ⊢ a ^ 2 * (b + c - a) + b ^ 2 * (c + a - b) + c ^ 2 * (a + b - c) ≤ 3 * a * b * c:::
  • Context window: 131,072 tokens — long enough to stage deep Lean proof branches.

Available Builds

Tag Quantization Size Notes
richardyoung/bfs-prover-v2-32b:Q4_K_M Q4_K_M ~18 GB Memory-friendly baseline for local theorem proving agents
richardyoung/bfs-prover-v2-32b:Q5_K_M Q5_K_M ~22 GB Balanced quality vs. throughput
richardyoung/bfs-prover-v2-32b:Q6_K Q6_K ~25 GB Higher fidelity for premium hardware

Each tag shares the same prompt template and system message; pick the quant level that fits your GPU or CPU budget.

Usage with Ollama

Install the desired tag and stream Lean tactics:

ollama pull richardyoung/bfs-prover-v2-32b:Q5_K_M
ollama run richardyoung/bfs-prover-v2-32b:Q5_K_M <<'PROMPT'
a b c : ℝ
h₀ : 0 < a ∧ 0 < b ∧ 0 < c
h₁ : c < a + b
h₂ : b < a + c
h₃ : a < b + c
⊢ a ^ 2 * (b + c - a) + b ^ 2 * (c + a - b) + c ^ 2 * (a + b - c) ≤ 3 * a * b * c:::
PROMPT

Pair the model with a planner (e.g., Llemma agent or custom BFS/UCT search) to explore alternative branches and stitch full proofs.

Sources & References

License

Apache-2.0 (matches upstream release). Contact ran.xin@bytedance.com or zeyuzhen@andrew.cmu.edu for upstream inquiries.