The Economics of LLM Inference: From Token Costs to Power Consumption
As foundation models converge in general benchmarks, procurement decisions are shifting from raw scores to the cost per completed business task. This article presents a reproducible order-of-magnitude method for estimating how many tokens a single kilowatt-hour of electricity can produce during inference, covering decode and prefill energy per token, the sensitivity of results to decode parallelism, input-output mix, and cluster utilization, and a Python capacity model you can adapt. It also discusses how these economics reshape the market: hyperscale stable workloads moving to self-hosting, cost optimization shifting toward higher output per kilowatt-hour, lower barriers to private deployment, and green compute becoming a negotiation factor.
1. Background: Once Capabilities Converge, Competition Moves to the Cost per Unit of Intelligence
As the gap between mainstream large models on general leaderboards keeps narrowing, differentiation shows up mostly in specific areas such as long context, code, structured output, and multimodality. The core metric in procurement decisions changes accordingly: from “whose score is higher” to “how much does it cost to complete one business task.” In this environment, the token gradually shifts from a technical unit of measurement to a basic production input, and its price, supply stability, and carbon intensity begin to enter enterprise cost models much like water and electricity.
One repeatedly validated pattern is this: when the per-call price exceeds a certain threshold, high-frequency, large-scale, data-sensitive scenarios migrate to private deployment; meanwhile, aggregation and forwarding service providers use self-hosted open-source models to serve the long tail of small customers and developers, earning the spread on the channel and on operations. Reduce this chain to a minimal economic model and the long-term main costs converge to two items: electricity and hardware depreciation. Electricity is the hardest of the two to compress.
2. Core Estimate: How Many Tokens Can One Kilowatt-Hour Produce
Below is a reproducible order-of-magnitude estimation method. It is not an exact quote, but a “magnitude tool” for judging trends and doing capacity planning.
Key assumptions (inference scenario, based on a single high-power accelerator card):
- Card power draw of about 700W; adding cooling, networking, host, and losses (PUE of 1.3), effective power is counted as 900W;
- For large-batch offline inference, aggregate decode speed per card is taken as 1000 token/s (conservative range 500–3000).
Energy per token and conversion:
Energy/token = 900 J/s ÷ 1000 token/s = 0.9 J/token1 kWh = 3,600,000 JOutput = 3,600,000 ÷ 0.9 ≈ 4 million output tokens / kWh
The prefill stage is highly parallel computation with throughput far above decode. Taking 10,000 token/s per card, energy is about 0.09 J/token, and one kilowatt-hour can process about 40 million input tokens.
Weighting by a typical input-output mix of 3:1, and plugging in the common high-price range (output at USD 50 per million tokens, input at USD 10 per million tokens), the resulting “revenue per kWh” reaches USD 250–300 per kilowatt-hour; if throughput uncertainty is included, a reasonable range is roughly USD 100–800 per kWh. This magnitude makes one thing clear: at current pricing, completing large-scale inference purely on a pay-per-call basis costs far more than the marginal cost of self-built compute, and the economics of closed-source metered billing will keep being squeezed in hyperscale scenarios.
3. Where the Error Comes From: Turning the Estimate into a Reliable Decision Input
The results above are extremely sensitive to three variables, which must be modeled separately in engineering practice:
- Decode parallelism. Batch size, KV cache hits, speculative decoding, and quantization precision can swing effective per-card throughput between 500 and 3000 token/s, directly and linearly affecting the energy ratio.
- Input-output structure. Retrieval-augmented and long-document summarization workloads have a high input share, so overall energy is pulled down by prefill; generative writing and code completion have a high output share, so cost rises significantly.
- Utilization. Average utilization of a real cluster is often below half of peak, and idle power is billed just the same, so the “theoretical tokens per kWh” must be multiplied by a utilization discount.
It is advisable to consolidate the formula into an executable capacity model:
def tokens_per_kwh(decode_tps=1000, prefill_tps=10000,io_ratio=3, pue=1.3, card_kw=0.7, util=0.6):decode_j = card_kw * 1000 * pue / decode_tps # J / output tokenprefill_j = card_kw * 1000 * pue / prefill_tps # J / input tokenout = 3_600_000 / decode_j * utilinp = 3_600_000 / prefill_j * utilreturn (out * 1 + inp * io_ratio) / (1 + io_ratio)
4. Impact on Market Structure and Engineering Practice
- Layering solidifies: hyperscale, stable workloads move to self-built or long-term reserved capacity; spiky workloads that need the latest capabilities still go through metered calls.
- The cost center of gravity shifts: optimization focus moves from “switching to a cheaper model” to “increasing output per kilowatt-hour,” namely scheduling, batching, caching, and quantization.
- The barrier to private deployment drops: rising capability of open-weight models makes self-building feasible for mid-sized enterprises, but supporting capabilities such as operations, monitoring and alerting, log services, object storage, and container platforms must be in place at the same time.
- Green compute becomes a bargaining item: electricity prices and energy efficiency ratios feed directly into per-token cost, and site selection and energy mix begin to influence technology choices.
Implementation advice: first run a baseline load test with small traffic to measure real decode/prefill throughput and utilization; then convert to output per kilowatt-hour using the business input-output ratio; finally compare the “total cost of metered calls” against the “amortized cost of self-building (including depreciation, electricity, and operations staff),” where the crossover point typically appears when monthly call volume is stable and predictable. General-purpose container platforms, monitoring and alerting, and log service capabilities offered by cloud providers such as Baidu AI Cloud can serve as the operations foundation for a self-built stack, helping enterprises keep quantifying and calibrating this economic model over time.
