Skip to content
Lovelace

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#

bash
lattice-ctl setup

Setup prints its plan and total download size, asks once, and then:

  1. Installs LM Studio when it is missing: the Homebrew cask on macOS with Homebrew, and LM Studio's own installer otherwise.
  2. Starts LM Studio's server on 127.0.0.1.
  3. Downloads and loads the model sized to your machine with LM Studio's lms command.
  4. Writes the model and server to ~/.lovelace/lattice/config.toml.
  5. Starts the Lattice service.
  6. 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:

bash
lattice-ctl doctor

The Model for Your Machine#

Lattice picks the default model by total memory:

MemoryModelDownloadLicense
8 GBqwen/qwen3.5-4b3.75 GBApache-2.0
16 GBqwen/qwen3.5-9b7.0 GBApache-2.0
32 GBopenai/gpt-oss-20b12.0 GBApache-2.0
64 GBqwen/qwen3.6-35b-a3b20.4 GBApache-2.0
128 GBpoolside/laguna-s-2.171.2 GBOpenMDW-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:

toml
[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:

toml
[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:

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

toml
[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:

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

toml
[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:

IssueFix
LM Studio is not installedlattice-ctl setup --yes
LM Studio's server is not runninglattice-ctl setup --yes
The model is not downloaded or not loadedlattice-ctl setup --yes
The Lattice service is not runninglattice-ctl service start
This machine is too small or unsupportedUse a cloud provider or LM Studio on another machine

Next Steps#