Hardware & ChipsLLM inference economicstoken pricingKV cachecontinuous batching

The Economics of Inference: How Chip Supply, Batching, and KV-Cache Shape LLM Pricing

How chip supply, batching, and the KV cache set LLM token prices—and the metrics US enterprises should track before signing an inference contract.

Model prices are not arbitrary. When a provider quotes $2 per million input tokens and $8 per million output tokens—illustrative figures, but typical of current mid-tier rate cards—those numbers are downstream of a physical system: how many accelerators it can buy, how densely it can pack requests onto each one, and how efficiently it manages the memory that grows with every token of context. Two providers running the same open-weights model can post very different prices because their serving stacks—not their models—differ.

This article breaks down the levers that actually set cost per token. We'll look at why inference now dominates the AI bill, how chip supply and memory bandwidth constrain throughput, why batching is the single biggest efficiency multiplier, and how the KV cache quietly becomes the largest cost center in long-context and multi-turn workloads. Then we'll show how these forces converge into the prices you see on a rate card—and what to ask before you sign.

Why Inference, Not Training, Now Dominates the AI Bill

Training a frontier model is a periodic capital event. You buy or rent a large cluster, run for weeks or months, and you're done. Inference is different: it is continuous operating expense. Total serving cost scales roughly linearly with the number of tokens processed—and the per-session cost can grow faster than linearly as context length rises, because the memory and attention work tied to long contexts grow with sequence length. Every user session, every agent step, every retrieval-augmented query consumes accelerator time. As adoption grows, the serving bill compounds while the training bill resets each cycle.

The shift from capex-heavy training to opex-heavy serving

For most enterprises, training is now a small fraction of total AI spend. The dominant line item is serving models in production: chat interfaces, coding assistants, document pipelines, and autonomous agents that make dozens of model calls per task. Agents in particular multiply inference—a single user request can fan out into ten or fifty model calls, each with its own prefill and decode cost. The economics have flipped from "can we afford to train?" to "can we afford to run this at scale?" (See our breakdown of agentic workloads and inference cost.)

What LLM inference economics actually measures

Buyers should track four metrics, not just the headline price:

  • Cost per 1M tokens — input and output priced separately, since decode is far more expensive per token than prefill (see below).
  • Cost per request — captures the real unit of work, including system prompts and context.
  • GPU utilization % — the fraction of provisioned accelerator time doing useful work; low utilization is baked into your price.
  • Tokens/sec/accelerator — the throughput a provider extracts from each chip; higher means lower unit cost.

Serving cost, not model quality alone, increasingly determines which models get deployed. A marginally better model that costs three times more per token often loses to a good-enough model with a lean serving stack.

Prefill vs. decode: the asymmetry behind input/output pricing

Every request runs in two phases. Prefill processes the entire input prompt in parallel—it is compute-bound and efficient, because thousands of tokens are handled in a few matrix multiplications. Decode generates output one token at a time, and each step requires reading the full model weights plus the growing KV cache from memory. Decode is therefore memory-bandwidth-bound and far less efficient per token. This is the mechanism behind the familiar 3–4× gap between output and input token prices: output tokens cost more because each one forces a separate, bandwidth-heavy pass over the model.

Chip Supply and the Price of a Token

Accelerators are a constrained input. When supply is tight, providers ration capacity through pricing, rate limits, and queueing—and effective cost per token rises. The chip you can actually get, at the volume you need, sets the floor on your serving economics.

GPU supply constraints and allocation dynamics

Top-tier GPUs are typically allocated months in advance, and providers with long-term supply contracts enjoy lower effective hardware costs and can price aggressively. Smaller providers that buy on spot markets pass volatility through to customers. This is why identical models cost different amounts at different vendors, and why prices can move when a new accelerator generation ships. Scarcity, not model choice, is often the dominant price signal. (More on GPU capacity planning and reserved instances.)

The accelerator mix

Not all silicon is built for the same job:

  • General-purpose GPUs (H100/H200/B200) — flexible, support both training and inference, but you pay for capability you may not use at serving time.
  • Inference-optimized silicon (LPU, TPU inference instances, Inferentia/Trainium) — tuned for decode throughput and memory efficiency, and can offer lower cost per token for supported models, though with narrower model coverage.
  • Purpose-built accelerators — trade generality for predictable latency and cost at scale.

The tradeoff is real: general-purpose GPUs offer ecosystem maturity and broad model coverage; inference-optimized chips can offer better economics for high-volume, well-understood workloads. (Compare options in our accelerator selection guide.)

Memory bandwidth as the real bottleneck

Here's the counterintuitive part: for decode at small-to-moderate batch sizes, raw FLOPs are rarely the constraint. Memory bandwidth is. Generating each token requires reading the model weights and the KV cache from memory. When bandwidth is saturated, adding compute does nothing. This is why a chip with fewer FLOPs but higher memory bandwidth can out-serve a bigger, faster-clocked GPU on token generation—and why memory capacity and bandwidth, not peak FLOPS, should anchor your hardware comparisons.

The qualification matters: as batch size grows, each weight read is amortized across more tokens, arithmetic intensity rises, and decode shifts from memory-bandwidth-bound toward compute-bound. That transition is exactly what batching engineers for—and it's why the bandwidth ceiling is a starting condition, not a permanent one.

The binding constraint on token generation at low batch size is almost never compute. It's how fast you can move weights and cache through memory—and batching is how you climb out from under it.

Batching — The Leverage Multiplier

If chip supply sets the floor, batching sets the ceiling. Batching means serving multiple requests on the same accelerator pass, amortizing the cost of reading weights across many tokens. It is the single largest lever a provider controls.

Static vs. continuous (in-flight) batching

Static batching waits for a full batch to assemble, runs it, and returns—simple but wasteful, since requests finish at different times and the batch sits half-idle. Continuous batching (also called in-flight batching) instead schedules at the token level: as soon as one sequence in the batch finishes, a queued request slots into the freed position on the next decode step. Frameworks like vLLM and TensorRT-LLM implement this, and it is the primary reason modern serving throughput is many times higher than naive per-request serving. The gain is largest when request lengths vary—exactly the real-world case.

Why batching is the dominant lever

The math is straightforward. Reading model weights is a fixed cost per decode step regardless of batch size; batching spreads that fixed cost across N sequences. Up to the point where the workload becomes compute-bound or memory-capacity-limited, throughput rises nearly linearly with batch size while cost per token falls. This is why two providers with identical hardware can differ by an order of magnitude in cost per token: one runs at batch size 4, the other at batch size 64 with continuous scheduling.

Where batching hits its ceiling

Batching is bounded by two things: latency SLAs (large batches raise per-token latency, so interactive workloads cap batch size to protect time-to-first-token and inter-token latency) and KV cache memory (every concurrent sequence holds its own cache, and memory capacity caps how many can be in flight). The second constraint is why the KV cache—not compute—often decides your real throughput.

The KV Cache: The Quiet Cost Center

Every generated token requires attention over all previous tokens. Rather than recompute those keys and values each step, the serving stack stores them—the KV cache. It is what makes autoregressive decoding tractable, and it is also the dominant memory consumer in long-context and multi-turn serving.

Why the KV cache grows—and what it costs

KV cache size scales as:

2 × layers × KV heads × head dim × bytes-per-element × sequence length × concurrent sequences

The "2" is for keys and values. Every factor except the constants is under someone's control, and two of them—sequence length and concurrency—are the two things that define a serving workload. Double the context and you double the cache; double the concurrent users and you double it again. Cache memory competes directly with model weights for HBM capacity, and every byte spent on cache is a byte not available for a larger batch. In long-context and multi-turn workloads, the KV cache, not the model weights, is frequently the binding memory constraint—and therefore the real limit on throughput and cost.

Techniques that shrink the cache

  • Paged attention (as in vLLM) — stores the cache in fixed-size blocks instead of contiguous per-sequence buffers, eliminating fragmentation and letting memory be shared and reclaimed dynamically.
  • Prefix caching — reuses the cache for a shared system prompt or document across requests, so repeated context isn't recomputed or re-stored.
  • KV quantization — storing cache entries at lower precision (e.g., FP8) to roughly halve memory at modest quality cost.
  • Grouped-query / multi-query attention — architectural reductions in KV head count that cut cache size at the model level.
  • Prefill/decode disaggregation — running the compute-bound prefill and bandwidth-bound decode on separate pools so each is provisioned for its actual bottleneck.

Each of these is a serving-stack decision, invisible on a rate card but decisive for cost per token. A provider that has solved prefix caching and paged attention can serve long-context workloads at a fraction of the cost of one that hasn't—on the same GPUs and the same model.

How These Forces Converge Into a Price

A rate card is the output of a stack of multipliers:

  1. Hardware cost per accelerator-hour — set by supply, contract terms, and accelerator mix.
  2. Utilization — the fraction of that hour doing useful work; idle capacity is priced into every token.
  3. Batching efficiency — how many sequences share each weight read, bounded by latency SLAs and KV cache memory.
  4. Cache efficiency — how much memory overhead long contexts and multi-turn sessions impose, and how well the stack reclaims it.

Multiply these and you get effective cost per token. Two providers can differ by 5–10× on the same open-weights model purely on levers 2–4, which is why "we run the same model" is not a pricing argument.

What to Ask Before You Sign

  • What's your batching strategy, and what latency SLA caps it? Continuous batching with a documented latency target signals a mature stack.
  • How do you handle the KV cache? Ask specifically about paged attention, prefix caching, and KV quantization—these determine long-context and multi-turn economics.
  • How is your capacity provisioned? Reserved contracts versus spot exposure tells you how much price volatility you're inheriting.
  • What does cost per request look like, not just per token? System prompts, retrieval context, and agent fan-out dominate real bills.
  • How do you price long-context and cached input? Many providers discount cached or repeated input; confirm the mechanism and the discount.
  • What's your utilization and tokens/sec/accelerator? A provider that will share these numbers is telling you its unit economics are sound.

The headline price is the last number in a long chain of engineering decisions. Understanding the chain is how you tell a durable price from a temporary one—and how you negotiate on the levers that actually move cost.

ShareX / TwitterLinkedIn
← Back to News