Why LLM Inference Costs Can Drop to a Quarter
This article breaks down the real cost structure behind large language model inference and explains why service prices can fall to a quarter of their previous level. It covers the three main cost components, how KV Cache reduces repeated computation in autoregressive generation, how to estimate KV Cache memory usage, and the engineering practices that drive high cache hit rates. It also outlines four metrics for judging whether a price reduction is sustainable.
1. What the “Price Cut” Reveals About the Real Cost of Inference
When a large model service announces a “permanent price cut to one quarter,” it looks like a pricing decision. In practice, it is the inevitable result of lower unit costs on the inference side. To evaluate such a change, you need to look past the discount and break down the cost structure. A single online inference request is made up of three parts: compute (the repeated prefix portion and the new token portion), memory (weights plus KV Cache), and the idle resources caused by scheduling and queuing. The two parts that engineering can compress significantly are “repeated computation” and “resource idling.”
When a large number of requests share the same long prefix (system prompts, knowledge base context, code repository snippets, long document templates), recomputing attention from scratch every time wastes a substantial amount of compute. The approach increasingly adopted across the industry is to reuse the intermediate results of the prefix and push the cache hit rate as close to 100% as possible, which drives the marginal cost very low. This is the technical source of the community feeling that the cost is “rounded down to free.”
2. KV Cache: Why Autoregressive Generation Needs Caching
Text generation is an autoregressive process: it produces one token at a time and appends it back to the sequence to continue. Without caching, step N would still recompute the key and value vectors for the entire history, even though those results were already computed at step N-1 and are exactly the same.
The logic looks like this:
step1: input [today, today, weather] -> compute and cache K,V -> output finestep2: input [today, today, weather, fine] -> compute Q,K,V for fine only -> output goodstep3: input [today, today, weather, fine, good] -> compute Q,K,V for good only -> output ...
The core benefit is that the computation per step drops from “processing the entire sequence” to “processing the latest token,” while the historical part only requires memory reads. This is the foundation for higher inference throughput and lower time to first token.
3. The Memory Math: Estimating KV Cache Size
The general estimation formula is:
KV Cache ≈ 2 × layers × heads × head dimension × sequence length × bytes per value
With 32 layers, 32 heads, 128 dimensions per head, and FP16, a single token per layer is about 16KB. At a sequence length of 4096, one request is about 2GB, and a batch of 10 is about 20GB. In long-context and high-concurrency scenarios, KV Cache can easily exceed the weights themselves and become the real bottleneck. Capacity planning must therefore account for weights, cache, and activations together, with headroom reserved for fragmentation and traffic spikes.
4. Where High Hit Rates Come From: Engineering Essentials
A high cache hit rate is not accidental. It comes from stacking several general practices: first, prefix normalization, which places stable content at the front and volatile content at the back so that one small change does not invalidate the entire cache; second, prefix-tree reuse, which lets shared segments hit across multiple requests; third, cache sharding and eviction policies that manage memory by popularity and lifecycle; fourth, batching and scheduling coordination to reduce queuing idle time; and fifth, precision and quantization strategies that shrink the cache footprint within an acceptable quality range.
5. How to Judge Whether a Price Cut Is Reasonable
Four metrics are recommended: cache hit rate, cost per token, time to first token and throughput, and quality regression results. A rising hit rate paired with declining quality is an unsustainable way to cut costs. Only when hit rate and latency improve together is it a structural cost reduction driven by engineering capability. On the enterprise side, teams can establish baselines with logging services and monitoring alerts, use container platforms for elastic scaling, and turn cost optimization into a sustainable operational capability rather than a one-time promotion.
