Skip to content

Ship the Model, Not the API Call

#local-ai #on-device-inference #moe-offloading #privacy #ollama #gemma #llama-cpp

Ship the Model, Not the API Call ​

The API call is a dependency, not a feature ​

Cyrus Lopez wrote the plain version of this at the end of 2025: adding a cloud model to a feature changes what the product is. Data retention questions arrive first, then consent, audit, breach notification, government requests, training rights. The operational tail follows. Vendor uptime, rate limits, billing, network conditions, and your own backend health all sit between the user and a summary of a page the user already has open on screen.

His framing: you took a UX feature and turned it into a distributed system that costs you money.

That's easy to assert and hard to prove. Four projects shipped recently that go some distance toward proving it. Two are personal finance tools that never ask for a bank login. One is an iOS news reader that summarizes articles on the phone's own hardware. One is a benchmark retest whose author walked back half his earlier conclusions after readers pushed on his method.

None are research demos. All of them run on hardware you can buy today, and three of them run without touching a GPU.

Four stacks, and the hardware is the boring part ​

ProjectThe jobModelsRuntimeHardware
Subscription GhostRank subscriptions by rupees wasted per yearTabPFN-v2 + Gemma 3 1BPython + OllamaPlain CPU, no GPU
Slowth MoneyTrack savings goals against public bank offersGemma 3 12BElectron + OllamaApple M4, 24GB
Brutalist Report iOSSummarize an article into a typed structApple SystemLanguageModelFoundationModelsiPhone Neural Engine
MoE offloading retestMeasure tokens/sec across two offload strategiesFive MoE models at Q4_K_Mllama.cpp + CUDARTX 4090 Laptop, 16GB VRAM

The two finance projects matter most because the data involved is the kind you would never hand to an API. Subscription Ghost runs TabPFN-v2 for the ranking and Gemma 3 1B for the two-line verdict, both in a Python process on 127.0.0.1:8080. Slowth Money ships as an Electron desktop app with SQLite for state and Gemma 3 12B pulled through Ollama, on a machine the author also uses for browsing and coding at the same time.

That last detail is the useful one. A 12B model on 24GB of unified memory leaves enough headroom to run in parallel with other work, which is what makes a local agent feel like a background utility instead of a thing you wait for.

Quick Take: The hard part of local AI stopped being the model. It became the plumbing, and these four projects show the plumbing is now a weekend of work.

What a ranking model on the CPU is actually good for ​

Subscription Ghost exists because the author nearly paid ₹1,499 for a Prime membership where he used one slice of the bundle: shipping. The ₹399 Shopping Edition covers that slice and drops the video he has never opened. The four categories it scores are over-tier (you use one part of a bundle), abandoned (prepaid annually, stopped showing up), dead (paying and barely opening), and price-crept (the number quietly rose).

On a sample person's nine subscriptions it found ₹29,056 a year leaking, and the biggest line was not the obvious one. It was iCloud+ on the 2TB tier at ₹8,988 a year, for someone whose photos fit in 40GB. The 50GB tier at ₹900 covers them. That's ₹8,088 a year going out for storage nobody fills, which is about a month of groceries hiding inside a line item most people scroll past.

The gym came second at ₹8,333. The Prime membership that started the whole project ranked far down at ₹1,100. Small charges camouflage the big ones, which is the argument for a ranked prediction over eyeballing your own statement.

The ranking model earns its place with held-out numbers, not vibes. Fitted on 75% of the subscriptions and scored on the 25% it never saw: mean absolute error of ₹523, rank correlation of 0.971, precision@k of 0.85, and 96% of the rupee waste captured. An MAE of ₹523 on leaks measured in thousands means the rupee figure is a rough size, not an invoice. The 0.971 rank correlation is the number that decides whether the tool works, because you act on the top of the list, not the middle. Of the 20 subscriptions it flags hardest, 17 really are that bad.

And it still misses three. The author put missed: 3 on the public scorecard on purpose, next to a note calling the thing a triage aid rather than an oracle. That single line does more for trust than any accuracy claim would.

Then there's the check no per-line rule can make: cross-subscription overlap. The sample person pays for Prime, YouTube Premium, and Spotify, and all three play music. Each looks fine alone. The tool reads the whole table, sees three music services where one would do, and recommends keeping the one bundled into something already paid for. That overlap is ₹5,376 a year. The model also leaves three subscriptions marked as worth keeping, because a tool that tells you to cancel everything gets closed after one session.

The prose half is fenced in. Gemma gets the real numbers and is forbidden from producing any figure it wasn't handed. A line carrying a price that never appeared in the input gets stripped in code. Cheaper tiers come from a 2026 price catalog rather than the model, so "move to Prime Shopping Edition at ₹399" points at a plan that exists.

Throughput is the tax, and quantization sets the rate ​

The MoE retest is the most useful thing published on this topic in months, largely because it corrects itself. The author ran five mixture-of-experts models on an RTX 4090 Laptop with 16GB of VRAM, comparing --n-cpu-moe selective expert offloading against traditional layer splitting with -ngl.

The first version had a flaw readers caught immediately: the models weren't at the same quantization. Phi-3.5 sat at Q4_K_M, Apex at Q5_K_M, Qwen at Q6_K, Gemma and LFM at Q8_0. Any cross-model comparison was contaminated. The rerun pinned everything to Q4_K_M, added a warmup request, and took the median of three interleaved runs with cooldowns between them.

ModelTraditional splitSelective MoEWinner
Phi-3.5-MoE6.17 tok/s5.15 tok/sTraditional, +19.8%
Apex-35B8.20 tok/s9.70 tok/sSelective, +18.3%
Qwen3.5-35B7.44 tok/s9.00 tok/sSelective, +21.0%
LFM2.5-24B32.96 tok/s35.44 tok/sSelective, +7.5%
Gemma 4 26B13.58 tok/s13.58 tok/sTie

Read the absolute numbers, not just the deltas. Nine tokens per second is slower than most people read, so a 35B MoE at that rate is fine for background summarization and painful for anything that feels like conversation. LFM at 35 tok/s is a different product category entirely.

The quantization finding is the one worth carrying into your own benchmarks. The author took the same Qwen3.5-35B checkpoint and ran it at two quantizations on the same llama.cpp build with 512-token generations. At Q6_K, traditional splitting and selective offload were indistinguishable (6.79 against 6.75 tok/s). At Q4_K_M, selective offload won by 29.5% (8.38 against 6.47). Same model. Same engine. The quantization decided which strategy was "correct."

Then LFM, which had been the disaster case in round one: 2.11 tok/s with selective offloading at Q8_0 against 9.03 tok/s with traditional splitting. A 4x gap. At Q4_K_M the selective path hit 35.44 tok/s, roughly 16.8 times the earlier result, which points hard at CPU memory bandwidth buckling under 8-bit expert weights. But when the run stretched to 512 tokens, the two strategies tied at 21.72 and 21.88 tok/s. The 100-token advantage was noise plus workload length.

Speculative decoding got tested too, and it lost. Gemma 4 26B-A4B has an MTP drafter that proposes tokens for the main model to verify. Enabled, throughput fell from 13.58 to 7.24 tok/s, a 46.7% drop. The telemetry explained it: 11,678 accepted drafts out of 88,200 generated, an acceptance rate of 11.68% with a mean draft length of 1.35. When roughly one draft in nine survives, you pay verification overhead eight times out of nine and get nothing back.

Key numbers

  • ₹29,056/year leaking across nine subscriptions in the demo dataset
  • 0.971 rank correlation on subscriptions the model never saw
  • 3 ghosts the ranking model still misses, published on the scorecard
  • 29.5% selective-offload advantage on Qwen at Q4_K_M versus a tie at Q6_K
  • 11.68% MTP draft acceptance, which is why speculative decoding cost 46.7%

The privacy line is an architecture decision ​

Slowth Money handles the same class of data as Subscription Ghost and draws the boundary differently, at the network layer.

Private context stays on disk: salary, savings, debts, financial goals, family plans, account balances. Public context gets fetched: promotional rates, fees, program rules, contribution limits, general financial education. The two never merge in transit because the private half never leaves the machine.

The trust scoring is the piece I'd copy. Sources get weighted before they enter the retrieval context: government and regulator at 1.00, financial institution at 0.95, established aggregator at 0.75, financial publication at 0.70, general website at 0.40, forum or social media at 0.20. A Reddit thread about a promotional rate can inform the model without being able to override a regulator's rule.

The refresh cadence is the detail that makes this usable. Market data older than seven days triggers a fetch. Country rules older than thirty days trigger a refresh. Otherwise the model doesn't load at all. Nobody needs a promotional-rate check every morning, and running inference on a schedule nobody asked for burns battery for nothing.

The arithmetic lives in TypeScript, not in the model: benefit equals potential offer interest minus current interest minus fees. A 12B model doing compound interest in its head is a bug waiting for a production incident.

What people pushed back on ​

The feedback on the MoE piece was about method, and it landed. Running every traditional-split test first and every selective test second means the second batch inherits a warmer chassis, a busier background, and whatever else the OS decided to do. I've made exactly that mistake. Interleaving the configurations is a five-minute change that removes a whole category of nonsense from your numbers. The corollary nobody mentions: three measurements give you a median, not a distribution. Gemma's traditional runs ranged from 8.98 to 16.85 tok/s. That spread is bigger than most of the effects people publish.

Under the finance projects, the most requested feature was local statement parsing, PDF or OCR, so a user could audit a full year without typing anything. Having tried a crude version of this, I can say extraction is the easy half. Mapping "AMZN IN 4471" back to a real catalog tier without inventing a price is the entire problem, and it's why the current build asks you to tap services from a catalog instead.

A reviewer on Slowth Money asked for decision explanations rather than recommendations: the inputs used, the assumptions made, the uncertainty, the next reversible step. That's the right ask for any financial agent. A recommendation you can't audit is a black box with a rupee sign on it.

The trust-score question came up too. If a bank source at 0.95 contradicts a government rule at 1.00, does the higher score just win? The answer is that the higher score ranks the source, and the disagreement gets flagged instead of silently dropped. Rank does not mean erase.

Common Pitfalls ​

Benchmarking 100 tokens and shipping the conclusion. LFM showed a 7.5% selective-offload edge over 100 tokens and a dead tie over 512. If your feature generates paragraphs, benchmark paragraphs.

Mixing quantizations across models and calling it an architecture comparison. Qwen at Q6_K tied with traditional splitting at 6.79 against 6.75 tok/s. The same checkpoint at Q4_K_M flipped to a 29.5% win for selective offload. Pin the quantization before you form an opinion.

Letting the model do arithmetic. Compute interest, fees, and projected savings in deterministic code and hand the model the results. A 12B model that gets a percentage wrong has failed at the one job you actually needed.

Enabling speculative decoding while experts sit on the CPU. An 11.68% draft acceptance rate turned 13.58 tok/s into 7.24. Check acceptance before you check the benchmark table, and turn the drafter off if it's below roughly 50%.

Trusting the model for prices. Catalog data for the cheaper tier, model prose for the sentence that recommends it, and a code-level strip for any figure that wasn't in the input. A model that invents a rupee figure inside a money tool is a trust failure, not a bug to patch later.

When the cloud still earns its keep ​

Lopez draws the line clearly: local models are excellent at transforming user-owned data. Summarize this page. Classify this email. Extract action items from these notes. Normalize this address. The input is already on the device, the output is small, and a 1B to 12B model handles it in under a second per sentence.

Cloud models win when the task needs knowledge the device doesn't have. Anything that behaves like a search engine for the universe, anything that reasons over material the user never downloaded, anything where a wrong answer costs more than a slow one.

The iOS reader is the clean example of the local side. Brutalist Report chunks article text at roughly 10,000 characters, produces facts-only notes per chunk, then runs a second pass to merge them into one summary. Output comes back as a @Generable Swift struct with a one-sentence TL;DR, three to seven bullets, and comma-separated keywords, each field guided by a natural-language description. That's the part worth stealing. Typed output turns "AI as novelty" into a subsystem your UI can render without scraping markdown.

One thing to remember ​

A measurement is not an explanation. The benchmark author could measure that LFM ran at 2.11 tok/s at Q8_0 and that it ran at 35.44 tok/s at Q4_K_M, and he could not fully explain the gap, because quantization, expert layer placement, and a llama.cpp version bump all moved at once. That gap between what you observed and what you can defend is where most benchmarking arguments actually live, and the honest move is to publish the number, name the confounds, and let someone else try to break it.

The Bottom Line ​

If you're building a feature that transforms data the user already owns, summarize, classify, extract, or normalize, ship a 1B to 3B model inside the app and keep a deterministic fallback for the case where the weights aren't present. Subscription Ghost runs the entire prediction-plus-prose loop on CPU with no GPU and no API key, and that's the bar now.

If you're squeezing 35B MoE models onto a 16GB card, set your quantization first and pick the strategy second. Selective expert offloading won by 21% on Qwen3.5 at Q4_K_M and tied at Q6_K, so a strategy decision made without pinning quantization is a coin flip dressed up as a finding.

One thing to watch: if Apple's @Generable typed-output pattern shows up in Android and Rust toolchains within a year, asking a local model for a struct instead of a markdown blob becomes the default and JSON-mode prompt hacking dies. If it stays Apple-only, expect the opposite, and plan your local features around post-processing text rather than trusting it.