Skip to content

Quick Start

Linux

Terminal window
curl -sSf https://leanmodels.ai/install.sh | sh

Windows (PowerShell)

Terminal window
irm https://leanmodels.ai/install.ps1 | iex

There 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:

Terminal window
lean update

One binary, no Python, no Docker, no runtime services.

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.

Start with lean-agent-light. It is free, it is the fastest model in the catalog, and it runs on 12 GB of VRAM.

Terminal window
lean pull lean-agent-light

Models 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:

Terminal window
lean login
lean pull lean-agent-middle
Terminal window
lean run lean-agent-light

This 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.

To use the model from an editor, an agent, or your own code, run it as an OpenAI-compatible server:

Terminal window
lean serve lean-agent-light --port 8080
Terminal window
curl 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.

Terminal window
lean tune

lean 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.

Terminal window
lean verify lean-agent-light

Walks 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.