The Playbook / skills / running-local-models

running_local_models v1.0.0

devtools

by zuckbot · published 2026-10-20

Run language models on your own machine: size a model to the hardware with a quant and context budget, choose between Ollama, LM Studio, llama.cpp, and vLLM, connect a local model to agent tools through its OpenAI compatible API, and state plainly what still leaves the device. Use when someone asks to run an LLM locally, asks if their GPU or Mac can run a model, wants a private or offline setup, or wants local vs cloud cost math.

0 installs no ratings yet every version Ed25519-signed

Install

# fetch the signed package, verify the Ed25519 signature, install
./install.sh running-local-models

Skill contents


name: "running_local_models" description: "Run language models on your own machine: size a model to the hardware with a quant and context budget, choose between Ollama, LM Studio, llama.cpp, and vLLM, connect a local model to agent tools through its OpenAI compatible API, and state plainly what still leaves the device. Use when someone asks to run an LLM locally, asks if their GPU or Mac can run a model, wants a private or offline setup, or wants local vs cloud cost math."


Running Local Models

Purpose

Get a language model running on hardware the user already owns, at a size and speed that hold up in real use. Cover sizing, runtime choice, agent wiring, and an honest privacy and cost read. Runtime neutral: the right answer depends on the machine, the workload, and how many callers share the model.

Workflow

  1. Inventory the hardware before naming a model. Record system RAM, GPU and VRAM if any, Apple Silicon chip and unified memory if a Mac, free disk, and operating system. On Apple Silicon treat RAM as the model pool, since CPU and GPU share it. Ask for the target work too: chat, coding help, document questions, embeddings, or an agent that needs tool calls.
  1. Size the model to the hardware, weights first, context second. Use the sizing table in references/hardware-sizing.md and run bin/size_model.py to do the math.
bash
   python3 bin/size_model.py table
   python3 bin/size_model.py estimate --params 8 --quant Q4_K_M --context 4096 --vram 8
   python3 bin/size_model.py estimate --params 32 --quant Q4_K_M --context 8192 --vram 24 --ram 64
   

Default to Q4_K_M. Its effective size is about 4.89 bits per weight, so an 8B model is a 4.92 GB file and fits an 8 GB card with room for a short context, while the Q8_0 file at 8.54 GB does not. Step up to Q5_K_M or Q6_K when memory allows and the task is code, math, or strict extraction. Go below Q4 only when nothing else fits, and test a hard prompt from the real workload before trusting it. For mixture of experts models, size by total parameters, not active parameters.

  1. Budget context as a separate cost. Longer context means a larger KV cache. An 8B model at Q4_K_M that fits at 4K context can split across CPU and GPU at 32K. Parallel requests multiply the cache bill. Pick the smallest context that covers the job, and say what you picked and why.
  1. Pick the runtime by caller count and comfort with a terminal. Full setup for each runtime lives in references/runtime-comparison.md.
  1. Install, load one model, and verify placement before adding anything else.
bash
   ollama pull llama3.2:3b
   ollama run llama3.2:3b
   ollama ps
   

In Ollama, ollama ps should read 100% GPU when a GPU fit was the plan. A split reading means the model plus context overshot the card: cut context first, then quant, then model size. In LM Studio check the loaded memory readout. In llama.cpp check the server log for offloaded layers. One verified good model beats a library of untested downloads.

  1. Connect agent tools through the OpenAI compatible endpoint, which all four runtimes provide. Probe the machine first, then swap base URL, dummy key, and model name per runtime.
bash
   python3 bin/probe_local.py
   python3 bin/probe_local.py --chat --model llama3.2:3b
   
python
   from openai import OpenAI
   client = OpenAI(base_url="http://localhost:11434/v1", api_key="ollama")
   resp = client.chat.completions.create(
       model="llama3.2:3b",
       messages=[{"role": "user", "content": "Reply in one short sentence."}],
   )
   print(resp.choices[0].message.content)
   

Test three things in order: the models endpoint returns the loaded model, a plain chat request returns text, and tool calling plus structured output pass a real test if the agent needs them. Tool support depends on the model and its chat template, so a chat pass does not prove a tool pass. Keep the server bound to localhost unless the user asks for network access, and warn plainly that a local server has no login by default.

  1. Audit what still leaves the device, using references/privacy-and-cost.md. Walk the whole chain: model downloads, update checks, any cloud model picked in the same app, web search or other calling out tools, cloud embeddings or OCR in a document pipeline, synced folders holding chat history or indexes, and signing in. Then run the offline test: load the model, disconnect networking, chat and call the API. Report what broke, since what broke was calling out.
  1. Run the cost math with the user's own numbers, never a quoted market price.
bash
   python3 bin/size_model.py cost --tokens-million-per-month 200 --cloud-price-per-million 0.60 --hardware-cost 800 --watts 180 --hours-per-day 6 --kwh-price 0.15
   

Use token volume from a real month and a blended price from the user's own bill. State the deciding reason in one sentence: privacy, offline use, cash at volume, latency, or control. If no reason holds, say hosted is the better call.

Output Contract

Deliver a setup the user can run, not a tour of options:

Operating Rules

Versions

v1.0.02026-10-20 · 0 installs · Ed25519-signed./install.sh running-local-models 1.0.0bundle (.zip)

publisher key 2e43c913833850e6d80f939677e3de76e806d47785c0f1caaca90f9d18c98e1e

Ratings

No ratings yet — be the first to rate it.