Skip to content

Quick Start

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

One binary, no Python, no Docker, no runtime services. lean talks to your GPU through CUDA and to models through the local filesystem.

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.