LLM Inference Cost: Why the Real Bill Comes from Tasks, Not Token Prices
This article explains why comparing LLM inference prices per million tokens can be misleading, and why the actual cost should be measured per completed task. It breaks the issue into three layers: model architecture that shapes theoretical unit price, memory and bandwidth constraints that determine real serving cost, and runtime scheduling that turns unit price into an actual bill. It also outlines a reproducible evaluation method based on real business samples, end-to-end latency, retries, and cost-per-score metrics, helping teams compare models and runtime configurations under consistent conditions.
1. Where the Conflict Comes From: Two Price Tags Measure Different Things
In November 2026, one platform cut its lightweight-tier inference price to 1 CNY per million input tokens and 3 CNY per million output tokens. Over the same period, another platform listed its lightweight tier at 2 CNY for input and 8 CNY for output. Looking only at those numbers, the first option appears roughly two-thirds cheaper, and most developers would open its documentation first.
But another set of numbers points in a completely different direction. With the same model and only a change in runtime scheduling, the total cost across 60 real tasks dropped from USD 12 to USD 6, while latency increased by just 4.2%. The unit cost score rose from 218 points per dollar to 450 points per dollar. No model parameters changed, yet the bill looked entirely different.
The two price tags are anchored to different things: one is priced per token, the other is settled per task. Comparing them directly is bound to produce the wrong conclusion. This article breaks that conflict down to a level that can be recalculated.
2. Layer 1: Architecture Determines the “Theoretical Unit Price”
The first reason the lightweight tier is cheap lies in model architecture. Take a sparse MoE model as an example: it has 125B total parameters, activates only about 6B per token, and attaches an additional 51B N-gram Embedding.
Sparse activation separates two concerns: the parameter pool determines how much the model can remember, while the activation volume determines how much computation each inference requires. Context length is also a computed result—the native 262,144 tokens can be extended to 1 million through a position interpolation scheme.
Cost reductions on the training side also come from architecture and process optimization, not subsidies. These numbers must be reproducible; any figure without a traceable source does not count.
An illustrative cost breakdown logic:
Cost per request ≈ input tokens × input unit price+ output tokens × output unit price+ hidden overhead from retries and failed requests- discount from cache hits
3. Layer 2: Memory and Bandwidth Are Where Real Money Goes
Architecture only writes the theoretical discount; realizing it depends on the hardware. Here is a reproducible example: in a 27B dense model, 48 of 64 layers use gated delta net (GDN) attention, with a state size of only 3.21 MB per layer per sequence.
Compared with standard attention, where the KV cache grows linearly with sequence length and memory usage balloons in long-context scenarios, linear attention keeps the state size fixed. This effectively flattens the marginal cost of long text.
The engineering implications are direct:
- Memory budgets become predictable, so batch size does not have to shrink passively as context grows;
- Bandwidth pressure drops, making decode-phase throughput more stable;
- For long documents and repository-level context, the unit cost advantage is amplified.
4. Layer 3: Runtime Turns Unit Price into the Actual Bill
What really creates the gap is the runtime. Switching to a different scheduling strategy for the same model can cut cost in half. Four common techniques are:
- Prefix cache reuse: system prompts, tool definitions, and long-document prefixes are not recomputed after a cache hit;
- Continuous batching: decode steps from different requests are combined to improve compute utilization;
- Speculative decoding: a small model drafts tokens and the large model verifies them in batches, reducing serial steps;
- Tiered routing: simple requests go to the lightweight tier, and only complex requests are escalated, avoiding the use of heavy artillery against mosquitoes.
Illustrative scheduling pseudocode:
def route(req):if req.estimated_difficulty < THRESHOLD:return cheap_model(req) # lightweight tierreturn strong_model(req) # high-capability tier# On a prefix cache hit, both billing and latency drop
A 4.2% increase in latency that saves half the cost shows that the cost bottleneck is often not the compute unit price, but scheduling efficiency.
5. A Reproducible Evaluation Method
Here is a practical process for teams:
- Build an evaluation set with 20–60 real business samples, covering short Q&A, long documents, and multi-turn tool calls;
- Record token usage, end-to-end latency, and the number of failed retries separately;
- Calculate a unit cost score such as points per dollar instead of comparing unit prices alone;
- Fix the same runtime conditions before making horizontal comparisons; otherwise the comparison is invalid;
- Run sensitivity analysis with cache hit rate, batch size, and context length as variables.
6. Conclusion
Unit price is the price tag; the bill is the actual spending. Sparse activation and linear attention lower the theoretical unit price, while runtime scheduling, caching, and batching determine the real bill. When evaluating and selecting a model, unify the measurement basis first, then examine the architecture, and finally stress-test the runtime. Reverse that order, and a low price becomes an illusion.
