Quick Start
1. Install
Section titled “1. Install”Linux
curl -sSf https://leanmodels.ai/install.sh | shWindows (PowerShell)
irm https://leanmodels.ai/install.ps1 | iexThere is one build per platform. It runs on NVIDIA and AMD GPUs, and on the
CPU when it finds neither. The CPU is fine for lean pull and lean verify,
but far too slow to serve these models. Both installers verify the download
against a published SHA256 checksum and refuse to install if it does not match.
Already have lean? Upgrade in place instead of reinstalling. The update verifies the download before replacing the binary:
lean updateOne binary, no Python, no Docker, no runtime services.
What your GPU needs
Section titled “What your GPU needs”Windows: only the graphics driver. The first time lean uses the GPU, it downloads the libraries the driver does not include, once: NVIDIA’s CUDA libraries (about 330 MB) or AMD’s HIP libraries (65 to 185 MB).
Linux: the driver plus the vendor’s runtime libraries. For NVIDIA that is cuBLAS, cuRAND and NVRTC from the CUDA Toolkit 12. For AMD it is ROCm. The installer checks for them and names anything missing.
Supported hardware lists the GPUs lean runs on and covers multi-GPU machines, including NVIDIA and AMD cards together.
2. Pull a model
Section titled “2. Pull a model”Start with lean-agent-light. It is free, it is the fastest model in the
catalog, and it runs on 12 GB of VRAM.
lean pull lean-agent-lightModels land in ~/.leanmodels/models/<name>/. A pull is resumable: re-running
the same command after an interruption picks up where it left off, and
already-verified files are skipped.
Paid models need an API key first:
lean loginlean pull lean-agent-middle3. Chat with it
Section titled “3. Chat with it”lean run lean-agent-lightThis opens an interactive REPL. /stats prints cache and throughput numbers for
the session, /clear resets the conversation, and Ctrl-D exits.
The first response is slower than the rest: the runtime is filling its VRAM expert cache and warming the page cache. Steady-state throughput is what the benchmarks report.
4. Serve it over HTTP
Section titled “4. Serve it over HTTP”To use the model from an editor, an agent, or your own code, run it as an OpenAI-compatible server:
lean serve lean-agent-light --port 8080curl http://127.0.0.1:8080/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{"messages":[{"role":"user","content":"Write a haiku about GPUs."}]}'See the API reference for the full request and response shapes, and Aider for a worked example of pointing a coding agent at it.
Checking your hardware
Section titled “Checking your hardware”lean tunelean tune detects your GPUs, system RAM, and free disk, then reports which
models fit and what settings they will use. Run it before a large download.
Verifying a download
Section titled “Verifying a download”lean verify lean-agent-lightWalks every checksum in the model’s manifest and reports damaged or missing
files. Anything damaged is marked for repair, so a subsequent lean pull
re-fetches just those files rather than the whole model.