Context and question
Two hypothetical configurations each process 1,000 requests. B halves inference spend, but fewer outputs meet the same hypothetical acceptance threshold and more review is needed. Costs use one arbitrary currency unit consistently.
Inputs and computed results
| Configuration | Accepted / requests | Inference / review / infrastructure | Total | Cost / accepted task |
|---|---|---|---|---|
| A | 800 / 1000 | 40 / 80 / 20 | 140 | 0.1750 |
| B | 600 / 1000 | 20 / 120 / 20 | 160 | 0.2667 |
Reproduce it
Download the complete JavaScript example. Run it with Node; it requires no packages or API keys.
node inference-cost.mjs
The calculation is (inference + review + infrastructure) / accepted tasks. A yields 140 / 800 = 0.1750; B yields 160 / 600 ≈ 0.2667. B is cheaper per inference request and more expensive per accepted task.
Limits and production state
This is a teaching artifact, not a production system, experiment, pricing quote, or evidence that a particular model behaves this way. It omits implementation costs, taxes, retry attribution, and quality variation within accepted tasks. A real study needs measured costs, a predefined quality rubric, workload traces, and repeated trials. The example validates the arithmetic and the importance of the denominator.
Use the method on your workload
Inference optimization and infrastructure · Production architecture analysis · Discuss a measured optimization study