Running a model on your own machine changes where your data goes and who sends the invoice. It does not automatically make either one better: at small-business volume the hosted API is four to eighty times cheaper, and the work of being the operator lands on you.
Teams usually arrive with one question, "should we self-host", and it hides two. The first is a data question: what leaves the building, who processes it, and what you can prove about both. The second is a bill question, and it has an answer you can compute with the numbers below rather than negotiate with a vendor.
Treat them separately, because they have different answers. Data control can make self-hosting the right call on a machine that loses on cost.
The last row is the one that gets left out of the pitch. When you host, you become the processor of your own data, which means the access control, the disk encryption, the log retention and the deletion proof are all yours to build and to show. A model on a laptop in the office with no logging is not a compliance position, it is an unrecorded one.
The licence matters too, and it is checkable in a minute. Both models used below are Apache 2.0 and ungated on Hugging Face, which means the weights can be used commercially and downloaded without an approval step [2] [3].
The vendor of a small model is also worth quoting directly, because they say it better than a policy document would. Inkling 2 Mini's own card tells implementers to "apply appropriate human oversight and review for outputs used in high-stakes or safety-critical contexts" and to add "content filtering, rate limiting and monitoring" at the application layer [3]. That instruction does not change because the model is on your hardware. It becomes your job.
These are the rates on the OpenAI pricing page read on 2026-11-27, per million tokens: gpt-6-luna at $0.10 input and $0.50 output, gpt-6.1-terra at $1.00 and $5.00, gpt-6.2-sol at $2.00 and $10.00, and gpt-6.2-astra at $8.00 and $40.00, with cached input at $0.01, $0.05, $0.10 and $0.40 [1].
gpt-6-luna
gpt-6.1-terra
gpt-6.2-sol
gpt-6.2-astra
The page is a markdown twin, so the rates can be re-read in one command rather than trusted from a blog post written on a Tuesday.
$ curl -sL https://developers.openai.com/api/docs/pricing.md | grep -E "^\| (Model|gpt-6\.2|gpt-6-luna)" | Model | Short context input | Short context output | Short context cached input | Short contex | gpt-6.2-astra | $8.00 | $40.00 | $0.40 | $10.00 | $20.00 | $16.00 | $60.00 | $0.80 | $20.00 | | gpt-6.2-sol | $2.00 | $10.00 | $0.10 | $2.50 | $5.00 | $4.00 | $15.00 | $0.20 | $5.00 | $10.00 | gpt-6-luna | $0.10 | $0.50 | $0.01 | $0.125 | $0.25 | $0.20 | $0.75 | $0.02 | $0.25 | $0.50 |
Against that, a machine you own has three costs and only one of them is the invoice: the hardware spread over its useful life, the electricity it draws, and the attention it needs from somebody who could be doing something else.
The mistake that decides this badly is estimating tokens from headcount. Read a month of real calls from your own logs first.
#!/usr/bin/env python3 """Measure what you already spend before pricing hardware. One CSV row per day.""" import csv RATES = {"gpt-6-luna": (0.10, 0.50, 0.01), "gpt-6.1-terra": (1.00, 5.00, 0.05), "gpt-6.2-sol": (2.00, 10.00, 0.10)} rows = list(csv.DictReader(open("usage.csv"))) m_in = sum(int(r["input_tokens"]) for r in rows) / 1e6 m_out = sum(int(r["output_tokens"]) for r in rows) / 1e6 m_cached = sum(int(r["cached_input_tokens"]) for r in rows) / 1e6 print(f" days measured {len(rows)}") print(f" input {m_in:,.2f}M tokens ({m_cached:,.2f}M cached)") print(f" output {m_out:,.2f}M tokens") busy = max(int(r["input_tokens"]) for r in rows) / 1e6 print(f" busiest day {busy:,.2f}M input tokens, {busy/(m_in/len(rows)):.1f}x the daily mean") for name, (cin, cout, ccached) in RATES.items(): cost = (m_in - m_cached) * cin + m_cached * ccached + m_out * cout print(f" {name:<15}${cost:>11,.2f}${cost*12:>11,.2f} a year at this rate")
The CSV is one row per day with date, input_tokens, output_tokens and cached_input_tokens, which provider dashboards export in some shape. On thirty days of example data it prints this.
date
input_tokens
output_tokens
cached_input_tokens
$ python3 usage.py days measured 30 input 18.06M tokens (9.03M cached) output 3.61M tokens busiest day 0.90M input tokens, 1.5x the daily mean model month cost annual gpt-6-luna $ 2.80$ 33.59 gpt-6.1-terra $ 27.54$ 330.45 gpt-6.2-sol $ 55.07$ 660.89
Two numbers here matter more than the total. The cached share tells you how much of your traffic repeats, because cached input on the cheapest rate is a tenth of the fresh rate. The busiest day tells you what a self-hosted machine would have to absorb at peak, which is a hardware sizing question rather than a cost one.
Every assumption is an argument in this script, so you can put your own numbers in rather than argue with mine.
#!/usr/bin/env python3 """API spend against a machine you own, with every assumption as an input.""" RATES = { # USD per 1M tokens, from the vendor pricing page read on 2026-11-27 "gpt-6-luna": (0.10, 0.50, 0.01), # input, output, cached input "gpt-6.1-terra": (1.00, 5.00, 0.05), "gpt-6.2-sol": (2.00, 10.00, 0.10), "gpt-6.2-astra": (8.00, 40.00, 0.40), } def monthly(m_in, m_out, cached_share, rate): cin, cout, ccached = rate cached = m_in * cached_share fresh = m_in - cached return fresh * cin + cached * ccached + m_out * cout def machine(machine_usd, months, watts, kwh_usd, hours, ops_hours, ops_usd_per_hour): power = watts / 1000 * hours * kwh_usd return machine_usd / months + power + ops_hours * ops_usd_per_hour def report(label, m_in, m_out, cached_share, machine_usd=3000, months=36, watts=400, kwh_usd=0.15, hours=720, ops_hours=2, ops_usd_per_hour=60): print(f"\n{label}") print(f" {m_in:,}M input and {m_out:,}M output tokens a month, {cached_share:.0%} of input cached") own = machine(machine_usd, months, watts, kwh_usd, hours, ops_hours, ops_usd_per_hour) print(f" a machine you own: ${own:,.2f}/month") for name, cost in sorted(((n, monthly(m_in, m_out, cached_share, r)) for n, r in RATES.items()), key=lambda x: x[1]): print(f" {name:<15} ${cost:>10,.2f}/month {'own it' if cost > own else 'use the API'}") if __name__ == "__main__": report("A small internal assistant", 20, 4, 0.5) report("A product answering customers at volume", 500, 100, 0.5)
Run it and the first scenario is the one most small businesses are actually in.
$ python3 breakeven.py A small internal assistant 20M input and 4M output tokens a month, 50% of input cached a machine you own: $246.53/month ($3,000 over 36 months, 400W, $0.15/kWh, 2h of attention) gpt-6-luna $ 3.10/month use the API (79.53x) gpt-6.1-terra $ 30.50/month use the API (8.08x) gpt-6.2-sol $ 61.00/month use the API (4.04x) gpt-6.2-astra $ 244.00/month use the API (1.01x) A product answering customers at volume 500M input and 100M output tokens a month, 50% of input cached a machine you own: $246.53/month ($3,000 over 36 months, 400W, $0.15/kWh, 2h of attention) gpt-6-luna $ 77.50/month use the API (3.18x) gpt-6.1-terra $ 762.50/month own it (0.32x) gpt-6.2-sol $ 1,525.00/month own it (0.16x) gpt-6.2-astra $ 6,100.00/month own it (0.04x)
Read the first table honestly. At twenty million input tokens a month, the cheapest hosted model costs about three dollars against the machine's two hundred and forty-seven, because most of that machine's cost is the electricity to keep it powered whether or not it is busy. Even the flagship rate only just crosses over, and that is before the hours somebody spends maintaining it. At that volume, self-hosting is not a cost decision at all.
The second table is where the argument changes. At five hundred million input tokens a month, the flagship rate is six thousand one hundred dollars against two hundred and forty-seven, and the API keeps losing as the volume grows. If your estimate of monthly tokens is wrong by a factor of ten, the decision can flip, which is why the script takes the number as an argument instead of hiding it.
Cost is decided before you buy anything, by memory. This calculator reads the architecture from the model's own config.json rather than from a download page, because the download page does not know the context length you intend to use.
config.json
#!/usr/bin/env python3 """Will a model fit, read from its own config rather than from the download page.""" import json, argparse def full_attention_layers(cfg): interval = cfg.get("full_attention_interval") n = cfg.get("num_hidden_layers") or len(cfg.get("layer_types", [])) if interval: return max(1, n // interval) if cfg.get("layer_types"): return sum(1 for t in cfg["layer_types"] if "full" in t) return n def kv_per_token(cfg, bytes_per_element=2): layers = full_attention_layers(cfg) heads = cfg.get("num_key_value_heads") or cfg.get("num_attention_heads") head_dim = cfg.get("head_dim") or (cfg.get("hidden_size") // cfg.get("num_attention_heads")) return 2 * layers * heads * head_dim * bytes_per_element, layers, heads, head_dim def main(): ap = argparse.ArgumentParser() ap.add_argument("config") ap.add_argument("--weights-gb", type=float, default=None) ap.add_argument("--contexts", default="32768,131072,262144") a = ap.parse_args() raw = json.load(open(a.config)) cfg = raw.get("text_config") or raw # the architecture block, not the top level per_token, layers, heads, head_dim = kv_per_token(cfg) print(f" layers {cfg.get('num_hidden_layers')} | full attention {layers} | " f"kv heads {heads} at head_dim {head_dim}") print(f" kv per token {per_token/1024:.1f} KiB (fp16)") print(f" {'context':>10}{'kv fp16':>12}{'kv q8_0':>12}{'+ weights':>12}") for ctx in [int(c) for c in a.contexts.split(",")]: kv = per_token * ctx / 1024**3 row = f" {ctx:>10,}{kv:>11.2f}G{kv/2:>11.2f}G" if a.weights_gb: row += f"{kv + a.weights_gb:>11.2f}G" print(row) if __name__ == "__main__": main()
It did not work the first time, and both failures are worth keeping. The architecture lives in a nested block, so reading the top level gets you this:
$ python3 fitcheck.py config.json Traceback (most recent call last): File "/tmp/fitcheck.py", line 17, in kv_per_token head_dim = cfg.get("head_dim") or (cfg.get("hidden_size") // cfg.get("num_attention_heads")) TypeError: unsupported operand type(s) for //: 'NoneType' and 'NoneType'
One line fixed it, and the second failure is a reminder that not every card carries every field. Inkling 2 Mini's config has no max_position_embeddings, so the same script dies on the line that prints the context window with TypeError: unsupported format string passed to NoneType.__format__, and the context figure has to come from the model card instead, which states a context window of up to one million tokens [3].
max_position_embeddings
TypeError: unsupported format string passed to NoneType.__format__
Here is the Bonsai run, against the real config and the measured weight file.
$ python3 fitcheck.py bonsai-config.json --weights-gb 5.58 --contexts 32768,131072,262144 layers 64 full attention 16 (4 interval) kv heads 4 at head_dim 256 kv per token 64.0 KiB (fp16) max context 262,144 tokens context kv fp16 kv q8_0 + weights 32,768 2.00G 1.00G 7.58G 131,072 8.00G 4.00G 13.58G 262,144 16.00G 8.00G 21.58G
Two things fall out of that table. First, the model is 64 layers, but only 16 of them keep a full attention cache, so the cache is a quarter of what the layer count suggests. Second, the advertised context is not the usable context: at the full 262,144 tokens the cache is 16 GiB on its own, and quantising it to q8_0 halves that to 8 GiB.
q8_0
The same arithmetic on the larger model is why a 1M context is a specification rather than a plan. Inkling 2 Mini has 24 layers, all of them full attention, 8 KV heads at head_dim 128, which is 96 KiB per token; at the card's one million token maximum the cache alone is roughly 91 GiB before a single weight is loaded, against a 19.53 GB single weight file [3]. A machine that runs it at 32K comfortably will not run it at 1M, and no config change fixes arithmetic.
Cost is one input. These are the others, and each of them can outweigh the arithmetic.
Data that cannot leave. If the work involves records you are contractually or legally bound to keep in a jurisdiction or on your own hardware, the comparison is not between $61 and $247, it is between self-hosting and not doing the project.
A fixed bill instead of a variable one. A machine you own costs the same in a quiet month and a busy one. Teams with spiky or unpredictable usage value that, especially when a customer-facing feature could otherwise produce a surprise invoice.
Dependency and continuity. A local model keeps answering when an API key expires, a vendor changes its model lineup, or a rate limit appears. Two of our earlier guides are about exactly that class of failure: the first hour after a leaked API key and what a decision model costs per decision.
The quality trade. Local does not mean equal, and the small models are honest about it. The Ternary Bonsai vendor benchmarks put its tool calling close to a much larger model but its agentic coding well below, and those figures are vendor-run, not independently measured. If the job is agentic coding, the cheaper local model can cost more in corrections than it saves.
For the broader choice of which model to put in front of a business process, which model a small business should pick and when to replace an LLM with a decision model cover the adjacent cases, and the two local guides are the Bonsai 2.5 27B run and the Inkling 2 Mini run.
Is local cheaper than the API? At small-business volume, no, usually by a wide margin, because the machine's power and attention costs run whether or not it is busy. It becomes cheaper at high volume on flagship-class rates.
What volume makes self-hosting worth it? Run the script with your own token count. In the model above, the crossover needs hundreds of millions of input tokens a month before the cheapest hosted rates lose.
Does running it locally make us compliant? It moves the duty to you. Hosting removes a vendor from the data path and adds access control, logging, retention and deletion to your side of the ledger.
Which model should go on the machine? Start from memory. A 6 GB ternary model at 32K context wants about 7.6 GiB of weights and cache together; an 18 GiB model wants more than most office machines have.
Can I use these weights commercially? Both models used here are Apache 2.0 and ungated, which permits commercial use. Check the licence on the card for whichever model you pick, and check it again after an update.
What is the most common mistake in this decision? Estimating tokens from the number of users rather than from measured usage. Measure a month of real calls before buying hardware.
[1] OpenAI API pricing, fetched 2026-11-27. Source of every rate used in the break-even model and quoted above.
[2] prism-ml/Ternary-Bonsai-2.5-27B-gguf, fetched 2026-11-27, Apache 2.0, ungated, 17 files in the repository, and the source of the measured weight file used in the calculator. The architecture values come from the pack's own config.json.
[3] thinkingmachines/Inkling-2-mini and its model card, fetched 2026-11-27, Apache 2.0, ungated, one 19,526,019,168-byte weight file, a documented context window of up to one million tokens, and the oversight and application-layer safeguards quoted above.
[4] Prism ML, download the models, fetched 2026-11-27, referenced for the packing sizes that the measured file confirms.
Maxpertise is an AI-native engineering company. We embed native AI engineers inside your team, live in about 10 days. Please enable JavaScript to view the site, or email contact@maxpertise.net.