LLM Inference Cost Evaluation: What a Higher Per-Token Price Really Means for Performance

    A higher per-token price does not automatically make a new flagship model more expensive. This article explains why per-million-token pricing is the wrong unit for business decisions, breaks down the real drivers of cost across throughput, concurrency and queueing, first-pass yield, and total cost of ownership, and presents a reusable evaluation method based on a fixed evaluation set, shadow traffic, and sensitivity analysis. It also lists practical engineering techniques for reducing cost, such as tiered routing, semantic caching, input compression, streaming output, and full-chain observability. Readers will learn how to build a task-level cost model and reach reproducible conclusions instead of arguing about the headline price.

    1. Define the Problem First: Unit Price Is Not Cost

    Before deciding whether a new flagship model that costs about 2.5x the previous flagship’s per-token price is expensive, it is worth correcting a common measurement mistake: treating the “price per million tokens” as the “cost per business task.” Several coefficients that are not stable across orders of magnitude sit between the two.

    The real cost of a business task can be roughly written as:

    1. task cost ≈ (input tokens + output tokens × k) / effective completion rate × unit price
    2. where k is the billing weight on the output side, and effective completion rate = validated requests / total requests

    Unit price is only one term in the formula. Output speed (tokens/s) determines how many requests can be completed per unit of time, which in turn affects concurrency requirements and waiting time. The effective completion rate determines the extra consumption caused by rework and retries. The hidden overhead of retries, timeouts, and fallbacks to backup paths is often the main reason bills balloon. So evaluating whether a new-generation model is “expensive” is really about evaluating the overall result of this formula, not staring at the number on the far left.

    2. Breaking Down “Expensive or Not” Across Four Dimensions

    2.1 Throughput Efficiency: Output Speed Is the Denominator of Cost

    For generative tasks, latency is dominated by the output phase, and a higher output rate directly shrinks the time window during which a single request occupies resources. Under the same concurrency quota, faster output means more requests can be served per unit of time, which is equivalent to spreading fixed resources across more tasks. This is the most common source of the conclusion that “the new generation costs more per token but feels cheaper”: the denominator got bigger.

    It is worth stressing that the benefits of a higher rate do not translate linearly to the bill. They also improve queueing latency and timeout rates. In long-output scenarios such as code generation and long-form rewriting, timeout retries are a hidden amplifier of cost, and a better rate significantly reduces that loss.

    2.2 Concurrency Capacity and Queueing Latency

    Under high concurrency, system behavior is governed by queueing theory: as the arrival rate approaches the service rate, waiting time rises non-linearly. Completing each request faster is equivalent to raising the service rate, which keeps the system farther from the inflection point under the same load. The direct benefit on the business side is a lower timeout rate and fewer fallback calls, improving user experience and cost at the same time.

    2.3 Effective Completion Rate: Rework Is the Most Expensive Token

    First-pass yield is a severely underestimated cost variable. If the previous generation needed two rounds of correction to pass validation while the new generation passes in one, then even at 2.5x the unit price, actual consumption may still be lower:

    1. previous generation: 2 rounds × 1.0 price = 2.0
    2. new generation: 1 round × 2.5 price = 2.5 → if manual spot checks are still required, the gap narrows further
    3. if the new generation also cuts the manual spot-check ratio from 30% to 10%, total cost flips in its favor

    Comparison therefore has to be made at the granularity of an “end-to-end task,” not a “single call.”

    2.4 Total Cost of Ownership (TCO)

    Beyond invocation fees, you should also count the maintenance of orchestration and retry frameworks, the storage cost of monitoring, alerting, and logging services, cache hit rates, manual review hours, and the one-time investment in migration and regression testing. If a higher unit price buys a simpler pipeline (fewer branch models, fewer fallback strategies), TCO often goes down.

    3. A Reusable Evaluation Method: Replace Intuition with Data

    The recommendation is dual-track validation with “shadow traffic + a fixed evaluation set” to avoid judging by feel.

    Step 1: Build a representative evaluation set that covers the real distribution of short and long inputs, different output lengths, and difficulty tiers.

    Step 2: Replay shadow traffic in a pre-release environment, recording latency distribution (P50/P95/P99), output rate, error code distribution, and retry counts.

    Step 3: Convert to cost using a consistent definition:

    1. def task_cost(avg_in, avg_out, price, out_weight, pass_rate, retries):
    2. tokens = avg_in + avg_out * out_weight
    3. attempts = 1 + retries * (1 - pass_rate)
    4. return tokens * attempts * price / pass_rate

    Step 4: Run a sensitivity analysis to see whether the conclusion holds under varying input/output ratios, concurrency peaks, and pass-rate fluctuations. If the conclusion only holds under ideal conditions, it has no decision-making value.

    4. Cost-Reduction Techniques on the Engineering Side

    • Tiered routing: send simple requests to a lightweight tier and complex requests to the flagship tier, hiding the difference behind a unified abstraction layer to make later replacement easier.
    • Semantic caching: reuse results for high-frequency similar requests, combined with similarity thresholds and invalidation policies.
    • Input compression: trim prompts and retrieved snippets, control context length; savings on the input side often show up immediately.
    • Streaming output and batching: improve perceived latency and raise resource utilization.
    • Full-chain observability: build token-level dashboards on top of the container platform, logging service, and monitoring and alerting systems, turning cost into an attributable metric.

    5. Conclusion

    A unit price of 2.5x the previous flagship is not, by itself, sufficient evidence that a model is expensive. When output rate, first-pass yield, and concurrency capacity improve together, the cost per unit of effective output may stay flat or even drop. The rational approach is not to argue about unit price but to build a cost model at task granularity and use reproducible load tests and shadow traffic to reach a conclusion. Baidu AI Cloud’s practices in model serving, observability, and containerized deployment also support this data-driven approach to model selection.