Pantograph/README.md

51 lines
1.2 KiB
Markdown
Raw Normal View History

2024-04-11 12:37:58 -07:00
# PyPantograph
2024-04-19 16:47:35 -07:00
A Machine-to-Machine Interaction System for Lean 4.
2024-04-19 16:47:35 -07:00
## Installation
1. Install `poetry`
2. Clone this repository with submodules:
```sh
git clone --recursive-submodules <repo-path>
2024-04-19 16:47:35 -07:00
```
3. Install `elan` and `lake`: See [Lean Manual](https://docs.lean-lang.org/lean4/doc/setup.html)
4. Execute
```sh
poetry build
poetry install
2024-04-19 16:47:35 -07:00
```
2024-07-01 12:18:00 -07:00
## Examples
For API interaction examples, see `examples/README.md`
An agent based on the `sglang` library is provided in
`pantograph/search_llm.py`. To use this agent, set the environment variable
`OPENAI_API_KEY`, and run
```bash
python3 -m pantograph.search_llm
```
## Experiments
In `experiments/`, there are some experiments:
1. `minif2f/` is an example of executing a SGLANG based prover on the miniF2F dataset
2. `dsp` is an Lean implementation of Draft-Sketch-Prove
2024-09-06 22:41:34 -07:00
If the experiments don't work, run them in `poetry shell`. The environment
variable `OPENAI_API_KEY` must be set when running experiments calling the
OpenAI API.
2024-09-06 22:41:34 -07:00
## Referencing
```bib
@misc{pantograph,
title = "Pantograph, A Machine-to-Machine Interface for Lean 4",
author = {Aniva, Leni and Miranda, Brando and Sun, Chuyue},
year = 2024,
howpublished = {\url{https://github.com/lenianiva/PyPantograph}}
}
```
2024-09-26 19:26:59 -07:00