cd /news/large-language-models/the-anti-consensus-why-your-local-ll… Β· home β€Ί topics β€Ί large-language-models β€Ί article
[ARTICLE Β· art-177563] src=dev.to β†— pub= topic=large-language-models verified=true sentiment=Β· neutral

The Anti-Consensus: Why Your Local LLM Should Never Be the "Brain" of Your System

A developer argues that on-device small language models should never sit in the control loop of desktop apps, citing memory-bandwidth limits that cap a 4-bit 7B model at roughly 8–14 tok/s on a thin laptop and 30–60 tok/s on mid-tier unified memory, well below the sub-100ms budget for direct-manipulation UI. The proposed architecture routes every spec-bearing task through deterministic, testable code and confines the model to leaf operators with schema-checked parsing, a rules-based fallback, and per-call time and token budgets.

recommendation

Treat model output as untrusted input: validate it against a schema and resolve failures to a deterministic fallback rather than a retry loop, keeping AI operators as leaves in a code-owned pipeline.

more in playbook: Designing agent systems
by read5 min views9 publishedNov 28, 2026

Originally published on Medium: https://medium.com/@dqj1998/desktop-apps-keep-wiring-a-7b-model-into-every-control-path-115063626c2f

Desktop apps keep wiring a 7B model into every control path. Here is the physics β€” and the 10% AI / 90% deterministic code architecture that survives production.

Every new desktop app pitch this year ships the same diagram: a small language model in the center, arrows fanning out to every feature β€” parsing, planning, formatting, error recovery β€” all routed through the same few billion parameters. It demos beautifully. It ships badly.

This is the first article in a six-part series on 10% AI, 90% deterministic code: how to use on-device models hard, but held small. No product tour, no trend forecast β€” just the engineering constraints that force the architecture, and the architecture that survives contact with real users.

The first thing to internalize: token throughput on the edge is a memory-bandwidth problem, not a model-quality problem.

Every decoded token streams the active weights (plus the KV cache) from memory once. The back-of-envelope:

theoretical tok/s β‰ˆ memory bandwidth (GB/s) Γ· active weights (GB)

A 7B model at 4-bit quantization is roughly 4 GB of active weights. Back-of-envelope numbers, measured against hardware classes rather than lab queens:

Hardware class Bandwidth Theoretical Realistic sustained
Thin laptop, shared LPDDR 68–100 GB/s 17–25 tok/s 8–14 tok/s while the UI composites
Mid-tier unified memory 200–400 GB/s 50–100 tok/s 30–60 tok/s
12 GB discrete GPU 270–500 GB/s 65–125 tok/s 45–90 tok/s

Three multipliers turn those numbers into a wall:

Meanwhile, direct manipulation UI has a hard budget: under ~100 ms feels instant, under ~1 s keeps flow, beyond that users reach for the window close button. A model call lives at 500 ms to 5 s. That is not a gap you close with prompt engineering. It is a gap you design around: the model cannot sit inside the interaction loop, and it certainly cannot sit inside the control loop.

The fix is not "use the model less." It is to decide, before writing code, which tasks carry a specification β€” and give every spec-bearing task to deterministic code.

Tasks that must be owned by code, because a spec exists and a machine can check compliance:

Tasks where the model earns its 10%, because no spec exists and variance is acceptable:

The boundary as code:

// Spec-bearing stages stay deterministic: pure, testable.
interface DeterministicStage<I, O> {
  name: string;
  run(input: I): Result<O, SpecError>;
}
// The model appears only as a leaf, with four mandatory fields.
interface AiOperator<I, O> {
  name: string;
  buildPrompt(input: I): string;   // built by code
  parse(raw: string): Result<O, ParseError>; // schema-checked
  fallback(input: I): O;           // rules, not retries
  budget: { timeoutMs: number; maxTokens: number };
}
// A pipeline is a graph; AI operators are leaves, never hubs.
type Stage = DeterministicStage<any, any> | AiOperator<any, any>;

Note the two non-negotiables: parse (the model's output is untrusted input, validated like any other external payload) and fallback (failure resolves to a deterministic result, never to a retry loop).

The alternative to a deterministic pipeline with AI leaves is the end-to-end agent: one model, one context window, all control flow. Both ship. Only one is maintainable:

Property End-to-end agent Deterministic pipeline + AI leaves
Testability Prompt-dependent; tests flake with temperature 90% of the graph has golden tests
Fault isolation Any token can break any feature Failure confined to one leaf with a fallback
Latency variance Seconds, effectively unbounded Bounded by per-leaf budgets
Reproducibility Same input, different output Byte-identical except at AI leaves
Debugging Re-read the transcript, guess Binary-search the graph

Data flow through the pipeline looks like this β€” note that the model sits beside the main path, not on it:

                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
  .pptx file ──▢ β”‚ parse container (deterministic)              β”‚
                 β”‚ build slide tree (deterministic)             β”‚
                 β”‚ extract text/tables/notes (deterministic)    β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚ structured summary (typed)
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ local AI operator                            β”‚
                 β”‚  prompt built by code ──▢ model ──▢ schema   β”‚
                 β”‚  on timeout/error ──▢ deterministic fallback β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚ polished notes (untrusted,
                                 β”‚                schema-checked)
                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                 β”‚ align timeline (arithmetic)                  β”‚
                 β”‚ render / encode (deterministic)              β”‚
                 β”‚ package output (deterministic)               β”‚
                 β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β–Ό
                          output artifact

If any box on the main path fails, you get a reproducible bug report. If the AI leaf fails, you get the fallback output and a log line. Nothing upstream stops, nothing downstream corrupts state.

Boundaries enforced only by convention decay. Make the pipeline data, and the boundary becomes reviewable in a diff:

{
  "pipeline": "document-pipeline",
  "stages": [
    { "type": "deterministic", "id": "parse-container" },
    { "type": "deterministic", "id": "build-structure" },
    {
      "type": "ai",
      "id": "polish-speaker-notes",
      "input": "structured-slide-summary",
      "constraints": {
        "timeoutMs": 3000,
        "maxTokens": 420,
        "temperature": 0.2
      },
      "onFailure": "use-extracted-text"
    },
    { "type": "deterministic", "id": "align-timeline" },
    { "type": "deterministic", "id": "render-and-mux" }
  ]
}

Three numbers do most of the work. timeoutMs: 3000 converts a hung model into a fallback. maxTokens: 420 caps worst-case decode time at that bandwidth math from the first section. temperature: 0.2 keeps retries from wandering. The deterministic stages carry no budgets at all β€” they either return or they throw a reproducible error.

Teams that wire the model into every path meet the same five failures, in roughly this order:

None of these are model-quality problems. Bigger models make them rarer, not absent. They are boundary problems.

Before any task gets routed to the model, ask four questions:

The rule of thumb: the model gets ~10% of the code paths and 100% of the ambiguity. It shines exactly where a spec is missing β€” and nowhere else.

That was the philosophy. The next five articles get progressively more concrete: how to constrain a small model's output so the parse step never fails (grammar-constrained decoding and context minimalism); how to package an inference runtime so it degrades gracefully on a five-year-old laptop; then three articles on a concrete target β€” reading real documents, synthesizing speech, and assembling the whole pipeline into a video β€” before the final piece shows the system it all adds up to.

If you have shipped local-LLM features that regressed exactly this way, you already know why the boundary comes first.

The author is a systems engineer building local-first desktop software. This series is Part 1 of 6.

── more in #large-language-models 4 stories Β· sorted by recency
── more on @medium 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/the-anti-consensus-w…] indexed:0 read:5min 2026-11-28 Β· β€”