Solved: it reads your machine, sizes the model, picks one of seven
engines and writes that engine's native config with twelve knobs already set.
Proven: the open model is scored on your traffic, with an interval on
every number and a ? where the evidence is thin.
Agent-driven: describe it in a sentence, or let an agent run the loop over MCP.
$ onpar fit --context 32k --concurrency 8 M4 Max · 128 GB · 546 GB/s usable: 96 GB model quant total ~tok/s licence ───────────────────────────────────────────────── Qwen3 30B-A3B (MoE) q8 56.2G 60 Apache-2.0 Phi-4 14B q8 66.3G 18 MIT NOT FEASIBLE Kimi K3 (2.8T MoE) weights alone need 1,467 GB at q4 — sparsity cuts compute, not memory $ onpar guard receipt.json --traffic mix.json RECEIPT VOID · 17cfed178112 [void] gpt-5: fingerprint changed behind its name [void] workload: 45% of traffic in shapes never scored → re-prove now: the model you proved is not the model in production
Three doors in
Every door leads to the same solver and the same loop. Pick the one that matches what you know today.
Type onpar and describe what you are building. It asks one question
at a time, only when the answer changes the plan, and you leave with a model, a
quantisation and the memory it needs.
onpar learn basics is fifteen lessons, basics then intermediate, where
every figure is computed by the solver for the machine you are on. A 24 GB GPU and a
128 GB Mac get different arithmetic and reach different conclusions.
onpar doctor checks the gateway, the extension and an engine in the order
the loop needs them, and prints the next command. Then observe, distill, fit, prove,
migrate. Each stage can say no.
Agents come through the same doors.
onpar-mcp exposes eleven read-only tools: fit, explain, where, catalog, advise,
build, distill, prove, learn, receipt and guard. There is no cutover, deploy or route tool to
call. Exit code 1 means the world did not cooperate, so retry; 2 means the call was wrong, so
fix it.
Prove it, then move it
Observe, distill, fit, prove, deploy, cut over, guard. Nothing authorises a cutover except shadow mode, and the guard keeps checking that the proof still holds.
A receipt is a file: every claim with its interval, the bar it was measured against, the judge and its human-agreement rate, and — required, never optional — the clusters that did not pass. Re-run the eval set and the digest must match. A signature says we said this; reproduction says and it's true.
It carries the money too, as a range and never a point: the share of traffic that moves is measured, so the dollars inherit its uncertainty. Without a rate, a capture count, or a week of traffic it says the saving is unknown and names what would fix it — it will not extrapolate three days to a month.
onpar brief receipt.json turns it into one self-contained page for
whoever signs off: no network, no script, opens offline in six months, and leading
with what is not proven. A reader who stops after the first screen stops
having read the caveats.
The model changed behind its name → your proof is void. Your traffic moved → the eval set answers questions nobody asks. Something new shipped → your proof is still true. Only the first two mean you no longer know whether production is adequate, and collapsing them is how a watchdog gets muted.
What it sets for you
The planner decides what should be true, then each engine adapter spells it in
that engine's own flags. The output is a real vllm serve, a real
InferencePool, a real llama-server line. It runs with onpar
uninstalled, and anything an engine cannot express is listed, never faked.
Context length, max concurrent sequences, prefill chunk, prefix reuse, speculative decoding, memory fraction, tensor parallelism, structured output, quantisation, KV-cache dtype, LoRA fleet, and the tool-calling parser.
vLLM, vLLM-TPU, SGLang, llm-d, llama.cpp, MLX and Ollama. On Apple silicon the CUDA engines cannot run at all, so the choice there is MLX, llama.cpp or Ollama, and the plan says why.
fp16, bf16, fp8, q8, q6, q5, q4, q3. When it doesn't fit, precision steps down first, then context halves, then it refuses below a 2k floor. Every step given up is named.
The tool-calling parser is a knob because a wrong one fails
silently. With the wrong parser, tool calls come back as plain text with
finish_reason: stop. Nothing errors; the agent just stops acting.
Engine and flags, derived
A stack tuned for throughput and one tuned for tail latency disagree on almost every knob, and the defaults ship somewhere in between. Both are "running vLLM". Only one is running it correctly.
Above 55% shared prompt tokens, RadixAttention reuses that prefix's KV instead of recomputing it per request — structural, and no vLLM flag reproduces it. Below, PagedAttention is the better-supported default.
Drafting is a bet that spare compute exists. At high batch there is none, the verify pass competes with real tokens, and throughput drops. Derived from concurrency — never a checkbox.
Halves KV memory — offered only when KV is what actually binds. It is the one knob with a real accuracy question, and the reason says so: vLLM publishes no quantitative claim. Prove it before you trust it.
Every engine flag is verified against published docs, never
recalled. That rule exists because breaking it shipped a bug:
--guided-decoding-backend had been renamed in vLLM, so every
structured-output config generated was unrunnable. Where a flag can't be confirmed, the
adapter reports a gap rather than a plausible guess.
What the dashboard won't tell you
A planner emits a config on assumptions. Then nobody checks. onpar reports only the predictions your deployment falsified.
candidate-local KV near full — scheduler is preempting KV cache ████████████████████████░░ 94% prefill ██████░░░░░░░░░░░░░░░░░░░░ 25% decode-bound — tune bandwidth running 14 waiting 6 queued 60ms TTFT 210ms e2e 640ms prefix hits 62% draft accepted 41% truncated 12% abandoned 3% THE DEPLOYMENT DISAGREES WITH THE PLAN │ speculative decoding was enabled assuming idle compute, but only │ 41% of drafted tokens are accepted. Below ~60% the draft pass costs │ more than it returns — turn it off or change the drafter. │ 12% of completions stop at the token limit rather than finishing. │ That reads as a quality problem and is almost always max_tokens. │ the card is at 98% memory but the engine's KV cache is only at 60%. │ Roughly 38% is held by another process — engine telemetry alone │ cannot show you this.
Every field is optional and renders as —
when unreadable. A KV utilisation of "0%" reads as plenty of headroom, which is
the exact opposite of we could not tell.
Eval-backed · the three ways a migration dies
The switch off a closed API is usually decided on a vibe, a leaderboard, or a dashboard that has never seen your traffic. Each of these three gaps is how one goes wrong.
MMLU says nothing about whether a model can extract line items from your invoices. onpar builds the eval set from traffic you actually served — redacted before it touches disk, clustered by task shape. Agent loops are replayed one step at a time with everything the incumbent saw — system prompt, tool schemas, prior tool results — and scored on the move: same tool, valid arguments, chance-corrected agreement. Whole sessions are replayed from the recording, and stop at the first call the recording cannot answer.
"94%" over eleven samples is noise wearing a number. Every cell carries a Wilson
interval, and a cell with too little evidence shows ? rather than a
fabricated score.
Shadow first, always. Rollback is automatic and easy to trigger; advancing is only ever a proposal a human applies. The gateway re-derives that rule from the numbers, so buggy automation still cannot escalate.
The auditable core
Every number is arithmetic you can check with --explain. Getting
any of these wrong rejects a model that fits, or accepts one that doesn't.
| Trap | What people do | What it costs |
|---|---|---|
| MoE | Size on active parameters, because that's the headline number. | Weights need total params resident. Sparsity cuts compute, not memory — a 2.8T MoE needs 1,467 GB at q4 whatever its active count. |
| GQA | Use attention heads in the KV formula instead of KV heads. | Up to an 8× overestimate. The model fits; the tool says it doesn't. |
| MLA | Apply the GQA formula to a DeepSeek-family model. | ~50× overestimate. MLA stores a compressed latent, not per-head K/V. |
Any catalogue entry with kv_scheme: mla must set
kv_lora_rank — enforced by a test, because the failure is silent and the
arithmetic looks fine either way.
Every catalogue model on every machine
Pick a machine and a context. Every number is the solver's output for that
machine — the same arithmetic onpar fit runs. Use
onpar fit --explain <model> to see the full breakdown.
Fit data could not be loaded. Run
python3 tools/site_data.py to regenerate
site/assets/fit-explorer.json.
Inference in a box
The box is an artifact plus a binding decision made on arrival — which is why the interesting content is the three outcomes, not the packaging.
Compare · as of 31 Oct 2026
The five products closest to the thesis, against the six stages a migration needs. Each is more mature than onpar at what it does. None joins the stages up.
| Product | Capture proxy | Session replay, recorded tool results | Statistical verdict | Hardware sizing | Native serving config | Cutover gate + rollback |
|---|---|---|---|---|---|---|
| Kitaru 316 stars · v0.7.0, 30 Oct replay with a model swap | — | ✓ | — | — | — | — |
| Langfuse 36.8k stars · v4.72.0, 29 Oct experiments on traces | — | — | — | — | — | — |
| Braintrust closed · Pro $249/mo, third-party reported trace to eval, hosted | — | — | — | — | — | — |
| promptfoo 26.7k stars · 0.125.1, 25 Oct output-level evals, CLI | — | — | — | — | — | — |
| LiteLLM 62.4k stars · v1.106.6, 28 Oct gateway, no quality judgement | ✓ | — | — | — | — | — |
| onpar this project the whole path | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
Inference from first principles
Nine diagrams on a palette validated for colour-vision deficiency against the real surface — computed, not chosen by eye. The full course, with the arithmetic, is in the docs.
Or run onpar learn basics and take the same course on your own
numbers: fifteen lessons where every figure is computed by the solver for the machine you are
on, not a textbook example.
onpar learn basics · for anyoneonpar learn intermediate · for engineersNo login, no tokens, no account
Run onpar with no arguments and it asks what you are
building — one question at a time, only when the answer would change the plan, and you
can stop at any point and still walk away with the best answer so far. In a script or a
CI step it stays a usage error rather than waiting on input.
The sizing solver has zero runtime dependencies and runs offline. Nothing leaves your machine — captured traffic is the most sensitive data you have, and export is an explicit command, never a background sync.
The package is onpar; the command is
onpar. PyPI accepted the bare name, so pip install onpar and
uvx onpar both work. npm refused it as too close to an existing package,
so there the distribution is onpar-cli while the command it installs is
still onpar, and npx onpar-cli works. There is no Homebrew tab
because there is no onpar formula in the tap; a tab advertising one would be the
same defect as before.
Then ask the inverse.
onpar where deepseek-v3 --context 128k answers what would I need to
run this? across 20 hardware classes — including TPU v5e, v6e and v5p, sized per
host because a TPU is not rented by the chip.