Your first local model
Install Ollama, LM Studio or llama.cpp, get a local reply, then add the model in Lyre.
Start on the computer running Lyre
A model is the AI you download. A runner, such as Ollama or LM Studio, loads that model. A coding agent, such as OpenCode, uses it to work with your project in Lyre. Your phone connects to that computer; it does not need its own model download.
In Lyre’s agent onboarding or the host’s Providers settings, choose Local models, then Setup guide. The five-step guide includes numbered instructions, real screenshots, copyable commands, discovery and a first-response check. It covers Ollama, LM Studio and llama.cpp; LM Studio uses written vendor instructions because its launch was blocked on the recording Mac. Opening the guide does not install software or mark a provider ready. For a standalone installation tutorial on Windows, macOS or Linux, read How to install open AI models on your PC.
Choose a runner
Choose one to begin. A runner install and a model download are separate steps. You will need internet for setup and enough disk space and memory for the model. Downloads can be several gigabytes.
Get your first response
With Ollama
Open PowerShell on Windows or Terminal on macOS/Linux. Run
ollama pull qwen3:4b-instruct and wait for success. Then run
ollama run qwen3:4b-instruct "Say hello in one sentence." and check the
reply. Models labeled cloud run remotely.
Ollama’s first-run instructions →
With LM Studio
Open Discover, compare model downloads and hardware guidance, then download one and load it in Chat. Try a short message. To connect an agent afterward, start the local server in the Developer tab. LM Studio’s download instructions →
With llama.cpp
Extract an official build for your platform, then run a compatible GGUF model with
llama-server. The
blog walkthrough
includes complete macOS/Linux and PowerShell commands and a browser-chat check.
Pick a model your computer can handle
Start small and check the model’s memory needs and license. For coding, look for tool-use support: a model that can chat may still struggle to edit files through an agent. Larger models and longer context use more memory. Context is how much conversation and project information the model can consider at once.
Ollama recommends at least 64,000 tokens of context for agent work. Your hardware and
model must support the chosen context. Verify the effective allocation with
ollama ps while the model is loaded; a short chat can succeed even when a
larger agent task cannot fit.
Read the context and memory guide
before increasing it. If a model will not load, try a smaller one and close other
memory-heavy apps.
Connect it to Lyre
- Keep the runner running on the Lyre host; start the API server for LM Studio or llama.cpp.
- Open Settings → Providers → Local models. Complete OpenCode installation if prompted.
- Choose Add Local Model; an empty collection starts discovery. Click Add beside the downloaded model.
- Wait for Ready to use, then select Use Model.
-
For a custom port, choose Connect manually, enter the server address
and select Test Connection. After it connects, add and select the
model. The llama.cpp walkthrough uses
http://127.0.0.1:8085. - Start a new agent in a test project, confirm the model and ask it to summarize README.md without changing files or running commands. Check its response before requesting edits.
Lyre saves the connection for OpenCode; the runner manages the model files. Older hosts without model management can use the guide’s advanced global OpenCode configuration example. Replace its model-ID placeholder and merge into existing settings. See the full-window screenshot walkthrough.
If something does not work
- No model in Lyre
- Start the local server and refresh discovery. For manual connections, check the exact server address and model identifier on the host. A running model alone does not configure the coding agent.
- Connection refused
- Start the runner’s local server and confirm its address and port. Keep it on localhost; connect your phone through Lyre.
- Slow replies or out of memory
- Try a smaller model and a smaller task. Check the runner’s memory and context guidance.
- Replies work but coding fails
- Check model tool-use support and the agent’s context requirements.
Local inference runs on your computer. Cloud models, web tools, and other connected services may send data elsewhere. Model storage and removal belong to the runner and are separate from Lyre updates.