Local Models
Lattice runs private work on a model on your own machine. Your prompts and
answers stay on the machine, the model works offline once it is downloaded, and
there are no per-request charges. LM Studio runs the
model; Lattice sends it requests through LM Studio's OpenAI-compatible server
at http://localhost:1234/v1.
Set Up With One Command#
lattice-ctl setup
Setup prints its plan and total download size, asks once, and then:
- Installs LM Studio when it is missing: the Homebrew cask on macOS with Homebrew, and LM Studio's own installer otherwise.
- Starts LM Studio's server on
127.0.0.1. - Downloads and loads the model sized to your machine with LM Studio's
lmscommand. - Writes the model and server to
~/.lovelace/lattice/config.toml. - Starts the Lattice service.
- Asks the model for a short answer.
lattice-ctl setup --plan shows the steps and download size without changing
anything, and lattice-ctl setup --yes runs without the question. Running
setup again on a ready machine changes nothing and checks the answer. If a step
fails, setup names it; the steps before it stay done, and running setup again
continues from there.
Check readiness at any time, with or without the daemon running:
lattice-ctl doctor
The Model for Your Machine#
Lattice picks the default model by total memory:
| Memory | Model | Download | License |
|---|---|---|---|
| 8 GB | qwen/qwen3.5-4b | 3.75 GB | Apache-2.0 |
| 16 GB | qwen/qwen3.5-9b | 7.0 GB | Apache-2.0 |
| 32 GB | openai/gpt-oss-20b | 12.0 GB | Apache-2.0 |
| 64 GB | qwen/qwen3.6-35b-a3b | 20.4 GB | Apache-2.0 |
| 128 GB | poolside/laguna-s-2.1 | 71.2 GB | OpenMDW-1.1 |
Every model supports tool use. Machines with less than 8 GB of memory have no default local model; use a cloud provider instead.
Use a Different Model#
Name any model LM Studio can serve in ~/.lovelace/lattice/config.toml. An
explicit model always wins over the hardware tier:
[providers.lmstudio]
base_url = "http://localhost:1234/v1"
default_model = "google/gemma-4-12b"
Then run lattice-ctl setup to download, load, and verify it, or download it
yourself with lms get google/gemma-4-12b and restart the service with
lattice-ctl service restart.
Requirements#
LM Studio runs on:
- macOS 14 or later on Apple silicon
- Linux, on x86-64 processors with AVX2 or on ARM64
On other machines, lattice-ctl setup and lattice-ctl doctor explain why LM
Studio cannot run. Lattice does not install another local runtime there. You
can still use a cloud provider, or LM Studio or any OpenAI-compatible server on
another machine.
Setup also checks that the disk has room for the model plus 2 GB before it downloads anything.
LM Studio on Another Machine#
Point Lattice at an LM Studio server elsewhere on your network:
[providers.lmstudio]
base_url = "http://studio.local:1234/v1"
LATTICE_LMSTUDIO_BASE_URL overrides the configured URL. lattice-ctl doctor
reports the runtime as remote and the model as running off this machine.
lattice-ctl setup does not change a remote server; start the model there.
When the Local Model Fails#
When LM Studio answers at startup, Lattice routes your work to the local model.
If the model then fails a request (LM Studio quit, the model was unloaded, or
the server returned an error), Lattice does not send the work anywhere else,
even when a cloud provider such as Anthropic has an API key. The assistant turn
ends with an llm_provider_error event:
The local model at http://localhost:1234/v1 did not answer (...). Start LM
Studio or run `lattice-ctl setup`. Work routed to the local model is not sent
to a cloud provider unless `orchestrator.cloud_fallback = true` is set in
config.toml.
To let a configured cloud provider answer instead, opt in:
[orchestrator]
cloud_fallback = true
With cloud_fallback on, a request the local model fails with a transient
error is retried on the other configured providers. An assistant turn that a
cloud provider answers in the local model's place also gets one recoverable
llm_provider_error event that names the provider and model, so a fallback is
never silent. The prompt of that request, and the
conversation it continues, go to that provider.
When the Local Model Cannot Plan a Task#
A task runs as a series of steps, and the model chooses the action for each one. A model that cannot plan the task (it answers with prose, or with an action the step does not allow) leaves the step unchosen. Lattice then picks the action itself from the actions that stay on the machine. It does not run a web search or fetch a page on a guess: a guessed web search uses the task description as its query, which would send your prompt to a search engine.
When every action the step allows reaches the network, the task fails with an error such as:
the model did not choose the next action, and the only actions left (search_web)
reach the network. They run only when the model chooses them, so nothing was
sent. Use a model that can plan this task, or set unplanned_network_actions to
let them run with the task description as their input
Load a model that can plan the task, for example the one lattice-ctl setup
installs, and send the task again. To let Lattice run web actions the model did
not choose, opt in:
[orchestrator]
unplanned_network_actions = true
With unplanned_network_actions on, a web search Lattice picks itself sends the
task description to the search engine. Web actions the model chooses run with
either setting.
Ollama (Deprecated)#
Lattice no longer elects Ollama by default, voice setup does not pull from it,
and it receives no new capabilities. An existing configuration keeps working
only while orchestrator.default_provider = "ollama" is set explicitly, and
lattice-ctl doctor reports it as deprecated. Run lattice-ctl setup to move
to LM Studio.
Troubleshooting#
Run lattice-ctl doctor. Each issue comes with the command that fixes it:
| Issue | Fix |
|---|---|
| LM Studio is not installed | lattice-ctl setup --yes |
| LM Studio's server is not running | lattice-ctl setup --yes |
| The model is not downloaded or not loaded | lattice-ctl setup --yes |
| The Lattice service is not running | lattice-ctl service start |
| This machine is too small or unsupported | Use a cloud provider or LM Studio on another machine |
Next Steps#
- Cloud Providers → - Add Anthropic, OpenAI
- Configuration → - Config file format and precedence
- Environment Variables → - Every
LATTICE_*variable - CLI Reference → -
doctor,setup, and every other command