A comprehensive library for AI-assisted theorem proving in Lean
Project description
LeanDojo-v2
Requirements
- Python = 3.11
- GPU
Installation
To install LeanDojo-v2, run
uv pip install lean-dojo-v2
install Pantograph
uv add git+https://github.com/stanford-centaur/PyPantograph
make sure you've installed CUDA-compiled torch,
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
export your Github access token,
export GITHUB_ACCESS_TOKEN=<GITHUB_ACCESS_TOKEN>
Example
from lean_dojo_v2.agent.hf_agent import HFAgent
from lean_dojo_v2.trainer.sft_trainer import SFTTrainer
url = "https://github.com/durant42040/lean4-example"
commit = "b14fef0ceca29a65bc3122bf730406b33c7effe5"
trainer = SFTTrainer(
model_name="deepseek-ai/DeepSeek-Prover-V2-7B",
output_dir="outputs-deepseek",
epochs_per_repo=1,
batch_size=2,
lr=2e-5,
)
agent = HFAgent(trainer=trainer)
agent.setup_github_repository(url=url, commit=commit)
agent.train()
agent.prove()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lean_dojo_v2-1.0.1.tar.gz
(126.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lean_dojo_v2-1.0.1-py3-none-any.whl
(157.3 kB
view details)
File details
Details for the file lean_dojo_v2-1.0.1.tar.gz.
File metadata
- Download URL: lean_dojo_v2-1.0.1.tar.gz
- Upload date:
- Size: 126.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14d8c0902ff9e93ebbdd469d82d98d9317d2c42c3b60151d27242bc9d8d17b2a
|
|
| MD5 |
f949cf4fa2eb4bf3f66ffb74302634af
|
|
| BLAKE2b-256 |
b1392c79679f2f5416b38c532738cc5526169ada8394f9d8bd6f7dcc0ba42cad
|
File details
Details for the file lean_dojo_v2-1.0.1-py3-none-any.whl.
File metadata
- Download URL: lean_dojo_v2-1.0.1-py3-none-any.whl
- Upload date:
- Size: 157.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7eeb93e358f3db0a74de55e867cfb91121f156db8548d3e03fab83418025cb55
|
|
| MD5 |
860077357994ce1434e0bb4c08d57967
|
|
| BLAKE2b-256 |
bc346f31f4ebaa2689240631e2b0fe7dcb22734459980cb3704bf090469471fe
|