A Technical Breakdown of LLM Inference Pricing and Cost Logic

    This article breaks down why large language model inference pricing is fundamentally a function of resource consumption rather than perceived model quality. It maps total and activated parameters to cluster size and decode throughput, explains why input and output prices stay near a 1:2 ratio, and shows how context caching, attention compression, and utilization determine real gross margin. Readers will get a first-principles cost model, a small capacity estimation script, and a practical checklist for evaluating new model prices.

    1. The Real Issue: Pricing Disputes Are Really About Opaque Cost Structures

    Whenever a new LLM service tier publishes its price, the most common community question is some version of “is this expensive?” That question cannot be answered until three things are clear: what service form the price corresponds to, which physical resources make up the cost, and which uncounted risks the provider is absorbing.

    The original comparison data is worth restating: one tier has roughly 283B total parameters with about 13B activated, priced at 1 for input and 2 for output; another has roughly 1.6T total parameters with about 49B activated, priced at 12 for input and 24 for output; the previous generation had roughly 671B total parameters with about 37B activated, priced at 2 for input and 3 for output. What matters is not the absolute numbers but the ratios between them.

    Dividing these tiers against each other yields a revealing result: the input-to-output price ratio stays near 1:2 over time, while the price gap between tiers is driven mainly by the ratio of total to activated parameters, not by vague claims that a model is “smarter.” The anchor for pricing is resource consumption, not benchmark scores. Understanding this is the prerequisite for every cost derivation that follows.

    2. First-Principles Cost Breakdown: Reducing Price Back to Resources

    LLM inference cost can be roughly reduced to four resource categories, and every price is paying for these four.

    The first is accelerators and the serving cluster. Total parameters determine how much VRAM the weights occupy, which in turn determines how large a serving cluster must be to fit one model replica into memory with cache headroom. Jumping from the 283B range to the 1.6T range multiplies weight size several times over, and the minimum deployable unit expands accordingly. This is rigid fixed cost, independent of request volume, and can only be amortized by raising utilization.

    The second is VRAM bandwidth and decode speed. During autoregressive decoding, every generated token requires reading the activated weights and the current context cache again, so the activated parameter count directly determines bytes accessed per token, and therefore the per-card throughput ceiling in memory-bound scenarios. The nearly fourfold gap between 13B and 49B activated parameters shows up directly in the question of why output costs more than input.

    The third is the context cache. In long-context scenarios, reading, writing, and moving the cache often consume more bandwidth than weight access, which is why providers introduce various attention compression strategies: reducing the number of tokens actually included in computation to the 512 or 1024 range, using ultra-sparse attention with 128x compression to select key segments, and adding a 128-token sliding window to preserve local coherence. These mechanisms share one goal: turning cache overhead from “growing linearly with context” into “approximately controllable constant-level growth.”

    The fourth is uncounted hidden cost: peak redundancy, failover, cold starts, and queuing plus timeout retries for long-tail requests. None of this appears in a parameter table, but all of it is real on the bill.

    3. Why Input and Output Must Be Asymmetric

    The input stage can be processed in parallel; a single forward pass consumes the entire prompt, and the bottleneck is compute. The output stage must generate token by token in series, and the bottleneck is VRAM bandwidth and cache reads and writes. This explains the 1:2 price structure at the physical level: on the output side, no single memory access can be fully hidden by batching.

    A minimal capacity estimation script makes this logic explicit and helps teams sanity-check the order of magnitude during selection (values are illustrative, not parameters of any specific product):

    1. def estimate(weights_bytes, kv_bytes_per_token, ctx_len,
    2. decode_bs, card_mem, card_bw, util=0.7):
    3. # VRAM used by weights plus cache, which sets the minimum replica size
    4. per_replica = weights_bytes + kv_bytes_per_token * ctx_len * decode_bs
    5. replicas = -(-int(per_replica) // int(card_mem * util)) # round up
    6. # Bytes moved per token during decode, which sets the speed ceiling
    7. bytes_per_token = weights_bytes / replicas + kv_bytes_per_token * ctx_len
    8. tokens_per_sec = card_bw * util / bytes_per_token
    9. return replicas, tokens_per_sec

    The value of this function is not precision. It forces you to translate “is it expensive” into “how many replicas are needed and how many tokens each replica can produce,” which is what actually lines up with a quote.

    4. Where Gross Margin Comes From: Utilization Is the Deciding Factor

    The original judgment that a tier is “somewhat above real cost with considerable gross margin” is methodologically sound, but it needs one key qualification: gross margin is not set by price alone but is a joint function of price and utilization. For a service with rigid fixed costs, a daily average utilization of only ten to twenty percent can turn even a high list price into a loss; sustained high utilization can produce considerable margin even at a moderate price.

    A more rigorous approach is therefore three-step: first estimate the minimum replica count and cluster cost from parameter scale; then estimate per-replica throughput from activated parameters and compression strategy; finally compute effective utilization from a real workload profile (average input length, average output length, peak concurrency, cache hit rate). Only when all three steps are grounded does “considerable gross margin” become a conclusion rather than a guess. In addition, the sharp drop in marginal cost from cache hits is the main source of margin improvement for long-context and fixed-system-prompt workloads, and it is also the item most easily overlooked by outside observers.

    5. A Decision Checklist for Consumers

    When facing a new price, evaluate in the order below rather than comparing unit prices directly:

    • Define the workload profile: input and output length distribution, peak concurrency, and whether queuing is tolerable. This determines whether you are effectively paying the input price or the output price.
    • Convert to unit cost: translate the quote into cost per million tokens and cost per thousand sessions; the latter is closer to a business budget.
    • Assess the self-hosted alternative: self-hosting means taking on cluster procurement, utilization swings, operations, and failure redundancy, which usually does not pay off for small-scale workloads.
    • Trade compression mechanisms for cost: trimming context sensibly, reusing system prompts, and retrieving over long documents before feeding them to the model can significantly reduce cache-side overhead.
    • Build observability: use monitoring and alerting, logging services, and distributed tracing to bring token consumption, cache hit rate, and timeout retries onto a standing dashboard, so cost optimization has a basis.

    6. Conclusion

    Whether a new tier is overpriced cannot be judged by feel. Map total parameters to cluster size, activated parameters to decode speed, and attention compression mechanisms to cache overhead, then validate utilization against real workloads, and you get a reproducible conclusion about cost and gross margin. This framework has more long-term value than any single price number and applies to evaluating any future generation of model services. If you need elastic compute along with general-purpose data, container, and monitoring capabilities to carry self-hosted inference, you can assemble them on demand on Baidu AI Cloud, running a small-scale validation first before discussing scale-based amortization.