Skip to content

Local models

spaiSH ships with a built-in LLM manager that helps you install, configure, and switch between local AI models without leaving your terminal. It is designed for users who are new to self-hosted AI.

Running spai without an API key requires a local model runtime. Setting one up — finding the right software, downloading a model, pointing spaiSH at it — is a multi-step process that stops most beginners. The LLM manager handles all of that with a single command.

Terminal window
spai llm status # show what's installed, what's running, active model
spai llm install [runtime] # install a runtime (ollama, bitnet) — default: ollama
spai llm use-runtime <runtime> # switch active runtime (ollama, bitnet)
spai llm list # list installed + recommended models for active runtime
spai llm pull <model> # download a model (e.g. qwen2.5-coder:7b)
spai llm use <model> # set the active model for local inference

The LLM manager is built into spaid as an extension of the existing model router. It does not make AI API calls — all operations are either system checks or shell commands run through spaiSH’s standard confirmation flow.

spai llm install
spai CLI → spaid daemon → LLM Manager
Checks system → Generates install commands → Returns plan
User confirms (same [Elevated] flow as any system command)
spaid executes via executor → streams output back

Every command the LLM manager proposes goes through the permission tier engine before it reaches you. Nothing runs without your confirmation.

The active runtime and model are persisted in ~/.config/spaish/llm-state.json:

{
"active_runtime": "bitnet",
"active_model": "BitNet-b1.58-2B-4T",
"runtimes": {
"ollama": {
"installed": true,
"version": "0.6.1",
"endpoint": "http://localhost:11434"
},
"bitnet": {
"installed": true,
"endpoint": "http://localhost:8080"
}
}
}

This file is read by spaid at startup. Changes made via spai llm use take effect on the next daemon restart.

RuntimeStatusNotes
OllamaSupportedSingle binary, Docker optional, wide model support
BitNet (bitnet.cpp)SupportedMicrosoft 1-bit AI — runs on CPU only, no GPU required
vLLMPlannedRequires Python + CUDA — power users only
llama.cppPlannedLow-level, maximum control

These models are tested and curated for spaiSH users:

ModelRAM RequiredBest For
qwen2.5-coder:7b8 GBCoding, config editing, system tasks
llama3.2:3b4 GBFast general assistant
phi4-mini4 GBLow-end hardware
mistral:7b8 GBGeneral purpose

BitNet models run entirely on CPU using 1-bit quantization. They require more RAM at rest but use dramatically less compute per token than standard quantized models.

ModelRAM RequiredBest For
BitNet-b1.58-2B-4T4 GBDefault — fast, efficient, great for most tasks
BitNet-b1.58-3B6 GBStronger reasoning on low-end hardware
Llama3-8B-1.58-100B-tokens12 GBBest BitNet quality, Llama 3 architecture

Models are downloaded by setup_env.py during spai llm install bitnet.

If you already have Ollama installed and running, spaiSH detects it automatically. spai llm install will tell you it’s already installed. No migration needed.