ProductsRabbit HoleCase StudiesProving GroundBuild YoursResearchAbout
The Rabbit Hole · Part II

Local AI

Less “what is AI?” More “how do I run the thing myself, and should I?”

~75 min·October 2026·Presented by Michael Gibbs
The card

Five rabbit holes. One of them costs money.

01
Why own the inference
Four good reasons, four bad ones, and what “privacy” actually means on either side of the wire.
15m
02
The stack, in plain words
Weights, quant, runtime, endpoint, harness. And a live demo that takes ten minutes.
20m
03
What it costs
Gigabytes, dollars and time. The current hardware board, the current API board, the break-even arithmetic.
20m
04
What you can do with it
The model board, four jobs local models are good for, and the local-plus-frontier architecture.
15m
05
Use it Monday
LM Studio first. One model made boring. Measure. Decide.
5m
Rule for today: if you cannot name the data that must not leave the building, you do not have a requirement. You have a hobby.

Seventy-five minutes, five sections, and a live demo in the second one. The rule for today comes from Part I and has not aged: local inference is a decision about data and money, not a personality. Hobbies are allowed. They should be called hobbies.

01

Why own the inference

Owning the inference is not “anti-cloud”. It is deciding where intelligence is allowed to live, and paying for that decision.

Reasons · not vibes

Section one separates the reasons that survive a budget meeting from the reasons that do not. It ends with the uncomfortable fact that “local” moves the security problem onto your desk rather than removing it.

01 · Why own the inference

Four reasons that hold up in a budget meeting.

Privacy and sovereignty

A named corpus that must not cross an external API boundary: customer records, unreleased code, a contract that says so, an air-gapped site. Note the word “named”. “Sensitive stuff” is not a name.

Economics at volume

If inference runs all day, every day, owned hardware turns a per-token bill into a capacity-planning problem. Only at real volume, and only against the price you would actually pay. Section 03 does the arithmetic.

Latency and offline

No network round-trip, and it keeps working when the WAN does not. Ships, mines, clinics, factory floors, and the demo you give in a basement conference room.

Experimentation

You can swap weights, change the quantisation, fine-tune, instrument every token. The whole stack is inspectable. This is why engineers want one; it is not, by itself, why the company should buy one.

Three of these are business reasons. The fourth is a learning budget. Label it as one and it is fine.

There are four reasons to run a model on hardware you control, and they are not equal. The first is privacy and sovereignty, and it is the only one that wins arguments on its own. If a specific body of data must not cross an external API boundary, whether because a contract says so, a regulator says so, or the site has no network, then local inference is not a preference, it is the requirement. The test is whether you can name the data. “Sensitive stuff” is not a name; “the claims database” is. The second is economics at volume. A per-token bill is a variable cost; a machine is a fixed cost. At some volume the fixed cost wins. The honest version of this argument needs the volume, the price you would actually pay in the cloud for the same quality, and the cost of the person who keeps the machine running. Section three works through it, and the answer in 2026 is less flattering to local than it was two years ago. The third is latency and offline operation, which is real and specific: ships, mines, clinics, factory floors, places where the network is slow or absent. The fourth is experimentation. Engineers want a local model because every layer is inspectable and swappable, and that is a good reason to give a team a learning budget. It is not a reason for the company to run production on it. Call it a learning budget and nobody is misled.

01 · Why own the inference

Four reasons that don’t. Keep this list; you will hear all of them.

THE REASON YOU WILL HEAR → WHAT IS ACTUALLY TRUE
“No API means no risk.”
→
You moved the attack surface onto your own desk. Exposed servers, poisoned model files, your own patching. Next slide.
“We can beat the frontier.”
→
Usually not, and not on the hard days. Quality is one beat behind, sometimes two. Section 03 says how to measure the gap on your own work.
“The GPU is already paid for.”
→
Your time is not. Drivers, quants, context settings, “why is it broken after the reboot”. Budget a human, or you have a hobby with a power bill.
“Open weights means open source.”
→
It does not. The OSI definition needs the training code and data information too. Most open-weight models give you a file and a licence. Read the licence.

None of these is stupid. Each is half of a true sentence. The missing half is where the cost lives.

The original Part II had this list and it is worth keeping, because every one of these sentences will be said in a meeting near you. “No API means no risk” is the most dangerous, because it feels like common sense. What actually happens is that the risk changes shape: instead of trusting a vendor’s contract and security team, you are now running a network service on a machine you patch, loading model files you downloaded from strangers, and deciding who can reach the port. The next slide has the numbers. “We can beat the frontier” is occasionally true for a narrow task with a good test set, and almost never true for general work on a hard day; the right response is not to argue but to measure, which section three covers. “The GPU is already paid for” ignores the only line item that reliably grows: the human hours. “Open weights means open source” is a definitional error with legal consequences. The Open Source Initiative’s definition of open source AI, version 1.0, requires not only the parameters but the complete code used to train and run the system and enough information about the training data that a skilled person could rebuild something substantially equivalent. Almost no open-weight model meets that. What you get is a file and a licence, and the licences differ: Apache 2.0, MIT, and vendor-specific community licences all appear on the model board later in this deck. The licence is usually one page. Read it before you build on it.

Sources (1)
  1. https://opensource.org/ai/open-source-ai-definition
01 · Why own the inference

“No API = no risk.” The attack surface moved. It did not leave.

1,100+

Ollama servers found open to the public internet by Cisco Talos using Shodan. Over 1,000 of them turned up in the first ten minutes of scanning.

Cisco Talos via The Register, Sep 2025
~20%

of those were actively serving models to anyone who asked: free compute, model extraction, jailbreaks. The other 80% were idle but still accepted model uploads and config changes.

Cisco Talos via The Register, Sep 2025
2

model files on Hugging Face found carrying a reverse shell inside a PyTorch (Pickle) payload, built to slip past the platform’s scanner. Removed within 24 hours of the report.

ReversingLabs, Feb 2025

A local model is a network service plus a file you downloaded from a stranger. Treat both exactly that way.

Two findings make the point. In September 2025 Cisco’s Talos team used Shodan, the search engine for internet-connected devices, to look for Ollama servers reachable from the public internet. They found over 1,100, more than a thousand of them within ten minutes of starting. About one in five was actively serving a model to anyone who connected, which means free compute for strangers, the ability to query the model repeatedly and reconstruct its behaviour, and a platform for generating whatever the model can be talked into. The other four in five had no model loaded but still accepted uploads and configuration changes, which is arguably worse. None of these were sophisticated attacks; they were default settings on a port nobody closed. Separately, in early 2025 ReversingLabs found two models on Hugging Face whose PyTorch files contained a reverse shell, a payload that connects back to an attacker’s machine. PyTorch’s default format is a Pickle file, and loading a Pickle executes code; these were compressed in a non-standard way so the platform’s scanner, Picklescan, errored before it reached the malicious part. Hugging Face removed them within a day and fixed the scanner. The lesson is not “don’t run local”. It is that a local model is two ordinary things, a network service and a downloaded file, and both have ordinary security rules: bind to localhost, put it behind authentication, prefer safetensors or GGUF files over Pickle, and download from the model’s own organisation. Part VIII goes deeper.

Sources (3)
  1. https://www.theregister.com/2025/09/02/exposed_ollama_servers_insecure_research/
  2. https://tailscale.com/blog/AI-endpoints-on-public-web
  3. https://www.reversinglabs.com/blog/rl-identifies-malware-ml-model-hosted-on-hugging-face
01 · Why own the inference

Privacy is a contract on one side and a wire on the other.

Cloud API · what you actually get

A contract, and someone else’s ops.

  • OpenAI’s API: not used for training by default; inputs kept up to 30 days for abuse monitoring; zero-data-retention available for eligible use; SOC 2 Type 2; BAAs for HIPAA. Anthropic publishes equivalents.
  • What you do not get: the data stays on your premises. It crosses the wire, is processed on their machines, and is subject to their jurisdiction and their terms, which can change.
  • What you do get: their security team, their patching, their uptime. None of which you have to hire.
Local · what you actually get

Nothing leaves. Everything is yours.

  • LM Studio’s own docs: “Nothing you enter into LM Studio when chatting with LLMs leaves your device.” Model search and downloads do call out (to Hugging Face). Then it runs offline.
  • What you own now: the open port, the downloaded file, the patch schedule, the access list, the logs, the backups, and the 3am reboot.
  • What you must still write down: which data, which machine, who can reach it. The exposed-server study was mostly people who skipped this step.

Pick local because a named dataset must not leave. Pick cloud because you read the contract. Both are decisions. Only one of them is free.

It helps to be precise about what “privacy” buys on each side. A cloud API is a contract. OpenAI’s enterprise privacy page, read in October 2026, says API inputs and outputs are not used to train its models unless you opt in, may be retained for up to thirty days for abuse monitoring, can be put under zero data retention for eligible endpoints, and that the platform is SOC 2 Type 2 audited with business associate agreements available for healthcare. Anthropic publishes the equivalent. That is a strong set of promises, and for most businesses it is enough. What it is not is the data staying in the building: it crosses a wire, it is processed on machines in a jurisdiction you did not choose, and the terms are theirs to change. A local model is a wire that stops at your wall. LM Studio’s documentation is explicit that nothing you type into a chat leaves the device, and that once models are downloaded the application does not need the internet. In exchange you now own everything the vendor used to own: the port, the file, the patching, the access list, the backups and the person who is awake when it breaks. The exposed-server count on the previous slide is what it looks like when people take the wire and skip the ownership. Neither choice is wrong. One of them is a contract you read; the other is a job you staff.

Sources (2)
  1. https://openai.com/enterprise-privacy/
  2. https://lmstudio.ai/docs/app/offline
Discussion · 01

Name the data. Then name the reason.

  1. Which specific dataset in your organisation must never cross an external API boundary? Who decided, and is it written down?
  2. Which of your current AI uses would be noticeably worse if they were one model generation behind the frontier?
  3. Who, by name, would patch the box, close the port and restore the backup? Is that in their job description?
  4. Would a cloud contract with zero data retention and a signed BAA actually satisfy the requirement? If not, what is the requirement?

The first and third questions are the ones that end most local-AI projects, and that is a good outcome: better to end them here than after the hardware arrives.

02

The stack

Five words you will hear, in the order they happen. Then a ten-minute demo so none of them stay abstract.

Weights → tokens

Section two is the mechanics. “I run Qwen” tells you almost nothing; the quantisation, runtime, context setting and harness decide whether the same weights feel brilliant or broken. Five slides and a live demo.

02 · The stack, in plain words

Stop saying “I run Qwen” like that explains anything.

THE MODEL
Weights

The learned numbers. A file you download: tens of gigabytes. Qwen, DeepSeek, GLM, Gemma, Mistral, gpt-oss. Part I: “weights are the knobs.”

COMPRESSION
Quant

Quantisation: store each number in fewer bits. Smaller, faster, slightly dumber. “4-bit” is a family of methods, not one setting.

THE ENGINE
Runtime

Turns weights plus hardware into tokens. llama.cpp, vLLM, MLX, SGLang. This is where speed lives, and where it breaks.

ONE URL
Endpoint

An OpenAI-compatible address on your machine, e.g. localhost:1234/v1. Every app talks to this. It does not care what is behind it.

THE BODY
Harness

Tools, memory, the loop, permissions. The thing that gives the model hands. Part VI is entirely about this.

A model name without the quant, runtime, context and hardware is not a specification. It is a brand.

Here is the whole local stack in five words, in the order they happen. Weights are the model: the billions of learned numbers, shipped as a file you download, usually tens of gigabytes. Part I called them the knobs. Quantisation is compression: storing each of those numbers in fewer bits so the file is smaller and runs faster, at some cost to quality that depends on how far you push it and which method you use. “4-bit” is a family, not a setting, and the next slides make that concrete. The runtime is the engine: the program that takes the weights and your hardware and produces tokens. llama.cpp runs almost anywhere; vLLM and SGLang are built for serving many requests on GPUs; MLX is Apple’s framework for its own chips. Speed lives here, and so do most of the failures. The endpoint is the single most useful idea in the deck: a URL on your machine that speaks the same protocol as the cloud APIs, so every application you own can talk to it without knowing or caring what is behind it. The harness is the software body around the model, tools, memory, the loop and permissions, and it has its own deck now, Part VI. The reason the order matters is that each layer can ruin the one above it. Someone who says “Qwen is bad” has usually tested a particular quant, on a particular runtime, at a particular context setting, on particular hardware. Change any of the four and the verdict changes. A model name is a brand, not a specification.

Sources (5)
  1. https://github.com/ggml-org/llama.cpp
  2. https://docs.vllm.ai/
  3. https://docs.sglang.io/
  4. https://github.com/ml-explore/mlx-lm
  5. https://lmstudio.ai/docs/developer/openai-compat
02 · The stack, in plain words

Open weights: a file you can download. Not open source.

What you get

The parameters, as a file. Qwen3.8-27B is 27 billion numbers; at 16-bit that is about 54 GB on disk before quantisation. You can run it, inspect it, quantise it, fine-tune it, and never send a token to anyone.

What the licence says

It varies. Qwen3.8-27B: Apache 2.0. DeepSeek-V4.1-Flash and GLM-5.3-Flash: MIT. Gemma 4: Apache 2.0. gpt-oss: Apache 2.0. Qwen3.8-Flash-Next: a Qwen “community” licence with its own terms. One page each. Read it.

What “open source” would add

The OSI definition (v1.0) requires the training code and enough data information to rebuild the system. Almost no open-weight model ships that. You can use the file; you cannot reproduce it.

Dense vs mixture of experts

Dense: every parameter works on every token; memory need tracks the parameter count. MoE: many parameters, few active per token (GLM-5.3-Flash: 320B total, 18B active). Fast per token, but all the experts still have to live in memory. Part IV covered why.

Where they come from

Mostly Chinese labs (Alibaba, DeepSeek, Zhipu), plus Google, Mistral and OpenAI’s gpt-oss. Part IX covers the geopolitics and what that means for procurement. Here we only care that the file runs.

An open-weight model is a file. Qwen3.8-27B, released by Alibaba in August 2026, is a dense model of about 27 billion parameters under the Apache 2.0 licence; stored at 16 bits per parameter that is roughly 54 gigabytes before anyone compresses it. You can download it, run it, inspect it, quantise it, fine-tune it, and never send a token anywhere. What you cannot do is reproduce it. The Open Source Initiative’s definition of open source AI, version 1.0, requires the complete training and inference code and enough information about the training data that a skilled person could build something substantially equivalent. Almost no open-weight release includes that, which is why “open weights” and “open source” are different phrases and why Part I warned you not to conflate them. The licences also differ. Among the models on this deck’s board: Qwen3.8-27B, Gemma 4 and OpenAI’s gpt-oss are Apache 2.0; DeepSeek-V4.1-Flash and GLM-5.3-Flash are MIT; Qwen3.8-Flash-Next carries a Qwen community licence with its own conditions. Each is about a page. Two more words you will meet. Dense means every parameter participates in every token, so memory tracks the parameter count. Mixture of experts means many parameters exist but only a subset is used per token: GLM-5.3-Flash has 320 billion in total and 18 billion active. That makes it fast per token and still enormous to store, because every expert has to be in memory in case it is needed. Part IV explained the mechanism; Part IX covers who makes these models and why that matters to procurement.

Sources (7)
  1. https://huggingface.co/Qwen/Qwen3.8-27B
  2. https://huggingface.co/Qwen/Qwen3.8-Flash-Next
  3. https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
  4. https://huggingface.co/zai-org/GLM-5.3-Flash
  5. https://huggingface.co/google/gemma-4-31B-it
  6. https://huggingface.co/openai/gpt-oss-20b
  7. https://opensource.org/ai/open-source-ai-definition
02 · The stack, in plain words

Quantisation: compression at a cost. Here is the cost.

What “a cost” means One public recipe measured Qwen3.8-27B quants against the 16-bit original (mean KL divergence, lower is closer): 6-bit 0.007, 4-bit 0.05, 2-bit 0.35. Fifty times further from the original at 2-bit than at 4-bit.
The formats you will see GGUF (llama.cpp, LM Studio, Ollama), MLX (Apple), EXL3 (NVIDIA, aggressive), FP8/NVFP4 (server GPUs). Same idea, different engines.
The rule Start at 4-bit. Go up if you have the memory. Go down only after your test set says it still passes.
QWEN3.8-27B · MEMORY FOR THE WEIGHTS ALONE · PARAMETERS × BITS ÷ 8
16-bit (as released)
≈ 54 GB
Reference quality. Needs a 64 GB+ box.
8-bit
≈ 27 GB
Near-identical. Fits a 32 GB GPU or 48 GB Mac.
4-bit
≈ 13.5 GB
The usual local choice. Small, measurable loss.
2-bit
≈ 6.75 GB
Fits a 12 GB card. Noticeably dumber.
Weights only. Real downloads run larger: mixed-precision layers, the vision tower, and the context cache (appendix) are extra.

Quantisation is why a 27B model fits a laptop. And why “the same model” gives two people different answers.

Quantisation: round the numbers, measure what you lost

Try it
Real rounding of real numbers. Production quantisers are cleverer about which numbers to protect; the trade is the same.

Quantisation is the trick that makes local AI possible, and it is worth seeing the numbers once. A model’s weights are stored as numbers, and the number of bits used for each one sets the file size: parameters times bits divided by eight gives bytes. Qwen3.8-27B at the 16 bits it was released in is about 54 gigabytes, which needs a machine with more memory than most people have. At 8 bits it is 27 gigabytes and, in most published measurements, indistinguishable from the original. At 4 bits it is about 13.5 gigabytes, fits on a 16 gigabyte graphics card or a modest Mac, and loses a small, measurable amount of quality. At 2 bits it fits a 12 gigabyte card and is noticeably worse. The one public measurement on this slide comes from a MiaAI_Lab recipe for this exact model, which reports mean KL divergence from the 16-bit original (a measure of how far the compressed model’s predictions drift; lower is closer): 0.007 at 6 bits, 0.05 at 4 bits, 0.35 at 2 bits. That is one measurement by one author with one method, so treat it as shape rather than gospel; the shape is consistent with everything else published. Real downloads run larger than the formula because quantised files mix precisions, keep the vision tower uncompressed, and do not include the context cache, which the appendix covers. The formats you will meet are different engines’ containers for the same idea: GGUF for llama.cpp and the tools built on it, MLX for Apple silicon, EXL3 for aggressive NVIDIA quants, FP8 and NVFP4 for server GPUs. The rule is simple. Start at 4-bit. Go up if the memory allows. Go down only when your own test set says it still passes.

Sources (3)
  1. https://github.com/MiaAI-Lab/Qwen3.8-27B-16gb-NVIDIA-GPUs-one-click-install
  2. https://github.com/ggml-org/llama.cpp
  3. https://huggingface.co/Qwen/Qwen3.8-27B
02 · The stack, in plain words

First contact: two runtimes that install like normal software.

LM Studio · the one with a window

Best first contact.

  • A desktop app for Mac (Apple silicon), Windows and Linux. Browse models, download, chat, drop in documents. 16 GB RAM recommended.
  • Runs llama.cpp or MLX underneath; you never see them unless you want to.
  • One switch turns on a local server with OpenAI-compatible and Anthropic-compatible endpoints at localhost:1234. Also a CLI: lms server start.
  • Its docs are explicit that chats do not leave the device. Model search and downloads call Hugging Face.
Ollama · the one in the terminal

Best simple daemon.

  • Install, then ollama run gemma4:e2b. It downloads the model and starts a chat. That is the whole quickstart.
  • A background service at localhost:11434 with an OpenAI-compatible /v1 endpoint. No API key needed locally.
  • A model library with sizes and download weights listed: gemma4 12b is about 8 GB; qwen3.5 9b about 7 GB.
  • Fewer knobs than a serving stack. Also the product behind most of the 1,100 exposed servers: it is easy to put on the internet by accident.

Either one gets a non-engineer from zero to a running model in ten minutes. Pick one; the demo uses LM Studio.

Two tools cover first contact, and both install like ordinary software. LM Studio is a desktop application for Apple-silicon Macs, Windows and Linux. You browse a catalogue, download a model, chat with it, and drop documents into the chat, with no terminal involved. Underneath it runs llama.cpp or, on Macs, Apple’s MLX, but you do not have to know that. Its documentation recommends 16 gigabytes of RAM and says 8 may work with small models. One switch in the Developer tab turns on a local server, by default at localhost port 1234, that speaks the OpenAI and Anthropic API formats; there is also a command-line tool. The docs are specific about privacy: chats and documents do not leave the device, while model search and download call out to Hugging Face. Ollama is the terminal-flavoured equivalent. Its quickstart is one command, ollama run followed by a model name, which downloads the model and opens a chat. It runs as a background service on port 11434 with an OpenAI-compatible endpoint, and its library lists models with download sizes: Gemma 4 at 12 billion parameters is about 8 gigabytes, Qwen3.5 at 9 billion about 7. It has fewer knobs than a serving stack and is also the product behind most of the exposed servers in section one, because binding it to a public interface is a one-line change people make without thinking. Either tool takes a non-engineer from nothing to a running model in about ten minutes, which is what the demo two slides from now does.

Sources (8)
  1. https://lmstudio.ai/docs/app/system-requirements
  2. https://lmstudio.ai/docs/developer/core/server
  3. https://lmstudio.ai/docs/developer/openai-compat
  4. https://lmstudio.ai/docs/app/offline
  5. https://docs.ollama.com/quickstart
  6. https://docs.ollama.com/api/openai-compatibility
  7. https://ollama.com/library/gemma4
  8. https://ollama.com/library/qwen3.5
02 · The stack, in plain words

When you outgrow the toy: four engines, one sentence each.

EngineWhat it isReach for it whenThe hard part
llama.cppPlain C/C++ inference. CPU, NVIDIA, AMD, Apple, Intel, Vulkan, even phones. GGUF files, 1.5 to 8-bit quants. llama serve gives an OpenAI-compatible API.You want the same model on any hardware, or CPU+GPU split for a model bigger than VRAM.Flags. Dozens of them. Record the ones that worked.
vLLMA GPU serving engine from UC Berkeley: PagedAttention, continuous batching, prefix caching. OpenAI-compatible server built in.Many simultaneous requests on NVIDIA or AMD GPUs: a team, an app, a batch job.CUDA versions, model support lag, memory tuning.
SGLangA high-throughput serving framework (LMSYS): RadixAttention, speculative decoding, multi-GPU. Common in aggressive MoE recipes.You are squeezing a large MoE onto specific hardware and following a published recipe.Same as vLLM, with fewer people to ask.
MLXApple’s framework for its own chips. mlx-lm loads Hugging Face models, quantises them, chats.You own Macs with lots of unified memory and want the fastest path on them.Mac only. Smaller ecosystem than GGUF.

All four expose the same kind of endpoint as LM Studio. That is the point: your apps never find out you upgraded.

When a desktop app is no longer enough, usually because more than one person or one program needs the model at once, there are four engines worth knowing, and one sentence each is genuinely enough for a non-specialist. llama.cpp is a plain C and C++ implementation that runs on nearly everything: CPUs, NVIDIA, AMD, Apple and Intel GPUs, Vulkan, even phones. It uses the GGUF file format, supports quantisation from 1.5 to 8 bits, can split a model between CPU and GPU when it does not fit in video memory, and ships a server with an OpenAI-compatible API. Its hard part is the number of command-line flags. vLLM, which began at UC Berkeley’s Sky Computing Lab, is a GPU serving engine built for throughput: PagedAttention for memory, continuous batching, prefix caching, and an OpenAI-compatible server. Reach for it when many requests arrive at once. SGLang, from the LMSYS organisation, is in the same category with its own tricks, RadixAttention and speculative decoding, and turns up in the more aggressive published recipes for running large mixture-of-experts models on specific hardware. MLX is Apple’s framework for its own chips; mlx-lm loads models from Hugging Face, quantises them and serves them, and is the fast path on a Mac with a lot of unified memory. The one thing all four share with LM Studio and Ollama is the shape of the endpoint. Your applications talk to a URL. You can change everything behind it, and they never find out.

Sources (4)
  1. https://github.com/ggml-org/llama.cpp
  2. https://docs.vllm.ai/
  3. https://docs.sglang.io/
  4. https://github.com/ml-explore/mlx-lm
02 · The stack, in plain words

The endpoint: one URL. Everything else is a client.

# Three local runtimes, one shape of address
http://localhost:1234/v1     # LM Studio (default port)
http://localhost:11434/v1    # Ollama
http://127.0.0.1:8080/v1     # llama.cpp: llama serve -hf <model>

# Any OpenAI-style client, pointed at your machine
from openai import OpenAI
client = OpenAI(base_url="http://localhost:1234/v1", api_key="local")
r = client.chat.completions.create(model="<id from LM Studio>",
      messages=[{"role": "user", "content": "Summarise this ticket: ..."}])

Same shape as the cloud

LM Studio also exposes an Anthropic-compatible endpoint; Ollama exposes /v1/chat/completions, /v1/responses and /v1/messages. Tools built for either vendor work unchanged.

What “model” means here

The identifier of whatever you loaded: weights + quant + runtime. Two endpoints with the same model name can behave differently. Pin and record it (section 03).

A harness should not care whether the provider is OpenAI, LM Studio or a basement rack.

If you remember one technical idea from this deck, make it this one. Every local runtime on the previous two slides exposes an address on your machine that speaks the same protocol the cloud vendors use. LM Studio defaults to localhost port 1234, Ollama to 11434, llama.cpp’s server to 8080, and each offers a /v1 path that an OpenAI-style client library will accept without modification; LM Studio and Ollama also offer Anthropic-compatible paths. The code on the slide is the entire integration: a client library, a base URL pointing at your own machine, and a model identifier copied from the runtime. The consequence is that every harness, workflow tool and script you already use with a cloud vendor can be pointed at a local model by changing one line, and pointed back just as easily. That is what makes the local-plus-frontier architecture in section four possible, and it is why the original Part II called the endpoint the important abstraction. Two cautions. First, the model identifier names what you loaded, which is weights plus quant plus runtime; two endpoints advertising the same name can behave differently, so pin and record what is actually behind it. Second, the API key is a placeholder locally, and the runtimes make it easy to serve on the local network. That is a feature inside a trusted office and the exposed-server study everywhere else. Keep it on localhost, or put a real gate in front of it before anyone else can reach the port.

Sources (5)
  1. https://lmstudio.ai/docs/developer/openai-compat
  2. https://lmstudio.ai/docs/developer/core/server
  3. https://docs.ollama.com/api/openai-compatibility
  4. https://docs.ollama.com/quickstart
  5. https://github.com/ggml-org/llama.cpp
02 · The stack, in plain words

The live demo. Ten minutes, five steps, nothing leaves the room.

1
Install LM Studio

lmstudio.ai, download, open. Mac with Apple silicon, Windows x64/ARM, or Linux. 16 GB RAM is the recommended floor.

1 min
2
Pull a ~9B model

Discover tab → search “Qwen3.5 9B” or “Gemma 4 12B”. Pick a 4-bit GGUF, roughly 6 to 8 GB. This is the only step that needs the internet.

3–5 min on office wifi
3
Chat. Then unplug.

Ask it something about a pasted document. Turn wifi off. Ask again. Watch the tokens-per-second counter at the bottom of the window.

2 min
4
Start the server

Developer tab → Start server. Note the address: localhost:1234/v1. Open it in a browser to prove it is there.

30 sec
5
Point a tool at it

Any OpenAI-compatible client: the Python snippet from the last slide, or a harness from Part VI with its base URL changed. Same question, same answer, no cloud.

2 min

What to notice: the download size, the speed counter, and that step 5 took one line. Those three numbers are the whole deck.

This slide scripts the demo; the presenter runs it. Step one is installing LM Studio from its website on a Mac with Apple silicon, a Windows machine or Linux; the documentation’s recommended floor is 16 gigabytes of RAM. Step two is downloading a model in the 9 to 12 billion parameter class, which is the sweet spot for a laptop: Qwen3.5 9B or Gemma 4 12B at 4-bit are each roughly 6 to 8 gigabytes according to the Ollama library’s listed sizes for equivalent builds, and this is the only step that needs the internet. Step three is the point of the demo: chat with it, paste in a document and ask a question, then switch the wifi off and ask again. Nothing changes, because nothing was leaving. While it answers, point at the tokens-per-second counter; that number, on this hardware, is what you are buying with a bigger machine. Step four is one switch in the Developer tab, which starts a server at localhost port 1234; opening the address in a browser proves it exists. Step five is the one-line integration from the previous slide: a script or a harness with its base URL changed to the local address, asking the same question and getting the same answer with no cloud involved. Three numbers come out of the demo: the download size, the speed, and the one line in step five. The rest of the deck is about what those three numbers cost and what they are good for. If the office wifi is slow, download the model before the session.

Sources (5)
  1. https://lmstudio.ai/docs/app/system-requirements
  2. https://lmstudio.ai/docs/developer/core/server
  3. https://lmstudio.ai/docs/developer/openai-compat
  4. https://ollama.com/library/qwen3.5
  5. https://ollama.com/library/gemma4
Discussion · 02

What did you just see, and what didn’t you?

  1. The model answered with the wifi off. What is the first task in your week where that property alone would matter?
  2. The speed counter showed a number. Is that fast enough for a person waiting? For a batch job overnight? For an agent making forty calls per task?
  3. The download was one file from one organisation. Would your IT team let that file onto a company laptop? What would they want to check?
  4. Step five changed one line. Which of your current tools could be pointed at that URL on Monday, and should they be?

Run this straight after the demo while the numbers are on the screen. The second question is the one that separates “chat with a model” from “run a workload”; most people have never thought about tokens per second as a budget.

03

What it costs

Gigabytes, dollars and hours. All three change this year: memory prices did something nobody planned for.

GB · $ · hours

Section three is the money section. It covers how to size a box, what boxes cost in October 2026, what the cloud costs per token, and the hidden line item, which is people. The memory price shock of 2026 runs through all of it.

03 · What it costs

Fit it in the box: parameters × bits ÷ 8. Then add the context.

ModelParametersAt 16-bitAt 4-bitWhat that means
Qwen3.5-9B (dense)9B≈ 18 GB≈ 4.5 GB · download 6.6–7.6 GBAny 16 GB laptop. The demo model.
Qwen3.8-27B (dense)27B≈ 54 GB≈ 13.5 GB · download 17–20 GB (3.5 class)16 GB GPU with care; 32 GB comfortably.
Gemma 4 31B (dense)31B≈ 62 GB≈ 15.5 GB · download 19–20 GB32 GB GPU or 48 GB+ Mac.
gpt-oss-120b (MoE, 5B active)117B≈ 234 GBships at ~4-bit (MXFP4)128 GB unified box: Spark, Strix Halo, M5 Max.
GLM-5.3-Flash (MoE, 18B active)320B≈ 640 GB≈ 160 GB2× DGX Spark, or a 256 GB M5 Ultra.
DeepSeek-V4.1-Flash (MoE)763B≈ 1.5 TB≈ 380 GB512 GB Mac Studio, or a rack. Section 04.

The rule gives the floor. Downloads are bigger, the context is extra, and the runtime wants headroom. Leave a third of the memory free.

Sizing a box starts with one line of arithmetic: parameters times bits divided by eight gives the bytes needed for the weights. The table applies it to models from this deck’s board. Qwen3.5 at 9 billion parameters is about 18 gigabytes at 16-bit and 4.5 at 4-bit, and the Ollama library lists its 9B downloads at 6.6 to 7.6 gigabytes, which is the gap between the formula and a real file: mixed precisions, an uncompressed vision tower, and metadata. Qwen3.8-27B is 54 and 13.5; Gemma 4’s 31B dense model is 62 and about 15.5, with Ollama listing it at 19 to 20. Then come the mixture-of-experts models, where the arithmetic surprises people: OpenAI’s gpt-oss-120b has 117 billion parameters of which about 5 billion are active per token, so it is fast, but all 117 billion must be in memory, and it ships at roughly 4-bit precision to fit a 128 gigabyte machine. GLM-5.3-Flash at 320 billion total needs about 160 gigabytes at 4-bit, and DeepSeek-V4.1-Flash at 763 billion needs about 380, which is 512 gigabyte Mac Studio territory or a rack. All of this is the weights alone. The context cache, the stored attention state for every token in the window, sits on top and grows with the context length; for a representative 32-layer model one published calculation gives about 16 gigabytes at 128K tokens, and for an 80-layer model about 40. That is why a model that fits at a 4K window stops fitting at 64K, and why the runtime’s context setting is part of the specification. Leave about a third of memory free for all of it.

Sources (8)
  1. https://ollama.com/library/qwen3.5
  2. https://ollama.com/library/gemma4
  3. https://huggingface.co/Qwen/Qwen3.8-27B
  4. https://huggingface.co/google/gemma-4-31B-it
  5. https://huggingface.co/openai/gpt-oss-20b
  6. https://huggingface.co/zai-org/GLM-5.3-Flash
  7. https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
  8. https://www.hivenet.com/post/kv-cache-llm-gpu-memory-context-window
03 · What it costs

The hardware board, checked October 2026.

TierBoxMemory for modelsPrice, Oct 2026Fits
Already paid forThe laptop you have (16–32 GB RAM, or any 8–16 GB GPU)8–24 GB$0 extra4–9B at 4-bit. The demo. Classifiers, summaries, private notes.
Serious individualMacBook Pro M5 Max, up to 128 GB unified (614 GB/s)up to ~100 GB16" from $2,699 base; 128 GB costs more27–31B dense at 8-bit; 120B MoE at 4-bit. A daily driver.
Mac Studio M5 Max, up to 128 GB (614 GB/s)up to ~100 GBfrom $2,499 baseSame, on a desk, quieter.
Framework Desktop, Ryzen AI Max+ 395, 128 GBup to ~96–110 GB$3,449 (was $1,999 at launch; out of stock)Same class on x86/Linux. Slower memory than the Macs.
RTX 5090, 32 GB GDDR7, 575 W32 GBMSRP $1,999; street $5,000–8,000Fastest 27–31B box. If you can find one.
Lab / companyNVIDIA DGX Spark, 128 GB unified (273 GB/s)~120 GB$6,950 (launched ~$4,000); 64 GB model $4,999Up to ~200B MoE; two linked for ~400B class.
Mac Studio M5 Ultra, up to 512 GB (1.2 TB/s)up to ~450 GBfrom $5,499 base; 512 GB “late October”DeepSeek-class MoE at 4-bit in one quiet box.

Base prices from vendor pages and launch reporting; street prices from a 19 Oct 2026 price survey. The 2026 DRAM shortage pushed DGX Spark up ~75%, Framework up $460, and the RTX 5090 to 2.5–4× its MSRP. These change: re-check before you quote them.

Part I said $0–800, $1.5–5k, $8–25k+. Memory prices rewrote that: the middle tier now starts nearer $2.5k and the GPU route is the dear one.

This is the hardware board, and it is the one slide where the brief’s warning about perishability applies most. Everything on it was read from a vendor page or launch reporting in October 2026. The first tier costs nothing extra: a laptop with 16 to 32 gigabytes of RAM, or a desktop with any 8 to 16 gigabyte graphics card, runs the 4 to 9 billion parameter models that handle classification, summarisation and private notes. The middle tier is now dominated by machines with unified memory, where the CPU and GPU share one large pool: Apple’s M5 Max in the MacBook Pro and Mac Studio goes to 128 gigabytes at 614 gigabytes per second of bandwidth, with the Studio from $2,499 and the 16-inch laptop from $2,699 before the memory upgrade; the Framework Desktop with AMD’s Ryzen AI Max+ 395 and 128 gigabytes lists at $3,449, up from $1,999 at launch, and was out of stock when checked. The RTX 5090 is the fastest single card for models up to about 31 billion parameters, with 32 gigabytes and a 575 watt power rating, but its $1,999 list price is fiction: the October 2026 survey found the cheapest US listing at $7,998 and other trackers in the $5,000 to $6,500 range. The lab tier is NVIDIA’s DGX Spark, 128 gigabytes at 273 gigabytes per second, now $6,950 after two increases from about $4,000, with a new 64 gigabyte model at $4,999, and the Mac Studio M5 Ultra from $5,499 with 512 gigabytes due late October. The cause of all the movement is the 2026 DRAM shortage driven by AI datacentre demand; Framework’s CEO said in January he expected it to last years. Part I’s dollar tiers of $0 to 800, $1,500 to 5,000 and $8,000 and up were right in 2025. The middle tier now starts nearer $2,500, and the consumer GPU route has become the expensive one.

Sources (11)
  1. https://www.apple.com/mac-studio/
  2. https://www.iclarified.com/101883/apple-launches-mac-studio-with-m5-max-and-m5-ultra-starting-at-2499
  3. https://macworld.com/article/3220024/apple-announces-the-m5-ultra-mac-studio-with-up-to-512gb-of-ram.html
  4. https://www.apple.com/macbook-pro/
  5. https://www.theregister.com/2026/03/03/apples_m5_pro_max_macbooks/
  6. https://frame.work/products/desktop-diy-amd-aimax300/configuration/new
  7. https://www.pcworld.com/article/3031562/framework-raises-prices-yet-again-as-memory-costs-go-up.html
  8. https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/
  9. https://www.digitalcitizen.life/gpu-prices-surge-in-2026-as-nvidia-rtx-5090-reaches-7998-and-amd-graphics-cards-also-get-more-expensive/
  10. https://www.theregister.com/a/5300622
  11. https://aiweekly.co/alerts/nvidia-launches-64gb-dgx-spark-at-4999-as-128gb-hits-6950
03 · What it costs

When cloud wins. The arithmetic, with the real prices.

Cloud model (Oct 2026)In $/M tokOut $/M tokBlended*Tokens to pay off a $6,950 SparkAt 100M tokens / month
GPT-6 Luna (cheap tier)$0.10$0.50$0.20≈ 35 billion≈ 29 years
Claude Haiku 5.5 (cheap tier)from $0.10from $0.50$0.20≈ 35 billion≈ 29 years
Claude Sonnet 5.5 (mid)$2.00$10.00$4.00≈ 1.7 billion≈ 17 months
GPT-6 Astra (frontier)$10.00$50.00$20.00≈ 350 million≈ 3.5 months

What the table says

Against the cheap cloud tier, local never pays off on price. Against frontier prices it pays off in months. So the honest economic case is: work you would otherwise pay frontier prices for, that a local model does well enough. Prove the second half with a test set.

What Part I said, corrected

Part I: “cloud wins under ~50–100M tokens a month.” At 2026 cheap-tier prices that line sits far higher. Local wins on economics only at very high volume, or against frontier prices. It still wins outright on the data question.

*Blended assumes 3 input tokens per output token. Illustrative: it ignores electricity (a 575 W card run 8 hours a day is about 100 kWh a month), the person who runs the box, and the fact that the local model is not Sonnet or GPT-6 Astra. Prices from vendor pages, 26 Oct 2026.

Local vs cloud: your volume, their prices, the payoff month

Try it
Real arithmetic with editable prices. Defaults are the October 2026 list prices on the slide; change them when they move.

Here is the arithmetic nobody puts on a slide, with real prices. The cloud column is from vendor pages read in October 2026: OpenAI’s GPT-6 Luna, “our most efficient model for focused, high-volume tasks”, at $0.10 per million input tokens and $0.50 output; Anthropic’s Haiku 5.5 from $0.10 and $0.50; Sonnet 5.5 at $2 and $10; GPT-6 Astra, the current flagship, at $10 and $50. The blended figure assumes three input tokens for every output token, which is typical of summarisation and classification work. Divide the price of a 128 gigabyte DGX Spark, $6,950, by the blended price per token and you get the number of tokens the box would have to process before it costs less than the cloud. Against the cheap tier that is about 35 billion tokens, which at a hundred million tokens a month is twenty-nine years; the machine will be obsolete long before. Against Sonnet-class prices it is about 1.7 billion tokens, or seventeen months; against GPT-6 Astra about 350 million tokens, or three and a half months. The table is deliberately generous to local: it ignores electricity (an RTX 5090 is rated at 575 watts, so eight hours a day is roughly a hundred kilowatt-hours a month at whatever your tariff is), it ignores the person who runs the box, and it pretends the local model is as good as the cloud model it replaces, which it is not. So the honest economic case for local is narrow and real: work you would otherwise pay frontier prices for, that a local model does well enough on your own test set, at serious volume. Part I’s rule that cloud wins under fifty to a hundred million tokens a month was right in 2025; at 2026 cheap-tier prices the line sits far higher. The data question, from section one, is unaffected by any of this.

Sources (6)
  1. https://developers.openai.com/api/docs/pricing
  2. https://developers.openai.com/api/docs/models/gpt-6-luna
  3. https://developers.openai.com/api/docs/models/gpt-6-astra
  4. https://platform.claude.com/docs/en/about-claude/models/overview
  5. https://www.theregister.com/a/5300622
  6. https://www.nvidia.com/en-us/geforce/graphics-cards/50-series/rtx-5090/
03 · What it costs

Hours: ops is the hidden line item. The local AI checklist.

Write it down

  • Model + exact quant (file hash, not name)
  • Runtime + version, and the flags
  • Hardware + driver versions
  • Context length + cache settings
  • Who patches it, and when

Test it

  • A prompt and tool-call eval set from your real work
  • Tokens/sec and time-to-first-token on this box
  • The exact tool schema your harness sends: a model that writes nice prose can be a bad agent
  • Re-run after every change to any line on the left

Own it

  • The failure and fallback path (cloud? queue? a person?)
  • Access: who can reach the port, from where
  • Backups of the working stack, not just the weights
  • A date to re-check this slide

If you cannot write this down, you do not have a deployment. You have a successful demo.

The third cost is hours, and it is the one that does not appear on any invoice. The original Part II had a checklist and it is kept here intact because it is the most useful thing in that deck. Write down the model and the exact quant, by file hash rather than name, because two files called the same thing can differ. Write down the runtime, its version and the flags, the hardware and driver versions, and the context length and cache settings, because CUDA, kernels, runtime, quantisation tooling and model code all move independently, and “it worked last week” is not a reproducible state. Write down who patches it. Then test it: a set of prompts and tool calls drawn from your real work, measured on this box for speed and time to first answer, and, if a harness will use the model, the exact tool schema that harness sends, because a model that writes pleasant prose can be a poor agent and the only way to know is to try it. Re-run the set after every change to anything on the left. Then own it: the fallback path when it fails, which might be a cloud call, a queue or a person; who can reach the port and from where; backups of the whole working stack and not just the weights; and a date to come back to this list. The line at the bottom is the test. If you cannot write all of this down, what you have is a successful demo, and the honest thing is to call it that.

03 · What it costs

Calibrate your disappointment in advance.

Quality: one beat behind

Sometimes two. The gap has closed a lot and it is not zero: hard reasoning, taste and long-horizon coding still show it. Measure it on your own work, not a leaderboard. Then decide which jobs can live with it.

Ops: the line item you forgot

Drivers, quants, context packing, “why is it broken after the reboot”. The checklist on the previous slide is the price. Budget a human, part-time at least, or the machine becomes a very expensive space heater.

Security: now yours

Secrets, file permissions, exposed APIs, containers, patching, logs. The cloud vendor’s security team does not come with the download. Part VIII covers what good looks like.

WHAT GOES WRONG → THE GUARDRAIL
It fits at a 4K context and falls over at 64K
→
The context cache is memory too. Set the context deliberately and test at that length.
Lovely prose, broken tool calls
→
Evaluate the exact tool schema. Some runtimes need a model-specific chat template; check it.
Works until the reboot, or the update
→
Pin every version. Record the working stack. Reproduce before you “optimise”.

Three disappointments are standard, and knowing them in advance turns them from surprises into line items. The first is quality. Local models are one beat behind the closed frontier, sometimes two; the gap has narrowed dramatically and it is not zero, and it shows most on hard reasoning, on taste, and on long multi-step coding. The correct response is not a leaderboard argument but a measurement on your own work, followed by a sober decision about which jobs can live with the result. The second is operations, covered on the previous slide: budget a person, at least part-time, or the hardware becomes an expensive space heater. The third is security, which section one introduced: secrets, file permissions, the open port, containers, patching and logs are now yours, and the vendor’s security team did not come with the download. Three specific failures are worth naming because everyone meets them. A model that fits at a 4,000-token context and fails at 64,000 has hit the context cache, which is memory on top of the weights; set the context deliberately and test at the length you will use. A model that writes lovely prose and produces broken tool calls has usually met a harness whose tool schema it was never evaluated on, or a runtime using the wrong chat template; test the exact schema. And a stack that works until the reboot or the update has unpinned versions; record the working combination and reproduce it before trying to improve it.

Sources (1)
  1. https://www.hivenet.com/post/kv-cache-llm-gpu-memory-context-window
Discussion · 03

Put a number on it.

  1. How many tokens a month does your organisation actually send to models today? Does anyone know? What would it cost at the cheap tier?
  2. Which job are you paying frontier prices for that a 9B model with the right document in the window could do?
  3. What is the fully loaded cost of the person who would own the box: hours a week, times their rate, times twelve?
  4. If memory prices stay high for years, as Framework’s CEO expects, does that change whether you buy, rent, or wait?

Most rooms cannot answer the first question, and that is the finding: you cannot make the local-versus-cloud decision without a token count. The second question is where the real savings usually are, and they do not require a GPU.

04

What you can do with it

The model board, the four jobs local models are actually good at, and the architecture that uses local for most things and the frontier for the rest.

Local 80 · frontier 20

Section four turns from “can I” to “should I, for what”. It opens with the one slide of model names, which will be stale fastest, then the four jobs that justify a local box, then the routing architecture that ties this deck to Parts III, VI and VII.

04 · What you can do with it

The model board, checked October 2026. Names expire; the method won’t.

Family (maker)Current examplesShapeLicenceNote
Qwen (Alibaba)Qwen3.8-27B · Qwen3.5 0.8B–397B · Qwen3.8-Flash-Next 125B-A6BDense 27B; MoE others; 256K contextApache 2.0 (27B, 3.5) · Qwen community (Flash-Next)Widest size range. The default first pull.
DeepSeekDeepSeek-V4.1-Flash-1017763B MoE; 1M contextMITFrontier-class open weights. Needs the lab tier.
GLM (Zhipu / Z.ai)GLM-5.3-Flash320B MoE, 18B active; multimodalMITCoding and agentic focus. 2× Spark class.
Gemma (Google)Gemma 4 E2B, E4B, 12B, 26B-MoE, 31BDense and small MoE; 256K; visionApache 2.0Strong small dense options for laptops.
MistralMinistral 3 (3B, 8B, 14B) · Mistral Small 4 119BSmall dense with vision; 256KApache 2.0 (Ministral 3)European lineage; edge-focused small models.
gpt-oss (OpenAI)gpt-oss-20b · gpt-oss-120bMoE: 21B/3.6B active; 117B/5B activeApache 2.020B runs in 16 GB. Aug 2025; no newer open release.
RULE
1 · Task quality

On your test set.

RULE
2 · Licence

Read the page.

RULE
3 · Fit

The box you have.

RULE
4 · Tokens/sec

Measured.

RULE
5 · Context

That you will use.

RULE
6 · Tool calling

Your schema.

RULE
7 · Ops pain

Who suffers.

This is the one slide of model names, and it will be stale first; the selection method underneath it will not. Every entry was read from the maker’s Hugging Face page or Ollama listing in October 2026. Qwen, from Alibaba, has the widest range: Qwen3.8-27B is a dense 27 billion parameter model under Apache 2.0 with a 256K context, the Qwen3.5 family runs from 0.8 to 397 billion parameters, and Qwen3.8-Flash-Next is a mixture-of-experts with 125 billion parameters and 6 billion active, under a Qwen community licence rather than Apache. DeepSeek-V4.1-Flash-1017, released 17 October 2026, is 763 billion parameters under MIT with a million-token context: frontier-class and lab-tier hardware. GLM-5.3-Flash from Zhipu is 320 billion total and 18 billion active, MIT, multimodal, aimed at coding and agents. Google’s Gemma 4 runs from effective 2B to a 31B dense model, Apache 2.0 with vision and a 256K context, and is the strongest small-dense option for laptops. Mistral’s Ministral 3 line, 3, 8 and 14 billion, is Apache 2.0 with vision and built for edge devices. OpenAI’s gpt-oss, 20B and 120B mixture-of-experts under Apache 2.0, dates from August 2025 and had no newer open release when checked; the 20B runs in 16 gigabytes. The method is seven questions in order: task quality on your own test set first; licence second, because a model you cannot legally use is not a candidate; fit on the box you have; tokens per second measured rather than quoted; the context length you will actually use; tool calling against your harness’s schema; and operational pain, meaning who suffers when it breaks. Names change monthly. The order does not.

Sources (11)
  1. https://huggingface.co/Qwen/Qwen3.8-27B
  2. https://huggingface.co/collections/Qwen/qwen35
  3. https://huggingface.co/Qwen/Qwen3.8-Flash-Next
  4. https://huggingface.co/deepseek-ai/DeepSeek-V4.1-Flash-1017
  5. https://api-docs.deepseek.com/news/news261017
  6. https://huggingface.co/zai-org/GLM-5.3-Flash
  7. https://huggingface.co/google/gemma-4-31B-it
  8. https://ollama.com/library/gemma4
  9. https://huggingface.co/mistralai/Ministral-3-14B-Instruct-2512
  10. https://huggingface.co/openai/gpt-oss-20b
  11. https://ollama.com/library
04 · What you can do with it

Four jobs a local model is actually good at.

A private assistant on your documents

Contracts, HR files, the claims database: the named data from section 01. Documents go in the window, nothing leaves the machine. LM Studio does this out of the box; Part VII covers doing it properly (retrieval, chunking, what goes wrong).

A cheap classifier or summariser in a workflow

Part III, rung 2: a fixed flow with one AI step. Tag the ticket, extract the fields, summarise the call. A 9B model with the facts in the window does this nearly as well as the frontier, at zero marginal cost, all night.

Coding with a harness, privately

A 27–31B model behind the endpoint, with a harness from Part VI pointed at it. Good for the repo that must not leave, for cheap iteration, and for learning what harnesses do. Not yet a frontier replacement on hard problems.

Batch jobs

Ten thousand documents to classify, a year of transcripts to summarise, a nightly report. Latency does not matter, volume does, and the box is idle anyway. This is where the economics in section 03 actually tilt.

Notice the pattern: messy input, facts supplied in the window, volume, and a human or a rule at the end. Same as every deck in this series.

Four jobs justify a local model, and each connects to another deck. The first is a private assistant on your own documents, which is the named-data case from section one made concrete: contracts, personnel files, the claims database go into the model’s window, and nothing leaves the machine. LM Studio supports dropping documents into a chat out of the box; Part VII covers how to do it properly, with retrieval, chunking, and the ways it goes wrong. The second is a cheap classifier or summariser inside a workflow, which is rung two of Part III’s ladder: a fixed flow where one step uses a model to tag a ticket, pull fields out of a form, or summarise a call. With the facts supplied in the window, a 9 billion parameter model does this nearly as well as a frontier model, at zero marginal cost, and will run all night. The third is coding with a harness: a 27 to 31 billion parameter model behind the endpoint, with a coding harness from Part VI pointed at it. It is good for the repository that must not leave the building, for cheap iteration, and for learning what a harness actually does; it is not yet a replacement for the frontier on hard problems, and the honest expectation is “useful assistant”, not “senior engineer”. The fourth is batch work: ten thousand documents to classify, a year of transcripts to summarise, a nightly report. Latency is irrelevant, volume is high, and the box is idle anyway; this is where section three’s economics genuinely tilt toward local. The pattern across all four is the same one that runs through the whole series: messy input, the relevant facts placed in the window, real volume, and a rule or a human at the end.

04 · What you can do with it

Local for the 80%. Frontier for the 20%. Log all of it.

IN / OUT
Request

A ticket, a document, a coding task, a nightly batch.

CODE / TOOL
Harness

Tools, memory, the loop, permissions (Part VI).

RULE
Router / policy

Two questions, in code: may this data leave the building? Can the local model do this job well enough?

MODEL
Local model

Private, cheap, fast. The default. Behind the one URL.

IN / OUT
Output + audit trail

What ran, which model, which tools, which data left the box.

Model judgesCode / tool actsLeaves the building

This is the architecture the original Part II closed on, and it is still the right one. A request arrives: a ticket, a document, a coding task, a batch. The harness, from Part VI, wraps it with tools, memory, the loop and permissions. Then a router asks two questions, and it asks them in code rather than by asking a model: may this data leave the building, and can the local model do this job well enough? The first is a policy lookup; the second is a rule you set from your test set, possibly with a cheap check on the local model’s output. The default answer sends the request to the local model, private and cheap, behind the one URL from section two. The exception, the twenty percent that is hard, high-stakes, or that failed a check, goes to a frontier API, but only if the data rule allows, and the reason is logged. Everything ends in an output and an audit trail that records what ran, which model, which tools, and which data left the box. Three properties make this the grown-up version rather than a diagram. The router is code, so the data rule is a wall rather than a prompt, which is the same principle Part III applied to agent permissions. The audit trail means the question “which data left the building?” has an answer in a log. And because both models sit behind the same shape of endpoint, swapping either one is a configuration change rather than a project. The percentages are a figure of speech: your test set tells you the real split.

04 · What you can do with it

Three stories everyone in this room should know.

Cisco Talos, 2025

A thousand open doors in ten minutes.

Researchers scanned the internet for Ollama servers and found over 1,100 reachable by anyone, a fifth of them serving models. No exploit was needed: a default setting and a port nobody closed. Idle ones still accepted model uploads.

“No API” is not “no attack surface”. Bind to localhost. Put a gate in front of the port.
ReversingLabs, 2025

The model file was the malware.

Two models on Hugging Face carried a reverse shell inside their PyTorch (Pickle) payload, packed so the platform’s scanner failed before it reached the bad part. Loading them would have handed a stranger a shell. Removed within a day.

A weight file is code you run. Prefer safetensors or GGUF; download from the maker’s own page.
The memory crunch, 2026

The GPU was not already paid for.

AI datacentre demand for DRAM pushed the 128 GB DGX Spark from about $4,000 to $6,950, the Framework Desktop from $1,999 to $3,449, and the RTX 5090 to several times its $1,999 list. Framework’s CEO expects the shortage to last years.

Hardware is a variable cost too. Price the box the week you buy it, and re-check this deck’s board.

Three stories, each attached to one of the bad reasons from section one. The first belongs to “no API, no risk”. In September 2025 Cisco’s Talos team used Shodan to scan for Ollama servers reachable from the public internet and found more than 1,100, over a thousand of them within ten minutes. About a fifth were actively serving models to anyone who connected; the rest were idle but still accepted model uploads and configuration changes. No vulnerability was exploited. People had bound a service to a public interface and never closed the port. The second belongs to the same reason from the other direction. In early 2025 ReversingLabs found two models on Hugging Face whose PyTorch files contained a reverse shell. PyTorch’s default format is Pickle, and loading a Pickle executes code; these files were compressed in a non-standard way so the platform’s scanner errored before reaching the payload. Hugging Face removed them within a day and fixed the scanner, and the general lesson stands: a weight file is code you run, so prefer formats that cannot execute, such as safetensors or GGUF, and download from the maker’s own page. The third belongs to “the GPU is already paid for”. In 2026, AI datacentre demand for memory chips drove consumer and workstation prices up sharply: NVIDIA’s 128 gigabyte DGX Spark went from about $4,000 at launch to $6,950 by October, Framework raised its 128 gigabyte desktop from $1,999 to $3,449, and the RTX 5090 sold for several times its $1,999 list price. Framework’s CEO said in January he expected the shortage to last years. The hardware line in a local-AI budget is not fixed either.

Sources (6)
  1. https://www.theregister.com/2025/09/02/exposed_ollama_servers_insecure_research/
  2. https://www.reversinglabs.com/blog/rl-identifies-malware-ml-model-hosted-on-hugging-face
  3. https://www.theregister.com/a/5300622
  4. https://www.pcworld.com/article/3031562/framework-raises-prices-yet-again-as-memory-costs-go-up.html
  5. https://frame.work/products/desktop-diy-amd-aimax300/configuration/new
  6. https://www.digitalcitizen.life/gpu-prices-surge-in-2026-as-nvidia-rtx-5090-reaches-7998-and-amd-graphics-cards-also-get-more-expensive/
Discussion · 04

Which of the four jobs is yours?

  1. Which pile of documents would people in your organisation ask questions of, if they were certain nothing left the building?
  2. Which workflow step today sends a cheap, repetitive task to a frontier model because that was the only model anyone had set up?
  3. If you drew the router slide for your organisation, what would the data rule actually say? Could you write it as a list?
  4. What would the audit trail need to record for your compliance team to sign off on the 20% that leaves?

The third question usually reveals that no written data rule exists, which is the real blocker, and it is not a technical one.

05

Use it Monday

Five steps, in order. Most people should stop after the third for a while, and that is fine.

Start boring

Section five is the Monday plan. It is deliberately cheap: the first three steps cost nothing but an afternoon, and most organisations should sit at step three for a month before buying anything.

To steal

What I would do on Monday.

01
LM Studio first.

On the laptop you have. Pull a 9B model at 4-bit, chat, turn the wifi off. One hour. If this feels useless, stop here; you have learned something cheaply.

02
Make one model boring.

Pick one job from the four. Build a 50-case test set from real work. Run it. Record the model, quant, runtime, context and speed. Boring means it passes the same way every day.

03
Expose the endpoint. To one app.

Start the server on localhost. Point one tool at it: a script, a workflow step, a harness. Not the office network, not the internet. Watch it for a week.

04
Measure.

Tokens a month, tokens per second, test-set pass rate, hours spent. Four numbers. Compare the first against the cloud price table before anyone says “GPU”.

05
Decide.

Named data that must not leave → local, and buy the box the job needs. Volume against frontier prices → maybe. Neither → cloud, with the contract read. Hobby → say so.

The boring architecture wins: a stable endpoint, a measured model, explicit permissions, a frontier fallback, and a log.

Five steps, each cheaper than the one people usually start with, which is buying hardware. Step one: install LM Studio on the laptop you already have, pull a 9 billion parameter model at 4-bit, chat with it, and turn the wifi off. An hour, no spend. If it feels useless to you, stop and you have learned that cheaply. Step two: make one model boring. Choose one of the four jobs from section four, build a test set of about fifty cases from real work, run it, and write down the model, the quant, the runtime, the context setting and the speed. Boring means it passes the same way every day, which is the property production needs and demos lack. Step three: expose the endpoint, on localhost, to exactly one application: a script, a workflow step, or a harness from Part VI. Not the office network, not the internet. Watch it for a week. Step four: measure four numbers. Tokens per month, tokens per second, test-set pass rate, and hours spent by the person looking after it. Put the first one against the cloud price table from section three before anybody says the word GPU. Step five: decide, using the rule for today. Named data that must not leave means local, and you buy the box the job needs. Serious volume against frontier prices means maybe, and the test set decides. Neither means cloud, with the contract read. And if the honest answer is that someone wants a homelab, say so; hobbies are allowed. The architecture that wins is the boring one: a stable endpoint, a measured model, explicit permissions, a frontier fallback, and a log.

The names will be wrong in six weeks.
The architecture will not.

Weights you can hold. A quant you measured. A runtime you pinned. One URL your tools talk to. A rule that says which data stays home, and a log that proves it did.

That is the rabbit hole. The rest is a download.

Appendix · For the nerds

Quant formats, and the context cache that eats your memory.

GGUF

llama.cpp’s container; what LM Studio and Ollama mostly run. Quant names like Q4_K_M: 4-bit “K-quant”, medium. Mixed precision inside: important layers kept at higher bits. 1.5 to 8-bit variants exist.

MLX

Apple’s framework for its own chips. mlx_lm.convert -q quantises a Hugging Face model; Ollama and LM Studio list separate MLX builds (e.g. gemma4 31b-mlx, 19 GB). Fastest path on a Mac.

EXL3 · FP8 · NVFP4

NVIDIA-side formats. EXL3 (ExLlamaV3) allows fractional bits per weight, e.g. 2.5 or 2.9 bpw, used in aggressive recipes for big MoEs on small boxes. FP8/NVFP4 are server-GPU native precisions.

# KV (context) cache, per token, full-attention transformer
bytes_per_token = layers * 2 * kv_heads * head_dim * bytes_per_value

# representative 32-layer model, 8 KV heads, head_dim 128, BF16 (2 bytes)
32 * 2 * 8 * 128 * 2 = 131,072 bytes/token   # 128 KiB
131,072 * 131,072 tokens ≈ 16 GiB at a 128K context   # ~8 GiB at FP8

# 80-layer model, same heads: 320 KiB/token → ~40 GiB at 128K

Two things the main deck simplified. First, formats. GGUF is llama.cpp’s container and what LM Studio and Ollama mostly run; its quant names, such as Q4_K_M, encode the bits and the method, and the files are mixed precision inside, with the layers that matter most kept at higher bits. MLX is Apple’s own framework, with its own quantised builds listed separately by the runtimes. EXL3, from the ExLlamaV3 project, allows fractional bits per weight, which is why the public recipes for squeezing a 300 or 700 billion parameter mixture-of-experts model onto two DGX Sparks talk about 2.9 bits per weight; FP8 and NVFP4 are precisions that server GPUs compute in natively. Second, the context cache. A transformer stores, for every token in the window and every layer, the attention keys and values it computed, so it never recomputes them. The size per token is the number of layers, times two for keys and values, times the number of key-value heads, times the head dimension, times the bytes per value. For a representative 32-layer model with 8 key-value heads and 128-dimensional heads at 16-bit that is 131,072 bytes per token, or 16 gibibytes at a 128K-token context; an 80-layer model with the same heads needs about 40. These are one published worked example and real models vary, but the shape is right: the cache scales with the context length you configure, not with how much you typed, and storing it at 8-bit or 4-bit halves or quarters it. This is the second term in fitting a model in a box. The weights were only the first.

Sources (5)
  1. https://github.com/ggml-org/llama.cpp
  2. https://github.com/ml-explore/mlx-lm
  3. https://ollama.com/library/gemma4
  4. https://huggingface.co/Mia-AiLab
  5. https://www.hivenet.com/post/kv-cache-llm-gpu-memory-context-window
Appendix · For the nerds

Version pinning, and recipes worth stealing.

# What one public recipe pins (Qwen3.8-27B on a 16 GB NVIDIA card)
engine      ExLlamaV3 v1.6.0      # refuses to start on other versions
driver      NVIDIA 570+           # CUDA build cu128 (or cu132)
python      3.11+   node 22.19+
quant       EXL3 2.5 bpw @ 176K context (16 GB default)
            EXL3 4.0 bpw @ 262K context (24 GB+)
kv cache    int4
endpoint    http://127.0.0.1:8888/v1   # OpenAI-compatible
quality     mean KL vs bf16: 6.0 bpw 0.007 · 4.0 bpw 0.05 · 2.0 bpw 0.35
speed       one RTX 5090, 4.0 bpw: ~100–275 tok/s decode depending on task

github.com/MiaAI-Lab

Public recipes with pinned versions: Qwen3.8-27B one-click install for 16–32 GB NVIDIA cards; Qwen3.8-27B on SGLang for DGX Spark; DeepSeek-V4-Flash on 2× DGX Spark; GLM-5.3-Flash EXL3 on 2–4 Sparks; sparkDash monitoring.

huggingface.co/Mia-AiLab

The matching quants: EXL3 builds of DeepSeek-V4.1-Flash at 2.9–3.0 bpw, GLM-5.3-Flash at 4 bpw, MiniMax-M3.1-Flash and others. Plus the makers’ own pages: Qwen, deepseek-ai, zai-org, google, mistralai, openai.

The original Part II made a point worth keeping: the useful unit of local-AI knowledge is a recipe, not a model name. The code block shows what one public recipe actually pins for running Qwen3.8-27B on a 16 gigabyte NVIDIA card: the engine, ExLlamaV3 at exactly version 1.6.0, which the kit refuses to run without; the driver generation and CUDA build; the Python and Node versions; the quant and context setting per memory size, 2.5 bits per weight at a 176K context as the 16 gigabyte default, 4.0 bits at 262K for 24 gigabytes and up; the cache precision; the endpoint; and measured quality and speed on named hardware, including the KL divergence figures used on the quantisation slide and decode speeds of roughly 100 to 275 tokens per second on a single RTX 5090 depending on task. Those speed figures are the author’s own measurements and will not transfer to your box; the point is that they were measured and recorded. The order of theft is: copy the pinned versions first, the launch flags second, and ignore anyone’s benchmark until you have run your own job. MiaAI_Lab’s GitHub organisation holds recipes for a range of hardware, from single consumer cards to multiple DGX Sparks, and its Hugging Face account holds the matching quantised files; the makers’ own Hugging Face pages, Qwen, deepseek-ai, zai-org, google, mistralai and openai, are where the original weights and licences live. Download from those, check the hash, pin the stack, and write it down.

Sources (3)
  1. https://github.com/MiaAI-Lab/Qwen3.8-27B-16gb-NVIDIA-GPUs-one-click-install
  2. https://github.com/MiaAI-Lab
  3. https://huggingface.co/Mia-AiLab