Why LLM Inference Is Getting an Electricity Meter: Pricing, Scheduling, and Cost Optimization

    This article explains why large language model inference is increasingly priced like a utility. It covers the engineering changes behind the sharp drop in per-token cost, the rise of peak and off-peak pricing, the impact of prompt cache hit rates, and a practical checklist for developers to control token bills through tiered routing, time-based scheduling, output limits, batching, observability, and fallback capacity.

    Over the past two years, the price of calling large language models for inference has dropped by orders of magnitude. An annual AI index report from a university shared a clear data point: for a model reaching the level of early GPT-3.5 on a general knowledge benchmark, the price per million tokens fell from about $20 in November 2022 to about $0.07 in October 2024, a drop of roughly 286x. This rapid decline has made “intelligence” measurable at scale for the first time, much like water and electricity. The industry now uses a vivid metaphor: large models have been fitted with an electricity meter.

    1. Behind the Order-of-Magnitude Price Drop: A Shift in Inference Cost Structure

    To understand the “electricity meter” metaphor, first understand where the cost comes from. The cost of large model inference is not a single variable. It is determined jointly by compute occupancy time, GPU memory bandwidth pressure, batching efficiency, cache reuse rate, and the model’s parameter count. Over the past two years, engineering optimizations have happened almost simultaneously at every stage: more efficient attention implementations reduce memory reads and writes, more aggressive quantization and sparsification reduce weight movement, continuous batching lets short and long requests share capacity, and prefix caching means repeated system prompts are charged only once. Together, these factors have created room for the per-token price to keep falling.

    It is important to note that falling prices do not mean “intelligence has become cheaper,” but that the “marginal cost of a unit of intelligence” is falling. For developers, this opens up architectural choices: approaches once abandoned because costs were uncontrollable, such as multi-round self-checking, multi-path retrieval, and feeding entire long documents, are back on the table.

    2. Time-of-Use Pricing: Scheduling Compute Like a Power Grid

    A notable recent change in the industry is the spread of time-of-use (peak and off-peak) pricing. One platform has clearly defined peak hours as 9:00 a.m. to 12:00 p.m. and 2:00 p.m. to 6:00 p.m. Beijing time on workdays. All other hours, plus weekends and public holidays, use off-peak prices, typically half the peak price. This closely mirrors grid peak-shaving logic: daytime compute demand is concentrated and supply is tight, while demand falls at night and during holidays, leaving idle resources to be absorbed.

    The direct engineering implication is that the “time dimension” of a task has become an optimizable cost variable for the first time. Latency-insensitive tasks such as offline batch processing, data cleaning, log summarization, bulk labeling, and regression evaluation can be scheduled during off-peak hours. Online interactions for end users should stay in peak hours, combined with caching and rate-limiting strategies.

    Below is an example scheduling snippet that selects a model tier and batch queue based on the time of day:

    1. from datetime import datetime, timezone, timedelta
    2. CST = timezone(timedelta(hours=8))
    3. def is_peak(now: datetime) -> bool:
    4. # Peak: workdays 9:00-12:00 and 14:00-18:00
    5. if now.weekday() >= 5:
    6. return False
    7. t = now.strftime("%H:%M")
    8. return ("09:00" <= t < "12:00") or ("14:00" <= t < "18:00")
    9. def route(task, now: datetime):
    10. if task.latency_sensitive:
    11. return {"tier": "pro", "queue": "online"}
    12. return {"tier": "flash", "queue": "batch" if not is_peak(now) else "online"}

    3. Cache Hits: The Most Overlooked Lever

    Beyond time-of-use pricing, cache hit rate is the most underestimated item on the cost bill. Current mainstream billing usually splits input pricing into two tiers: cache hit and cache miss, which can differ by tens of times. For example, one platform’s published Flash tier peak-hour input price per million tokens is about 0.04 yuan for a cache hit and about 2 yuan for a cache miss, with output at about 8 yuan. The higher-capability Pro tier is about 0.3 yuan, 9 yuan, and 27 yuan respectively, with off-peak hours taking another 50% off.

    These numbers reveal a key fact: in long-prompt scenarios, input-side costs are often far greater than output-side costs, and whether the cache hits directly determines the order of magnitude of the input side. So the first principle of prompt engineering upgrades from “write it short” to “write it stable”: put unchanging system instructions, tool descriptions, examples, and knowledge snippets at the front and keep them verbatim, and put variable user input at the back, to maximize prefix reuse.

    1. [Fixed prefix: role setup + tool schema + few-shot examples + domain knowledge] ← aim for cache hits
    2. [Variable suffix: current user question + timestamp + session context] ← keep the missed part short

    Three engineering points also need attention. First, avoid inserting volatile fields such as timestamps or random IDs into the fixed prefix, or the cache chain will break. Second, control “jitter” in the context window, and avoid appending different-length history every round, which causes prefix drift. Third, store frequently reused knowledge slices in a normalized way, and supply them uniformly through general object storage or vector retrieval, reducing repeated assembly.

    4. A Cost Optimization Checklist for Developers

    1. Tiered routing: send simple tasks like intent classification and format conversion to lightweight tiers, and complex reasoning to high-capability tiers, using rules or a small model for upfront decisions.
    2. Time-based scheduling: move all offline tasks to off-peak hours, keep a peak-hour budget for online tasks, and set degradation strategies.
    3. Output constraints: control output tokens with structured output, maximum length limits, and segmented generation, since output prices are usually several times input prices.
    4. Batch merging: combine multiple short requests into one call to spread fixed overhead.
    5. Observability: log input/output tokens, cache hit flags, and tier for each call, build a cost dashboard split by business line, and configure budget alerts.
    6. Capacity fallback: deploy self-hosted small models or a rules engine on a general container platform as a degradation path, avoiding peak-hour rate limits affecting core flows.

    5. Conclusion

    With call prices down about 286x in two years, and further evolving into peak and off-peak time-of-use pricing and cache-based tiered billing, the way large model capabilities are purchased is getting closer to a public utility: metered by usage, priced by time period, and discounted by reuse. For developers, real competitiveness is no longer just “whether you can call it,” but whether you can manage the token bill like an electricity bill: embed the cost model into architecture design, write scheduling strategies into code, and run cache hit rate as a core metric. Baidu AI Cloud’s practice in related areas also shows that combining monitoring and alerting, logging services, and container platforms into a unified cost observability system is a common path for landing this kind of fine-grained operation.