--- license: apache-2.0 base_model: Qwen/Qwen3.8-27B library_name: transformers pipeline_tag: text-generation tags: - lean4 - theorem-proving - formal-mathematics - agent datasets: - PrincetonPLI/Goedel-Prover-V3-train --- # Goedel-Prover-V3 [Website](https://princeton-pli.github.io/Goedel-Prover-V3) · [Code](https://github.com/princeton-pli/Goedel-Prover-V3) · [FP8 model](https://huggingface.co/PrincetonPLI/Goedel-Prover-V3-FP8) · [Training data](https://huggingface.co/datasets/PrincetonPLI/Goedel-Prover-V3-train) Goedel-Prover-V3 is a 27B Lean 4 theorem-proving agent, fine-tuned from [Qwen3.8-27B](https://huggingface.co/Qwen/Qwen3.8-27B). It works like a coding agent: in a sandbox holding only the statement file and a shell, it searches Mathlib, writes the proof, compiles it with Lean, reads the errors and tries again, until it submits a proof. ## Usage The model is meant to be run inside its agent harness. The [code repository](https://github.com/princeton-pli/Goedel-Prover-V3) sets up the whole stack: Lean 4.34.0 with Mathlib, the Apptainer sandbox, the vLLM server, the agent and the scoring. It also runs the model on your own statements: ```bash .venv/bin/hf download PrincetonPLI/Goedel-Prover-V3 --local-dir models/Goedel-Prover-V3 .venv/bin/python scripts/prepare_tasks.py my_statements/ --out .cache/mine --samples 4 MODEL_PATH=models/Goedel-Prover-V3 MANIFEST=.cache/mine/run/manifest.json bash scripts/run_local.sh ``` ### Serving with vLLM Tested with vLLM 0.19.0. The bf16 weights take 51 GiB; one server per four 80 GB GPUs holds the full 262,144-token context for 16 concurrent agents. ```bash vllm serve PrincetonPLI/Goedel-Prover-V3 \ --served-model-name Goedel-Prover-V3 \ --tensor-parallel-size 4 \ --max-model-len 262144 \ --gpu-memory-utilization 0.93 \ --enable-prefix-caching \ --gdn-prefill-backend triton \ --enable-auto-tool-choice --tool-call-parser qwen3_coder \ --reasoning-parser qwen3 ``` What the model expects: - **One `bash` tool** in the OpenAI function-calling format; the model answers with native tool calls (`qwen3_coder` parser). The task is a Lean file `/work/Main.lean` whose target theorem ends in `sorry`. - **Thinking kept across turns.** The reasoning parser returns the thinking in the response's `reasoning` field; send it back with each assistant turn, as the chat template keeps past thinking. - **Sampling:** temperature 0.7 and 32,768 tokens per reply; top-p 0.95 and top-k 20 come from `generation_config.json`. - **Long attempts.** The harness closes a reply cut off inside its thinking with Qwen3's thinking-budget sentence and lets the model finish, then drops that cut thinking from later requests. When a conversation reaches 180k tokens, the model summarizes its progress and the conversation restarts from the summary. The model was trained on trajectories in this format. ## License Apache License 2.0. ## Citation ```bibtex @misc{park2026GoedelProverV3, title = {Goedel-Prover-V3: A Frontier Lean Agent for Research-level Mathematics on a Single GPU}, author = {Simon Park and Tomas Ortega and Rodrigo Porto and Jui-Hui Chung and Yoonsang Lee and Yikai Wu and Qishuo Yin and Ayush Khaitan and Alex Kontorovich and Sanjeev Arora and Danqi Chen and Liam Fowl}, year = {2026}, url = {https://princeton-pli.github.io/Goedel-Prover-V3}, } @article{ortega2026miniLeanagent, title = {Do Theorem Provers Need Theorem-Proving Agents? mini-Lean-agent: A Coding-Agent Baseline for Lean}, author = {Tomas Ortega and Simon Park and Ayush Khaitan and Liam Fowl and Alex Kontorovich and Sanjeev Arora}, journal = {arXiv preprint arXiv:2610.17331}, url = {https://arxiv.org/abs/2610.17331}, } ```