Docs › Local AI models on your workers
Local AI models on your workers
A worker with a graphics card (or a Mac with Apple silicon) can run AI models for every app on your hub. Sparehand installs the model server (Ollama) there, keeps it running, and gives you one address for all of them.
The easy way: open the dashboard, find the Local AI card on the Machines tab, and press Set up Local AI… (or Add a model…). Pick a machine and a model. Each model says in plain words what it's good for and how well it runs on that machine: Runs well, Slower (too big for its graphics card, so part of it runs on the processor), or Too big. One model per kind is marked Suggested, and Fast marks models that answer quickly. Downloads show their progress and can be stopped. Chat… then lets you talk to your models right in the dashboard, with nothing leaving your network.
- New and popular on Ollama: at the top of the library, the open models released or updated in the last year, most downloaded first, read from ollama.com once a day (
"aiLatest": falseinapp.jsonswitches that off). Each is offered at the size that suits the chosen machine; the size menu shows how every size would run. The hand-picked list below comes with Sparehand updates. - This computer too: the hub can run models as well (
sparehand ai install hub, or pick it in the library). Its own Ollama listens on127.0.0.1:21433, sincelocalhost:11434is the address for all your machines together. - Think first: models that reason before answering (Qwen 3, Gemma 4, DeepSeek R1, gpt-oss…) answer much sooner with it off, which is the chat's default; switch it on for maths and tricky questions. The chat asks each model whether it can think, and shows the switch only then.
- The Local AI card (Machines tab) shows each machine's models, which are in memory, who answered the last request, and has Copy buttons for both addresses (Ollama, OpenAI-compatible). In the library a download that broke off has Retry; the "New and popular" list can be checked now instead of waiting for the daily check.
- In a chat: Edit your last question or Regenerate the last answer; Export saves the chat as a Markdown file. Chats are saved on the hub, so every device sees them: a chat changed on another device shows "Updated on another device · Reload", and a save that didn't see the newer messages becomes a new chat instead of overwriting them. A long chat (the model sees only the latest part) offers Summarise and continue: the model sums it up, and the summary opens as a new chat to go on from.
- Making pictures: chat models only write words: asked for a picture, they describe one or pretend to call a drawing tool. Write what you'd like to see and press 🖼 (next to Send) to get a real picture. It's made with Studio's ComfyUI on a machine with an NVIDIA graphics card (
sparehand run --gpu; this computer when none is free and it has the models), with Z-Image Turbo or FLUX.2 [klein], whichever the menu next to the model says, or in the cloud: Cloudflare FLUX.1 schnell (free within its daily allowance; the Cloudflare key from Cloud providers…), Hugging Face FLUX.1 schnell (its small monthly credit), Gemini Nano Banana (paid, about $0.03 a picture; Studio's Gemini key, or the one in Cloud providers…), or any provider's picture model. The menu lists them all; one without its key is greyed and says which key it needs. The machines need Studio's picture models (sparehand studio install NAME --with pictures,plain). The first picture in a while takes a few minutes while the model loads; the next ones take under a minute. You don't have to press 🖼: when your words ask for a picture ("make a picture of…", "draw…", "generate a pic of…"), Send makes it with 🖼 by itself. A question, or "in words" in the message, goes to the chat model as usual. - A picture from a picture: attach one (📎, paste or drop it), write what to make of it ("as a cartoon", "the same room at night", "turn this into a painting") and press 🖼 or Send: the new picture is made from it. That takes a maker that can start from a picture: FLUX.2 [klein] on your machines (Z-Image Turbo can't, so Automatic skips it), Cloudflare FLUX.2 [dev] or Gemini; the others say so when chosen by hand. Up to four pictures go along. A picture attached with a question ("what's in this?") goes to a chat model that can see, which
autopicks by itself. - Pictures and files: 📎 next to the message box (or paste, or drop them on the chat) adds pictures and text files. Pictures go to models that can see (Gemma 3, the library's Vision group); they are made smaller first (1280 pixels at most). A text file's contents go into your message. PDFs and documents aren't read: copy their text in. Attachments are saved with the chat.
- Private chats: 🕶 Private at the top of the chat turns Private on: from then on, new chats are private (their tab says 🕶). A private chat is never saved and its tab isn't reopened next time: the chat, its attachments and its pictures live in the open page only, and are erased when you close its tab, turn Private off, or close or reload the page (closing the chat window keeps them while the page is open). Export first to keep one. Its pictures are kept nowhere on the hub (the picture comes back to the page alone); one made on a machine gets its description in a file that is removed once read, so the words are in no command line or job history, ComfyUI forgets the job, and the machine's copy is synced away right after. A saved chat you open stays a saved chat. What you send to a cloud model still leaves your network: Private covers what Sparehand keeps.
From the command line:
sparehand ai install gaming-pc # install Ollama there (or update it)
sparehand ai pull gaming-pc qwen3:8b # download a model there
sparehand ai # which machines have which models, what's in memory
sparehand ai models # the model library: what each model is for, and how
# well it runs on each of your workers
Then point any app that works with Ollama or with an OpenAI-compatible API at:
http://localhost:11434 # Ollama API
http://localhost:11434/v1 # OpenAI-compatible API (any API key)
curl localhost:11434/api/generate -d '{"model": "qwen3:8b", "prompt": "Hello", "stream": false}'
What happens
- Installing: the latest Ollama release is downloaded once to the hub, its SHA-256 checked against the published checksums, and unpacked on the worker into
~/.local/ollamafor that user (no administrator password). It runs as a background service that starts with the machine (a systemd user service on Linux and Windows/WSL, a launchd agent on a Mac), listens only on the worker's own127.0.0.1:11434, and frees the GPU 5 minutes after the last request. - Where the models go: Ollama's usual place,
~/.ollama/modelson that machine, unless you choose another: in the library, under the machine, Models are kept in… · Change…, orsparehand ai folder gaming-pc 'D:\ollama'(the path in that machine's own style:/Volumes/Big/ollamaon a Mac,D:\ollamaor/mnt/d/ollamaon Windows). The models already downloaded move there and Ollama restarts withOLLAMA_MODELSset. Handy for an external drive or a small system disk. The library's "fits" badges then count the free space there, not on the system disk.sparehand ai folder NAMEshows the place and the free space;sparehand ai folder NAME -goes back to the home folder. - Reaching it: the hub forwards each worker's port 11434 through SSH (
sparehand forward, local ports 21434, 21435…). The dashboard server answers atlocalhost:11434and passes each request on:- to a machine that has the model asked for (
/api/tagsand/v1/modelslist every machine's models together), - the one with the fewest requests in progress, preferring one with the model already in memory,
- and to the next machine if one can't be reached. The answer's
X-Sparehand-Machineheader says which machine answered.
- to a machine that has the model asked for (
- Only the hub itself can use the address, as with Ollama on one machine.
autoas the model picks one for you, and cloud models can join as well: see Cloud models below.- Downloading or deleting a model through the API needs the machine named (
X-Sparehand-Machine: gaming-pc) when there are several;sparehand ai pull NAME MODELis simpler.
Which models
A graphics card's memory decides what fits: about 8 GB runs models up to roughly 8 billion parameters (quantised, as Ollama ships them), 12–16 GB up to 14 billion, 24 GB up to about 30 billion. A Mac uses its unified memory. Ollama's library lists the sizes.
Sparehand's library (lib/ai-models.json) does this sum for you. A model needs about its download size plus 15% and 1 GB for the conversation. It runs well when that fits in 92% of the graphics card's memory (on a Mac: 65% of its memory, leaving the rest for macOS and your apps), and runs, slower when it only fits with help from normal memory. Any other model from ollama.com/library can be installed by name.
Cloud models (free tiers)
Beta. The cloud providers work and are part of the licence, but they are newer than the core and may change between versions, as the providers' free tiers do. Nothing goes to any of them until you add its key; the privacy policy names each one.
When your machines aren't enough (a model too big for them, or they're all busy or asleep), the same address can also reach the free tiers of cloud AI services: Groq, Cerebras, Google Gemini, OpenRouter's free models, NVIDIA, SambaNova, Cloudflare Workers AI, GitHub Models, Cohere and Hugging Face. Mistral and xAI (Grok) are there too, marked Paid: they have no free tier, so what they answer is billed to your account with them, and auto never uses them unless you put them in "aiAuto". Nothing goes to any of them until you add a key.
Some providers aren't reachable from every country or network: Groq, for one, answers "Access denied" to some, from its website and its API alike. Cloud providers… then shows the provider as not working; use another.
Setting up: Local AI card → Add cloud models… (or Cloud providers…). Each provider has a Get a key ↗ link; make a key there, paste it, Save. The key stays in this computer's Keychain (on Linux in ~/.config/sparehand/ai-cloud-keys.json, readable only by you, or from SPAREHAND_AI_KEY_GROQ and the like in the dashboard's environment). The dashboard never shows it again. Cloudflare asks for two things, in two boxes: your account ID (the 32-character code in the Cloudflare dashboard's address, dash.cloudflare.com/…, or under Workers AI → Use REST API) and an API token (My Profile → API Tokens → Create Token → the Workers AI template). A token that may list your accounts can be given alone, and Sparehand finds the account. GitHub's is a fine-grained token with the Models (read) permission. From the terminal:
sparehand ai cloud # each provider: its key, models, today's use, whether it's resting
sparehand ai cloud key groq # add or replace a key (typed without showing, or piped in)
sparehand ai cloud models groq # the models to ask for
sparehand ai cloud remove groq # forget the key (also: test PROVIDER, catalog)
Using them: a cloud model's name is provider/model, as the model list shows it:
curl localhost:11434/v1/chat/completions -d '{"model": "groq/openai/gpt-oss-120b", "messages": [{"role": "user", "content": "Hello"}]}'
- **
autopicks for you: a chat model on your machines first (one already in memory, else the largest), and only when no machine can answer, the cloud models in turn.auto:fast** prefers small, quick models."aiAuto": {"smart": ["groq/…", …], "fast": […]}inapp.jsonchanges which cloud models it tries. A conversation stays with the modelautogave it to for 30 minutes (it's known by its system prompt and first message), while that model can answer, so an agent isn't switched to a model with other habits halfway through a task. - **
fusion** asks several models the same question (the oneautowould use on your machines, and two cloud models from different providers), then a judge model writes one answer from theirs. It's slower and spends several requests per question, for answers that are better than any one free model's. The answer'sX-Sparehand-Fusionheader names the panel and the judge;"aiFusion": {"panel": ["qwen3:14b", "groq/…", "gemini/…"], "judge": "gemini/…"}inapp.jsonchooses them. It answers chats only, without tools. - Both APIs: apps that speak Ollama's API (
/api/chat,/api/generate) get cloud models too; the hub turns the request into the OpenAI form and the answer back. - In the chat: cloud models are in their own group, marked ☁, and each answer says where it came from ("via ☁ Groq").
- Limits: free tiers allow a number of requests a minute and a day. The hub counts them, reads what each answer's rate-limit headers say, and when a provider answers "too many" (429), fails, or refuses its key, it rests for a while (as long as the provider asks, else a minute, doubling up to 15).
autothen goes on to the next one. It also measures how soon each model starts answering and how often it answers:autoputs models failing lately last, andauto:fasttries the quickest first. Cloud providers… shows each provider's use for the last 14 days, and for each model its speed and how reliable it has been. - Models your key can't use: a provider's list can name models its free tier or your account doesn't reach (NVIDIA answers "Function … Not found for account"). The first 404 for a model hides it for 7 days: from the lists, the pickers and
auto, also after a restart. Test on the provider asks again for all of them, for when the account has been given access since. - Pictures and speech: some providers' models make pictures, read text aloud or write down recordings (Groq's Whisper and PlayAI, for instance). They're listed with what they do, and answer at the usual OpenAI addresses, by name:
/v1/images/generations,/v1/audio/speechand/v1/audio/transcriptions(a file upload, as OpenAI's). - Newer provider lists:
"aiCloudCatalogUrl": "https://…/ai-cloud.json"inapp.jsonfetches a newer version oflib/ai-cloud.jsononce a day (or with Check now). It may change the free limits, the notes, the models and whatautotries, but never where a provider you already have is reached, so a key only ever goes where it went before. Only a list from Sparehand's own site may also add providers or change a provider's Get a key page: a list from anywhere else that tries is refused on those points (the dialog says which), since a new provider with a key page of its own would be a way to collect your keys. No pattern in a fetched list is ever used: the model filters come from the file shipped with Sparehand alone. - Spending limits: a paid provider that has cost
"aiCloudUsdDay"dollars today ($10 by default, counted at its prices inprices.tokens;0for no limit) rests until tomorrow, whoever asks, and the error says so. Free tiers cost nothing, so nothing is counted there."aiCloudLimits": {"xai": {"usdDay": 2, "rpm": 10}}sets one provider's day's dollars and its requests a minute and a day over the catalog's. - Remembering answers:
"aiCache": {"minutes": 60}answers a request that doesn't stream, and that's the same as one a little while ago, from memory instead of the provider (the answer'sX-Sparehand-Cache: hitsays so). Handy for apps that ask the same thing again; off by default. A remembered answer costs nothing, so it counts nothing against the provider and charges a member nothing. - Shorter prompts:
"aiCompress": truetakes the empty space out of long messages to cloud models (spaces at line ends, runs of blank lines and of spaces), which free tiers count as tokens. Indentation stays, as code needs it. Off by default. - Privacy: what you send to a cloud model leaves your network, and some free tiers (Gemini's, for one) may use it to improve their models. Your own models stay the default: a cloud model is used only when you ask for one by name, or ask for
autoand no machine can answer. - Members (people you added) don't see or use cloud models: the free quota is yours.
autostays on the machines for them. With"aiCloudMembers": truethey can use them too (notfusion), paid with their credits: a provider priced inprices.tokens(app.json, by the provider's id:xai,mistral,gemini…) is charged at the provider's prices times your markup, the rest at the AI rate by the model's size (credits.md). Providers without a free tier (marked Paid: xAI, Mistral, or anaiEndpointsserver with"paid": true) stay closed to members even then, since every answer there costs you money:"aiCloudMembersPaid": trueopens them, and only the ones priced inprices.tokens, so a member can't lose you money. Each member may send"aiMemberRpm"requests a minute (30 by default) through the hub, so one person can't use up a provider's free limit for everyone. - Claude Code and the Anthropic SDKs: the hub also speaks the Anthropic Messages API (
/v1/messages, streaming and tool use included), so Claude Code can run on your models:
bash ANTHROPIC_BASE_URL=http://localhost:11434 ANTHROPIC_API_KEY=local ANTHROPIC_MODEL=auto claude
A Claude model's name (what Claude Code asks for unless told otherwise) means auto, and a Haiku auto:fast; any other name is used as it is (groq/…, qwen3:14b). Answers are kept to 8,192 tokens each, which free tiers allow. Claude Code sends long prompts with many tools, so it works best with a large model on your own machine or a provider with a big allowance (Cerebras, Gemini); small free limits run out fast. It doesn't know these models' context windows and says so once; see its model-config docs to set one. A member's API key works as ANTHROPIC_API_KEY for the models on the machines.
- Servers of your own: any server that speaks the OpenAI API (LM Studio, vLLM, a paid API) joins the same way, in
app.json:"aiEndpoints": [{"id": "lmstudio", "label": "LM Studio", "base": "http://127.0.0.1:1234/v1"}]. One on this computer isn't counted as cloud ("cloud": trueorfalsesays otherwise); a key for it can be added in the same dialog.
Settings
In ~/.config/sparehand/app.json: "aiPort": 11434 to use another port, "ai": false to turn the hub off (the per-machine ports 21434… still work), "aiCloud": false to switch the cloud models off altogether. For the cloud models also "aiEndpoints", "aiAuto", "aiFusion", "aiCloudCatalogUrl", "aiCache", "aiCompress", "aiCloudUsdDay", "aiCloudLimits", "aiCloudMembers", "aiCloudMembersPaid" and "aiMemberRpm", described above.
Removing
sparehand ai rm gaming-pc qwen3:8b # one model
sparehand ai uninstall gaming-pc # Ollama itself (downloaded models stay where they are)
The Helper
The dashboard's Help button opens the Helper: ask in your own words ("how do I add my gaming PC?", "why do my tests run on this Mac?") and it answers with the steps, using what Sparehand knows about your machines right now, and offers buttons for the next step. It runs on your local models (it picks a small, quick one; "helperModel": "NAME" in app.json chooses another, and "helper": false switches it off). With no model yet it offers to set one up (about 4 GB in all, on the best machine you have) and meanwhile answers from the guide. The model is optional: switch off Use a local AI model in the Helper (or set "helperModel": false in app.json) and it answers from the guide alone, showing the matching sections. It only helps with Sparehand; for anything else it points to the chat. It only suggests: every action is a button you press, and its one check (sparehand doctor NAME) only reads.