Why LLM Inference Costs Are Dropping: A Breakdown

    This article explains why large language model inference prices have fallen into distinct tiers and what is driving the decline. It breaks down the cost structure of a token bill, showing why output (decode) is more expensive than input (prefill), and examines four technical drivers: sparse architectures, low precision and quantization, caching, and scheduling with product tiering. It also offers a practical framework for comparing self-hosting against API calls, a metric for cost per successful task, and a layered strategy for routing, prompt governance, output constraints, quality control, observability, and capacity planning.

    1. The Shift: Inference Prices Now Come in Tiers

    Among the changes of the past year or two, the most noticeable has not been a jump in benchmark scores but a clear inflection in the price curve for calling large models. Take text generation services as an example: a single generation of capability can be split into two or more tiers. The output price of the lightweight tier has been pushed down to roughly RMB 2 per million tokens (about USD 0.28), while the capability tier sits around RMB 24 (about USD 3.48) per million tokens. Meanwhile, some high-end closed-source models overseas still charge around USD 25 per million output tokens. That leaves a gap of more than sevenfold between the capability tier and the high-end overseas tier, and a gap of more than two orders of magnitude for the lightweight tier.

    These numbers have sparked wide discussion not because they are “cheap,” but because they shake a long-held assumption: that stronger capability must be traded for more expensive compute and a higher unit price. When price tiers no longer map strictly to capability tiers, the AI budget models that companies built on “unit price × call volume” need to be rewritten, and architectures designed around high unit prices—such as aggressively compressing prompts, strictly limiting output length, and moving complex logic outside the model—need to be re-evaluated.

    What deserves emphasis is that price is only the outcome. What developers should really focus on is the change in the underlying cost structure, because only by understanding the structure can you tell whether a price cut is a sustainable engineering optimization or a short-term subsidy, and only then can you map your own workload to the right tier.

    2. Breaking Down the Cost Structure: What a Token Bill Actually Pays For

    The cost of a single online inference is roughly made up of four parts:

    • GPU memory cost: model parameters and the KV cache reside in memory, which determines how many requests a single card can serve concurrently;
    • Compute cost: strongly correlated with the number of parameters involved in computation and the sequence length;
    • Memory access cost: autoregressive decoding re-reads weights and cache for every token generated, and memory bandwidth often becomes the bottleneck;
    • Serving cost: queuing, scheduling, scaling, logging, and monitoring.

    The key conclusion is that the output phase (decode) is usually more expensive than the input phase (prefill). Prefill can be highly parallel with high compute utilization; decode is token-by-token and serial, memory-access intensive, and holds the KV cache for a long time per request. This explains why vendors generally price input and output separately, with the output unit price significantly higher than the input unit price. Any “price cut” that does not change the cost structure of decode has limited room to work.

    3. Four Main Drivers: The Technical Forces Behind Lower Prices

    3.1 Sparsification: Decoupling Total Parameters from Activated Parameters

    Mixture-of-experts architectures let each token activate only a subset of expert networks, so total capacity can be made very large while the parameters actually involved in a single forward pass drop significantly. For providers, this directly lowers compute and memory access; for users, it explains “why capability has not dropped proportionally while price has fallen sharply.” The engineering caveat is that sparsification shifts pressure onto memory capacity and load balancing of expert routing—uneven hits on long-tail experts can cause individual devices to queue.

    3.2 Low Precision and Quantization: Trading Bandwidth for Cost

    Compressing weights and cache from high precision down to 8-bit or lower reduces both memory footprint and memory access, with especially clear gains in the decode phase. The tradeoff is that precision-sensitive tasks (numerical reasoning, long chains of logic, strict code syntax) may degrade, so a hybrid strategy of “low precision for weights plus high precision on critical paths” is common in practice.

    3.3 Cache Reuse: An Underrated Cost Lever

    Prefix caching amortizes the computation of repeated prefixes such as system prompts, tool definitions, and long documents; result caching can directly eliminate repeated computation in high-repetition Q&A scenarios. Every ten-percentage-point increase in hit rate noticeably changes the structure of the bill.

    3.4 Scheduling and Product Tiering: Routing Different Loads to the Right Hardware

    Continuous batching, paged cache management, separate deployment of prefill and decode, and load-profile-based tiered scheduling are all general techniques for improving overall throughput. Tiered products (lightweight/capability) are essentially about routing requests of different difficulty to different cost structures, rather than simply discounting the same model.

    4. Look Beyond Unit Price: The Break-Even Between Self-Hosting and API Calls

    Self-hosting inference may look like it has a “lower unit cost,” but you need to factor in equipment depreciation, utilization, peak redundancy, operations staff, model iteration, and compliance costs. A practical way to judge is to first estimate the total annual cost of self-hosting, then compare it against the total cost of API calls:

    1. def compare(annual_tokens_m, price_per_m, self_host_cost, utilization=0.35):
    2. api_cost = annual_tokens_m * price_per_m
    3. effective_self = self_host_cost / max(utilization, 0.05)
    4. return {
    5. "api_cost": round(api_cost, 2),
    6. "self_host_effective": round(effective_self, 2),
    7. "verdict": "self" if effective_self < api_cost else "api",
    8. }
    9. print(compare(annual_tokens_m=120000, price_per_m=24,
    10. self_host_cost=1_800_000, utilization=0.3))

    The point of this sample code is not the numbers but making “utilization” explicit in the model: under low utilization, the effective cost of self-hosting is multiplied several times over, which is why most small and medium-scale workloads are better served by calling a service.

    5. A Combined View of Performance and Cost

    A lower unit price does not mean a lower bill. What truly determines spending is: the unit price per million tokens, task success rate, average number of retries, input-to-output ratio, and cache hit rate. A common counterexample is switching to a cheaper tier and then seeing retries double due to unstable output, so total cost actually rises. It is advisable to establish a “cost per successful task” metric:

    1. cost per successful task = (input tokens × input unit price + output tokens × output unit price)
    2. / (1 - failure rate) / cache discount factor

    At the same time, run regressions against a fixed evaluation set and write quality constraints into the cost model to avoid the hidden debt of “cutting cost means cutting quality.”

    6. Implementation: A Practical Layered Strategy

    1. Tiered routing: use the lightweight tier for intent recognition and format validation, and the capability tier for complex reasoning and code generation;
    2. Prompt governance: put stable prefixes first and dynamic content later to improve prefix cache hit rate;
    3. Output constraints: use structured output and maximum length limits to compress wasted tokens;
    4. Quality gatekeeping: a three-stage chain of rule validation + small-model review + large-model fallback;
    5. Observability: attribute usage and cost by business, scenario, and model tier, and configure budget alerts;
    6. Capacity planning: base scaling on peak concurrency and cache hit rate rather than average QPS.

    When implemented on the cloud, the above capabilities map to general building blocks: a container platform hosts inference services and elastic scaling, object storage holds datasets and model artifacts, a message queue smooths and asynchronous requests, and logging and monitoring complete cost attribution and anomaly detection. Baidu AI Cloud provides standard support across these general capabilities, but the specific choices should still be based on your own load profile.

    7. Conclusion

    Price tiering is the outward manifestation of engineering optimization reaching a tipping point, not the result of marketing. The practical meaning for developers is that cost has shifted from an “uncontrollable variable” to a “designable variable.” Understand the four main drivers—sparsification, low precision, caching, and scheduling—then combine them with tiered routing and an observability system, and you can find your own optimum among capability, latency, and budget instead of passively following unit price swings.