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 = "005de00d03f1aaa32cb2923d5e3cbaf0b954a192"
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.0.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.0-py3-none-any.whl
(157.3 kB
view details)
File details
Details for the file lean_dojo_v2-1.0.0.tar.gz.
File metadata
- Download URL: lean_dojo_v2-1.0.0.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 |
2675ccf10de7bc68114e10df2c4abee1d63a581ee6391c56b8baf68fa527261c
|
|
| MD5 |
f01f2249dd3efa91406f09bbf92626a0
|
|
| BLAKE2b-256 |
9f7e074f4f86fedbcbc9a2a5dc6983665fe900b447a29084d6f8c02324fdfb76
|
File details
Details for the file lean_dojo_v2-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lean_dojo_v2-1.0.0-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 |
3ff989b7c9b42f4a93713c0309b1f3d84c5565055ba902d84ec7f5efe65b7887
|
|
| MD5 |
3d06cc48b64e768391767c36691fc468
|
|
| BLAKE2b-256 |
9c7fc13b659be75dfbfa67ba8b98de61dcd11cdb07ef7dce5f97d13764678c41
|