text stringclasses 2
values |
|---|
requests==2.32.3 |
tqdm==4.66.4 |
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
lean-llm-starter
A deterministic Lean 4 verification harness that treats the LLM as an untrusted proposal engine and Lean 4 as the trusted kernel.
Architecture
operator intent
-> Prolog gate
-> Granite 4.1 / Llemma inference
-> schema validation
-> Lean 4 parse / verify
-> WORM-ready audit artifacts
Trust split:
inference/proposes proof artifactslogic/blocks unauthorized or malformed runslean4/type-checks and verifiesinfra/verification-loop/pins deterministic executioneval/runs reproducible local benchmarks
Repo Layout
lean-llm-starter/
βββ .github/workflows/ci.yml
βββ .gitattributes
βββ .gitignore
βββ LICENSE
βββ Makefile
βββ README.md
βββ docker-compose.yml
βββ docs/
β βββ HUGGINGFACE_PUBLISHING.md
β βββ REPO_MAP.md
βββ eval/
β βββ requirements.txt
β βββ run_minif2f.py
βββ fixtures/
β βββ sample_input.jsonl
βββ inference/
β βββ Dockerfile
β βββ requirements.txt
β βββ prompt.txt
β βββ server.py
βββ infra/
β βββ verification-loop/
β βββ .env.example
β βββ docker-compose.yml
βββ lean4/
β βββ lakefile.toml
β βββ lean-toolchain
β βββ MiniF2F.lean
β βββ VerifyMain.lean
β βββ src/
β βββ SovereignCorpus/
β βββ Bridge/
β β βββ Granite4Parser.lean
β β βββ Granite4Schema.lean
β βββ Core.lean
β βββ Tactics/
β βββ PlasmaGate.lean
βββ logic/
β βββ sovereign_verification.pl
β βββ verification_loop.pl
βββ hf/
βββ README.md
What This Starter Includes
- Lean 4 harness skeleton
- Granite 4.1 JSON interchange schema
- Lean-side parser scaffold
- Prolog gate and retry loop scaffold
- vLLM / docker compose verification loop
- MiniF2F-style eval harness
- GitHub Actions CI scaffold
- Hugging Face publishing docs and model card template
- sample JSONL parse fixture
What It Does Not Pretend Yet
- not fully air-gapped out of the box
- not fully air-gapped out of the box
- not a finished proof search system
- not yet shipping weights
Current verified state:
- Lean 4 project builds successfully on this machine with
C:\Users\jessi\.elan\bin\lake.exe - Python eval and inference files compile
- parse-mode fixture is present
This is a scaffold you can harden into:
- a GitHub repo
- a Hugging Face model or Space companion repo
- a deterministic local verification loop
Quick Start
If lake is not on your PATH on Windows, use:
C:\Users\jessi\.elan\bin\lake.exe
1. Lean side
cd lean4
C:\Users\jessi\.elan\bin\lake.exe update
C:\Users\jessi\.elan\bin\lake.exe build
2. Inference side
cd inference
docker build -t lean-llm-inference .
docker run -d -p 8080:8080 --name lean-llm-inference lean-llm-inference
3. Eval side
cd eval
pip install -r requirements.txt
python run_minif2f.py
4. Full verification loop
docker compose --env-file infra/verification-loop/.env.example up -d granite-verifier
swipl -g "verify_with_retries('theorem demo : True := by trivial', 'ED25519_SIG', 3, Result), writeln(Result), halt" logic/verification_loop.pl
5. Shortcut targets
make lean-build
make infra-up
make eval
6. Parse smoke test
cd lean4
C:\Users\jessi\.elan\bin\lake.exe exe verify -- --parse ../fixtures/sample_input.jsonl
Hugging Face Readiness
This repo is prepared for later Hugging Face publication with:
.gitattributesfor LFS-managed weight fileshf/README.mdmodel card templatedocs/HUGGINGFACE_PUBLISHING.mdpublish checklist
Recommended publish modes:
- code-only harness repo
- model repo for GGUF / safetensors
- Space repo for interactive verify loop UI
- Downloads last month
- 13