cd /news/artificial-intelligence/quadrillion-param-costs-kv-cache-con… · home topics artificial-intelligence article
[ARTICLE · art-75556] src=lesswrong.com ↗ pub= topic=artificial-intelligence verified=true sentiment=· neutral

Quadrillion Param Costs: KV Cache, Context Length, Frontier Margins

A new analysis predicts that AI models will grow from 10 trillion parameters in 2026 to 1.4 quadrillion parameters by 2031, with inference costs remaining surprisingly low due to KV cache scaling. The author calculates that a hypothetical 1,400-trillion-parameter model in 2031 would cost only $12.3 per million input tokens and $67 per million output tokens, and argues that no amount of H100 GPUs can serve such models, requiring larger scale-up systems with sufficient HBM capacity.

read36 min views1 publishedJul 27, 2026

The models of 2028-2031 get much bigger than the models of 2026, going from 10T total params in 2026 to maybe 240T params in 2028 [1] and then 1.4 quadrillion params in 2031, as I estimate

These prices rest on token costs that I calculate from first principles in this post, using estimates of future hardware specs and costs. I link the 10T 2026 model to Mythos 5 to compare with its actual API prices, also performing the calculations for my guess about Opus 4.8, and the result is gross margins of 83-89%, consistent with SemiAnalysis claims I cite in that section of the post. This is despite my Opus 4.8 guess having 650B active params, and my Mythos 5 guess having 1.3T active params, much more than any open weight model (which mostly have about 50B active params). This also predicts that Anthropic is currently using about 0.5-1 GW of inference compute (that brings in revenue at the API gross margins).

The cost estimate for the hypothetical 240T 2028 model (7.9T active params) is merely $2.5/$46 per 1M input/output tokens, and for the 1,400T 2031 model (48T active params) it's $12.3/$67. The cost of output tokens barely increases as a result of how KV cache size per token scales with the number of active params, which makes longer contexts cheaper and keeps the overall cost per average token down. These costs assume long-term rental prices for compute, while compute directly owned by an AI company could be 1.5x cheaper.

There is a place for overtrained and distilled models in lower tiers of capability, but there doesn't seem to be a technical or economic reason to avoid serving the actual biggest models, even when they are as ridiculously big as the hypothetical 1.4 quadrillion params model of 2031. And these very big models can neither be served nor trained with RL on hardware that doesn't have comparable HBM capacity in a single scale-up system. No amount of H100s can serve a model with a quadrillion params, and in this way insufficiently big scale-up systems are constraining what can be built.

The cost of output token generation rests on the size of KV cache per token, determined by the shape of the model. The classical grouped-query attention in Llama 3 405B converts an activation vector with dimension 16K [2] to 8 KV pairs, with dimension 128 for each K and V vector, so 2K numbers in total (per layer, per token), 8x fewer than the components of an activation vector, and there are 126 layers. This gives 260 KB per token (if KV cache is in FP8), which could become 260 GB for a 1M token context, almost half of the HBM capacity of an H100 server for just one request.

Practical reasoning models use more elaborate attention schemes to make KV cache a lot smaller. Full attention doesn't need to happen for every layer, and KV cache even for essentially full attention can be compressed in various ways. DeepSeek V4 Pro ends up with about 5 KB of KV cache per token (across all layers), starting with the model (activation vector) dimension of 7K in 61 layers. As a way of transmitting data between residual streams [3] rather than between individual activation vectors, it seems reasonable for the dimension of KV cache per token to be a few times above that of an activation vector, and to scale with the square root of the number of active params, the same as the model dimension. The KV cache of Llama 3 405B is likely bigger than it needs to be, and the KV cache of DeepSeek V4 Pro is likely significantly smaller than optimal (buying a lot of cheaper context length at the cost of some quality).

Framing this as a guess at a scaling law, KV cache of Llama 3 405B is 0.4 bytes times square root of its active params (if in FP8; this anchor is an upper bound with a sizable margin), KV cache of DeepSeek V4 Pro is 0.02 bytes times square root of active params (it's 49B active params; this is a lower bound with a bit of margin). As a middle ground, Gemma 4 31B has somewhere between [4] 0.12 and 0.19 bytes times square root of active params. Another recent example is

For the largest frontier models, where it makes sense to prefer quality even at a premium, I'm already leaning towards FP8 weights in most of this post, and attention is harder to quantize than weights (without damaging quality). So I'm going to use a somewhat higher anchor, and in the following estimates KV cache per token is 0.2 bytes times square root of the number of active params. Then the 10T total params model of 2026 from the previous post needs 230 KB of KV cache per token (at 1.3T active params, 8x sparsity); the 240T total params model of 2028 needs 560 KB per token (at 7.9T active params, 30x sparsity); and the 1.4 quadrillion params model of 2031 needs 1.4 MB per token (at 48T active params, 30x sparsity). Note that the number of active params for the 2031 model is 37x higher than for the 2026 model, but KV cache per token is only 6x higher (since I'm assuming it scales with the square root of the active params). This suggests that the cost of input tokens gets higher faster than the cost of output tokens. Since both costs can be measured in chip-time, the ratio doesn't depend on the cost of that time in dollars. It does depend on the specs of the hardware and on the shapes of the models, and output tokens cost more if contexts are longer, so enabling longer contexts can be used to target a particular ratio of costs if there is a reason to do that, which in turn predicts context lengths for future models.

Before formulating how costs of tokens can be computed in general (which we'll need to consider their scaling, across different models and hardware systems), let's work through a concrete example of the 10T model of 2026 running on GB300 Oberon (NVL72). Each chip in this system produces 5e15 FP8 FLOP/s and reads 8 TB/s of HBM.

Prefill (processing of input tokens) happens in parallel for all tokens of a request, so the batches in the matrix multiplications of feed-forward networks of a transformer are easily big enough that they are not data starved, which makes the whole process FLOP/s bound. Each token needs 2 FLOPs per active param (the number of total params doesn't matter). The efficiency of using the FLOPs is called MFU (model FLOP/s utilization), which I'm going to assume to be 60%. Thus the 1.3T active params need 2.6e18 FLOPs to process 1M input tokens, which at the MFU of 0.6 takes 0.24 chip-hours to produce.

Decode (generation of output tokens) processes a handful of tokens per request, maybe 1-8 per pass when using MTP (multi-token prediction), while reading all of KV cache of the request. Thus with sufficiently long requests (which go into hundreds of thousands of tokens), the 2 FLOPs per active param for these few tokens are drowned out by the amount of HBM that needs to be read for attention processing, and so decode becomes HBM bandwidth bound. Let's also assume that given a maximum context length of 1M tokens, requests are 500K tokens long on average.

Of the 21 TB of HBM capacity in a GB300 Oberon rack, half is taken up by the 10T total params (in FP8), and half by the KV cache of the requests. At 230 KB per token, a 500K-long request needs 115 GB, so 87 requests fit in the HBM. Each pass, all model params need to be read, so the requests are sharing the cost, and 10 TB divided by 87 is also 115 GB, the same as the KV cache of a 500K-long request. In total, the HBM footprint that a 500K-long request needs to pay for (each pass) is 230 GB (KV cache plus a share of the model weights), which is the same amount of memory as the KV cache of a 1M-long request (on its own, without model weights).

Each pass of decode accepts some number of MTP tokens for a request (as correctly guessed), including the next directly generated token. I'm going to assume it's 3 tokens on average (MTP speedup of 3x). Generating 1M tokens then needs about 333K passes (per request), each pass reading 230 GB of HBM per request on average. The efficiency of using HBM bandwidth is called MBU (model bandwidth utilization), which I'm going to assume to be 70%. Thus 230 KB of KV cache per token needs 76.7e15 bytes to be read from HBM to generate 1M output tokens, which at the MBU of 0.7 takes 3.8 chip-hours.

The output token cost is thus 16x higher than the input token cost, and this ratio will remain unchanged when the cost is measured in dollars rather than chip-hours. It will however change for different models and hardware, and for different context lengths and pipeline setups, so it's useful to cluster parts of the calculation into more stable ingredients, which can then be more easily used as anchors in estimates.

The chip-specific part of the ratio is its ridge point, the ratio of FLOP/s to HBM bandwidth (for the same chip). With GB300, the ridge point is 625 FP8 FLOP/byte (the seconds cancel out, and the ratio stays the same for the whole scale-up system). The model-specific part is the ratio of prefill cost in FLOPs to decode cost in bytes (for processing/generating the same number of tokens). With our 10T total params model, 1M tokens need 2.6e18 FLOPs in prefill and 76.7e15 bytes in decode, for the prefill/decode cost ratio of 34 FLOP/byte. Finally, the MBU/MFU ratio (1.17) connects it to the ridge point, giving the overall token cost ratio (625 FLOP/byte of the chip divided by 34 FLOP/byte of the prefill/decode workloads, divided by 1.17 to account for inefficiency; giving the ratio of 16x).

When varying the setup, the ridge point only depends on the chip specs, the MBU/MFU ratio doesn't change (by assumption), and the prefill/decode cost ratio only depends on the model and the way decode is set up. In the rest of the post, prefill/decode cost ratio of a model is defined to use the HBM footprint per request equal to the size of a 1M-long KV cache, and MTP speedup of 3x, the same as in the above example where it ends up at 34 FLOP/byte, from the HBM footprint of 230 GB per request (for 500K-long requests). Using the scaling law for KV cache per token from the previous section (0.2 bytes times square root of active params), the algebra works out to show that for the models that follow this law, the prefill/decode cost ratio is equal to 3e-5 FLOP/byte times square root of the number of active params. This formula gives back the same value of 34 FLOP/byte for a 1.3T active params model, and it serves as a scaling law for prefill/decode cost ratio (as we vary the number of active params, at a fixed context length).

If the setup has a different HBM footprint per request, this just introduces another multiplier (when estimating the ratio of costs between output and input tokens). In particular, a 1M-long request in a batch that still has requests that are 500K tokens long on average has an HBM footprint that is 1.5x bigger, and so the cost per output token becomes 1.5x higher. And a 6-stage pipeline setup for batch processing (that doesn't care about the time per output token) makes HBM footprint per request 0.76x as big (1 in 6 requests active at a time at each of the 6 scale-up systems), or 1.26x as big for output tokens of a 1M-long batch request (within a batch that has 500K tokens per request on average). Let's now apply this methodology to estimate token costs for real models with known API prices and with clues about gross margins, so that when later in this post I use the same methods to predict costs of future models, there's additional empirical grounding (for what it's worth). This is also useful to get a sense for how costs interact with decisions about pricing and context length.

I'm going to consider Opus 4.8 [6] and Mythos 5, making guesses about the shapes of these models and inference hardware they use. For Mythos 5, the guess is that it simply matches the big 2026 model

I'm guessing Opus 4.8 to be based on the same pretrain as Opus 4.0, and that the latter was compute optimally pretrained in late 2024 using about 50K H100s [7] , 4x less than Mythos 5. Since model size scales with the square root of pretraining compute, Opus 4 might be exactly 2x smaller than Mythos 5 just from pretraining compute considerations (if it has the same sparsity), which is 650B active params. But since it likely targets

The prefill/decode cost ratio for my guess about Opus 4.8 is 24.2 FLOP/byte (from the scaling law of 3e-5 times square root of active params, see the previous section), and the ridge point for Trainium 2 chips is 450 FP8 FLOP/byte. So taking into account the MBU/MFU ratio of 1.17x, the output/input token cost ratio is 16x (in either chip-time or dollars). The input token cost is 0.46 chip-hours per 1M tokens (assuming MFU of 0.6), so applying the token cost ratio gives the output token cost of 7.3 chip-hours per 1M tokens (for a 500K-long request; it's 1.5x higher for a 1M-long request).

The costs for the big 2026 model (which is the guess for Mythos 5) were estimated in the previous section (0.24/3.8 chip-hours per 1M input/output tokens, with the output/input token cost ratio of 16x). Note the coincidence of both models having the same output/input token cost ratio, even though the scaling law for the prefill/decode cost ratio from the previous section predicts that bigger models should tend to have a lower output/input token cost ratio. The reason is different hardware, the ridge point of GB300 is 1.39x higher than that of Trainium 2. It almost exactly counteracts the ratio between the square roots of the numbers of active params of the models, which is the square root of 2, that is 1.41x.

To estimate token costs in dollars, we need dollar costs of chip-time. The cost of GB300 NVL72 time is about $13bn per 1 GW of IT power [8] (450K chips

That gives the cost of $0.57/$9.0 per 1M input/output tokens for my guess at Opus 4.8 (with the marginal output tokens generated at the end of 1M-long requests costing $13.5 per 1M tokens). And for my guess at Mythos 5, the cost is $0.79/$12.5 per 1M input/output tokens (output token cost rising to $18.8 for 1M-long requests, when computed within batches that have 500K-long requests on average).

Anthropic API prices for Opus 4.8 are $5/$25 for 1M input/output tokens, $10/$50 for Mythos 5, with cache-hit input tokens 10x cheaper. Contexts of up to 1M tokens are supported with these prices. With the estimates from the previous section for my guesses about Opus 4.8 and Mythos 5, the gross margins on the components of the API prices are 89%/64% for input/output tokens of Opus 4.8 and 92%/75% for input/output tokens of Mythos 5. The output token gross margins are worse, since the output/input price ratio is 5x for Anthropic API, while my estimates place the output/input token cost ratio for these models at 16x.

Overall API gross margin is determined by how the tokens are actually used. Most tokens are input tokens, and most input tokens are cache-hit tokens, priced at 10% of the normal cache-miss input token price. On a typical day, OpenRouter logs 98.8% of Fable 5 tokens passing through its service to be input tokens (as opposed to reasoning and output tokens). This figure is 98.6% for Sol 5.6, 98.9% for Opus 4.8, 98.0% for GPT-5.5. Let's somewhat conservatively assume that 98.0% of tokens are input tokens (since output token margins are worse), but that the cost (not price) of the cache-hit tokens is zero. Cache hit ratio is somewhere between 80% and 95%, so the ratio between cache-miss input and output tokens is 2.5-10x, which with the output/input token cost ratio of 16x means that the output tokens still contribute 1.6-6.5x as much cost per average API token as the input tokens do.

With this usage pattern, the overall revenue per API token is then 0.24-0.37x the price per cache-miss input token (given that the output token price is 5x the cache-miss input token price), while the overall cost per API token is 0.37-0.52x of the cost per cache-miss input token (given that the output token cost is 16x higher than the input token cost), both being lower at a higher cache hit ratio. In other words, the overall price/cost ratio for an average API token is 0.66-0.73x as high as the cache-miss input price/cost ratio, and this number is more stable under variation of cache hit ratio.

For Opus 4.8, I estimated the input price/cost ratio to be 8.8x (a gross margin for input tokens of 89%), so the overall API price/cost ratio is 5.8-6.4x. For Mythos 5, the estimate for input price/cost ratio was 12.7x (a gross margin for input tokens of 92%), so the overall API price/cost ratio is 8.3-9.2x. In other words, **the estimate for overall API gross margin for Opus 4.8 is 83-84%, while for Mythos 5 the estimate is 88-89%** (barely varying across cache hit ratios in the 80-95% range; the overall uncertainty given all the other assumptions that went into the estimate is of course much higher).

Since cost is chip-time, while price adds up to revenue, and a gross margin lets us estimate annualized cost from ARR (annualized revenue), we can use that to estimate IT power of inference compute that goes into serving API. If Anthropic's revenue is mostly API revenue and assuming an 83-89% gross margin, [$50-70bn of ARR](https://x.com/tickerplus/status/2080067009388097831) then implies $5.5-12bn of inference compute cost (at multi-year rental prices from 6+ months ago), meaning **0.5-1 GW of inference IT power** (probably in addition to about as much R&D or training compute).

Finally, SemiAnalysis gives similar estimates, claiming that Anthropic has a gross margin for inference of over 70% (Apr 2026), that Opus 4.8 via API specifically has a gross margin of over 80% (Jun 2026), and most recently that the gross margin for API is over 85% (Jul 2026). I'm guessing they are making some of these estimates from upper bounds on inference compute available to Anthropic (it's not possible to rule out that some long-term rental compute is being used for something else), and comparing its cost to the revenue, thus their estimates of the gross margin are lower bounds. (These sorts of gross margins are also weakly supported by the recent Colossus 1/2 SpaceX deals that sell compute to Anthropic and Google at 2.6-4.0x the normal long-term contract price.)

Costs of tokens for future models (when measured in FLOPs, bytes, and chip-time) depend on the specs for future compute. I'm keeping the FLOP/s and HBM bandwidth assumptions from the previous post, except I'm going to assume that Feynman has 1.5x more HBM stacks (than in the previous post), and so its HBM bandwidth (and capacity) per reticle-sized logic die is 1.5x higher. This is because of how AMD MI455X demonstrates the feasibility of connecting 3 HBM stacks per side of a reticle-sized logic die even with multiple reticle-sized dies per interposer (unlike Blackwell and Rubin, where there's only 2 HBM stacks per side). Since the change in layout from HBM stacks connected on two sides of a reticle-sized logic die to just one side would otherwise cut the total HBM stacks per reticle-sized logic die from 4 to 2, choosing to go with 3 instead (in departure from Rubin's 2 per side) seems like a plausible compromise (and Feynman will use SoIC, possibly resembling the structure of MI355X and MI455X logic, as opposed to the more straightforward Rubin).

So for a Rubin Ultra compute die, we have 8.75e15 FP8 FLOP/s and 14 TB/s (from the lower point in the 3.6-4.0 TB/s range for a 12-Hi HBM4E stack of 2027, with 4 stacks per compute die), giving a ridge point of 625 FP8 FLOP/byte (the same as for GB300). HBM capacity is 110 TB per scale-up system (4 GB per DRAM die in 12-Hi HBM4E stacks, 4 stacks per compute die, 576 compute dies per rack). And for a (base) reticle-sized logic die of second-year Feynman, the estimates are 14e15 FP8 FLOP/s and 16.9 TB/s (with 3 stacks of 5.6 TB/s HBM5, 11 Gbps per pin, 4,096 pins per stack), the ridge point is 830 FP8 FLOP/byte. HBM capacity is 1.1 PB (5 GB per DRAM die in 16-Hi HBM5 stacks, 3 stacks per reticle-sized base logic die, 576 such dies per rack, 8 racks per scale-up system), 1.5x more than the 740 TB assumed in the previous post.

The prefill/decode cost ratio for the 2028 model (7.9T active params, 240T total) is 84 FLOP/byte, which by definition assumes the HBM footprint per request of 1.0x the 1M-long KV cache, corresponding to the assumption of no pipelining and a half of HBM being weights. We need to adjust the HBM footprint by some factor, since the target scale-up system only has 110 TB of HBM capacity, and a 240T total param model in FP8 would want to use all 4 of the pipelining stages that are feasible (given that the time to fully read its 12-Hi HBM4E stack is only 13 ms; unlike GB300, where the time to fully read its 12-Hi HBM3E stack is 36 ms, and so only trivial 1-stage pipelining is reasonably fast). Since only 1 in 4 requests are active at each pipeline stage, there is 240 TB of weights and 50 TB of active KV cache in total, with each request needing to cover the cost of reading a share of weights that's 4.8x as big as its KV cache (which is on average 500K-long). This multiplies the HBM footprint by 2.9x, reducing the baseline prefill/decode cost ratio.

Starting with the ridge point of 625 FP8 FLOP/byte, with MBU/MFU factor of 1.17x, baseline prefill/decode cost ratio of 84 FLOP/byte, and the HBM footprint factor of 2.9x (from 4-stage pipelining), the result is that the output/input token cost ratio for the model of 2028 is 18x. This is very close to the ratio of 16x for the model of 2026, the 2.5x higher prefill/decode cost ratio (because of 6x more active params) was counteracted by the 2.9x HBM footprint factor (because 4-stage pipelining is necessary for a model with so many total params relative to the available scale-up HBM capacity). The cost of 1M input tokens of a 7.9T active param model is 16e18 FLOPs, so at 8.75e15 FP8 FLOP/s per compute die and MFU of 60%, the **cost of 1M input/output tokens for the 2028 model is 0.84/15 hours ** (or 4x less in chip-hours for 4-die chips). The cost of 0.24/3.8 chip-hours for the 2026 model is equivalently 0.48/7.5 hours of compute die time, only 1.7x less expensive for input tokens in compute time (the 2028 model has 6x more active params, but this is counteracted by FP8 FLOP/s of Rubin compute dies being 3.5x higher).

For the 2031 model (48T active params, 1.4 quadrillion total), the baseline prefill/decode cost ratio is 207 FLOP/byte. Since HBM capacity of the scale-up system (second-year Feynman 8x Kyber
[11]

) is 1.1 PB, decode with FP8 weights wants at least a 3-stage pipeline (with 4-stage pipelining also feasible, given the assumption that the time to fully read this system's 16-Hi HBM5 stack is 14 ms). This leaves 1.9 PB for KV cache, with 1 in 3 requests active at each stage of the pipeline, thus there is 1.4 PB of weights and 0.63 PB of active KV cache in total, with each request needing to cover the cost of reading a share of weights that's 2.2x as big as its KV cache (for 500K-long average requests). This gives an HBM footprint factor of 1.6x (relative to the baseline HBM footprint equal to KV cache of a 1M-long request). This is less dramatic than the factor of 2.9x for the 2028 model, so the scaling of prefill/decode cost ratio (with the increase in active params) is not counteracted as much this time, and the output/input token cost ratio is going to be lower.

The ridge point for second-year Feynman is 830 FP8 FLOP/byte. Dividing it by the baseline prefill/decode cost ratio of 207 FLOP/byte, itself divided by the 1.6x HBM footprint factor (from 3-stage pipelining) and multiplied by the MBU/MFU ratio of 1.17x, we get the cost ratio 5.5x. That is, the output/input token cost ratio for the 2031 model (with maximum context length of 1M tokens) is 5.5x, much smaller than the 16x for the 2026 model or the 18x for the 2028 model, and close to the current Anthropic API's output/input price ratio of 5x (the next section explores the implications of this development). The cost for 1M input tokens for a 48T active params model is 96e18 FLOPs, which at 14e15 FP8 FLOP/s per (base) reticle-sized logic die and at MFU of 60% can be obtained with 3.2 hours of time. Thus the **cost of 1M input/output tokens for the 2031 model is 3.2/17 hours ** (or 4x less in chip-hours for a chip with 4 base reticle-sized logic dies, which is likely the size of a second-year Feynman chip). These costs in (base) reticle-sized logic die time are 6.6x/2.3x higher for input/output tokens than the 0.48/7.5 hours of compute die time for the 2026 model (with GB300 chips), and 3.8x/1.1x higher than the 0.84/15 hours of compute die time for the 2028 model (with Rubin Ultra chips). The output token cost in compute die time barely changes, even as the model goes from 7.9T active params to 48T active params, because the 2.5x bigger KV cache per token is counteracted by 1.8x smaller HBM footprint factor (scale-up system HBM capacity relative to the total params is higher), and the 1.2x higher HBM bandwidth per (base) compute die.

The much lower output/input token cost ratio of 5.5x in the 2031 model can be used to either reduce the input token price (while maintaining some gross margin), or to extend the maximum context length. With contexts of up to 3M tokens, the output/input token cost ratio gets back to 16x, so the pricing methodology can remain the same as for the 2026 and 2028 models. This effect will be even stronger in 2032+ when larger scale-up systems become available and a 1.4 quadrillion total param model occupies less than half of scale-up HBM capacity (so that the HBM footprint factor goes down from the 1.6x for the 2031 model that needs a 3-stage pipeline to below 1.0x without a pipeline). This way, contexts of 6M+ tokens should become feasible in 2032+ with pricing that relies on a 16x output/input token cost ratio (and anchors to the cost of input tokens, which isn't affected by these things).

Of course, longer contexts are feasible already at higher output token prices, it's more a matter of them being useful. The novel thing about the trends in scaling of KV cache per token (with more active params) and HBM footprint factor reduction (with bigger scale-up HBM capacity relative to total params) is that contexts of up to 3M tokens (in 2031) or up to 6M+ tokens (in 2032+) fall out by default from a pricing strategy that only targets the input token cost. The price of output tokens can still be set at 5x the price of input tokens (even with these longer contexts), there will be no need to price the output tokens higher because of the longer contexts. This is mostly relevant for the frontier models (that are compute optimally pretrained, to get the most capability possible with the available pretraining compute); smaller models that are sufficiently close to them to fill the second tier in capability might have different shapes and thus different pricing affordances (for a given context length).

Let's now make the costs and prices more concrete by converting chip-time to dollars. For 1 GW of IT power, Rubin capex is the same as GB300 capex, even as it needs an IT power budget of 1.45 kW per compute die compared to GB300's 1.11 kW (with outside-the-rack networking, but without non-IT PUE overhead). This is 900K GB300 compute dies and 690K Rubin compute dies per 1 GW of IT power. The cost of non-IT infrastructure that supports 1 GW of IT power is probably also about the same, so the cost of 1 year of their time should be about the same overall. Late last year, the multi-year rental price for GB300 was about $13bn per year. Currently, the 3-year price for GB300 is $3.96 per hour [13] (for the 2-die chip), thus $15.6bn per year for 1 GW of IT power.

The price for a B300-hour (the same chip in much smaller 8-chip scale-up servers) is $3.48, 1.14x less. For owned Hyperscale compute, the price for a GB300-hour is 1.13x higher than for B300-hour ($2.65 vs. $2.34). But also, its IT power budget is 1.16x higher [14] . So this is an anchor for the cost and power overheads (which scale at the same pace) of denser compute and bigger scale-up systems with the same chip. Rubin Ultra Kyber is one step higher in the scale-up and density hierarchy compared to Rubin Oberon, so I'm going to assume that it needs an IT power budget of 1.67 kW per compute die (1.15x more than Rubin), and will cost the same $15.6bn per 1 GW of IT power per year (at multi-year rental prices). This means 600K compute dies per 1 GW of IT power and that

The cost for the 2028 model with 240T total params is then $2.5/$46 per 1M input/output tokens, and for the 2031 model with 1.4 quadrillion total params, the cost is $12.3/$67 per 1M input/output tokens. For context, the cost for the 2026 model with 10T total params (that I'm linking to Mythos 5) is $0.79/$12.5 per 1M input/output tokens. These are costs from inference compute (still with a maximum context length of 1M tokens). Future API price estimates then depend on gross margins, and on decisions about maximum context length. Also, more vertical integration that becomes feasible for bigger AI companies can reduce the costs of compute. This post assumes multi-year rental prices, but Hyperscaler TCO for owned compute can be lower by a factor of 1.5x.

Improving the models makes inference more valuable, so the amount of training and R&D compute shouldn't be much less than the amount of inference compute. With the revenue that inference compute brings in, a gross margin of 50% pays for about as much training and R&D compute. Gross margins probably can't go below 30% (for the AI company to survive), which probably gets more feasible when growth slows down. The current gross margin of around 85% is not much more useful than a gross margin of 70% (in terms of how much training and R&D compute it enables), but the latter allows doubling the costs per token (at a given price). Total costs (the sum of costs of all tokens served for all requests) are essentially the amount of inference compute, so the current very high gross margins might even be a consequence of inability to access enough compute to increase total costs (which would also happen with lower prices, if demand is not destroyed in other ways), and this problem might get less dire by 2028+ (when bigger models also give a stronger motivation to push the prices somewhat lower). With yet another doubling of the costs, we get a gross margin of 40%, which still seems survivable if the growth (in terms of the amount of compute per AI company) sufficiently slows down by 2031+.

The API token usage assumptions from a previous section were 2% output tokens and 80-95% cache hit ratio for input tokens. At output/input token price ratio of 5x and with cache-hit input tokens being 10x cheaper than cache-miss input tokens, the average price per token is 0.24-0.37x the input token price (depending on cache hit ratio). And at the output/input token cost ratio of 16x and with cache-hit input tokens considered free, the average cost per token is 0.37-0.52x the input token cost. The price/cost ratio for an average token is 0.66-0.73x the price/cost ratio for a cache-miss input token (which is relevant for the 2026 model, and for the 2031 model with a maximum context length of 3M). This changes a bit to 0.59-0.67x for the output/input token cost ratio of 18x (relevant for the 2028 model), and changes a lot to 1.2-1.5x for the output/input token cost ratio of 5.5x (relevant for the 2031 model with maximum context length of 1M).

At a gross margin of 70% (which I'm going to assume for the 2028 model), the price/cost ratio for an average token is 3.3x, so the price/cost ratio for a cache-miss input token is 5.0-5.6x, and with the cost per 1M cache-miss input tokens of $2.5, the price has to be $12-$14 per 1M input tokens. At the 5x output/input price ratio, the price for output tokens is $62-$70. That is, **at a 70% gross margin, the API price for the 2028 model with 240T total params is $14/$70 per 1M input/output tokens**. The gross margin for input/output tokens is 82%/34%, so the token usage assumptions are load-bearing.

With a maximum context length of 3M (and average request length of 1.5M), the output/input token cost ratio for the 2031 model is 16x, so the price/cost ratio for a cache-miss input token is 4.6-5.1x, and with the cost per 1M cache-miss input tokens of $12.3, the price is $57-$62 per 1M input tokens, and $280-$310 per 1M output tokens. That is, **at a 70% gross margin and with maximum context length of 3M, the API price for the 2031 model with 1.4 quadrillion total params is $60/$300 per 1M input/output tokens**. The costs with maximum context length of 3M are $12.3/$200, so the gross margin for input/output tokens is 79%/33%. The cheaper option is to keep the contexts at 1M, in which case the output/input token cost ratio is 5.5x and the price/cost ratio for a cache-miss input token is 2.2-2.7x. The price is then $27-$34 per 1M input tokens and $130-$170 per 1M output tokens. That is, **at a 70% gross margin and with maximum context length of 1M, the API price for the 2031 model with 1.4 quadrillion total params is $30/$150 per 1M input/output tokens**, exactly half the price with the maximum context length of 3M. This time, the gross margin for input/output tokens is 59%/55%, so this is less dependent on the fraction of output tokens in actual use, though going from this to about 70% still relies on a lot of cache-hit input tokens.

Finally, the prices that target a gross margin of 40% are simply 2x lower than those that target a gross margin of 70%. In particular, at a 40% gross margin and with maximum context length of 1M, the API price for the 2031 model with 1.4 quadrillion total params is $15/$75 per 1M input/output tokens. The 1M maximum context length option also has the benefit of keeping gross margins for input/output tokens positive, while with the 3M maximum context length, the gross margin for output tokens goes negative, so that the input tokens have to essentially subsidize the output tokens.

There is a SemiAnalysis claim that Kyber got delayed, which if correct probably means it's only coming out with first-year Feynman (this also makes it more likely that only second-year Feynman gets 8x Kyber, at least in high volume). But by the end of 2028 there is probably sufficient buildout of alternatives for 240T total param models to be feasible even if there's no Rubin Ultra Kyber. In 2027, TPU 8i finishes its buildout (295 TB per pod, 12-Hi HBM, 3 GB per DRAM die, 1.07 TB/s per stack, so likely HBM3E; 33 ms to fully read). This is a departure from the usual 3D torus topology (which TPU 7x still follows) and a step towards better all-to-all scale-up latency crucial for MoE decode. Though in 2027, maybe only GDM can afford to deploy a flagship model that depends on this system (even Anthropic might want more options for inference).

But by 2028 there will be the next TPU, AWS Trainium might have something relevant, and a hypothetical 2-rack scale-up pod based on AMD's Helios upgraded to 12-Hi HBM4E would be almost sufficient (in contrast to how a 2x Oberon will remain insufficient). Nvidia might yet pull through with Rubin Ultra Kyber, or a fallback 4-8x Oberon pod. Thus I'm just going to assume Rubin Ultra Kyber in this post, with possible replacements not changing the costs dramatically, possibly forcing a somewhat lower sparsity on the 2028 model, but keeping its number of active params similar (which is the thing that primarily determines costs). ↩︎

The dimension of activation vectors is also called the model dimension. ↩︎

The sequence of all activation vectors (in different layers) above some token. ↩︎ The paper seems to say it's 1.1 GB for contexts of 32K tokens, see Table 3, which is 34 KB per token. But the model config says it's 4 KV heads with K=V and dimension 512 in 10 layers out of 60, which is 20K numbers, with sliding window attention adding only 16% for 32K token contexts. Since the discrepancy is modest, I'm keeping the anchor as a range. Incidentally, the model dimension is 5.3K. ↩︎

It's 41B active params. From the config, 11 layers (out of 66) have full attention, 8 KV heads of dimension 128, without K=V. Model dimension is 6.1K. ↩︎

Only shapes of the models that were frontier (largest, most pretraining hungry) can be predicted from pretraining compute. Thus Mythos 5 and Opus 4 qualify, but Opus 5 doesn't (it's very likely overtrained, and probably distilled from Mythos 5). The large jump in Opus 5 capability compared to Opus 4.8 (without a change in prices) supports the hypothesis that the relatively recent Opus 4.8 is still an old pretrain. The tokenizer change in Opus 4.7 is an argument against.

A different pretrain doesn't necessarily mean a different model shape (or costs), since hardware targeted by the older pretrain still needs to continue inferencing something (constraining total params), and the range of costs starting from the current frontier model and going down needs to be covered by multiple models (constraining active params). If older models keep shrinking to get cheaper (as it becomes feasible to overtrain them and distill from stronger models), while the shape of the current frontier model is determined by what's compute optimal, this would create a gap in capability that's too large. So arguably smaller models shouldn't shrink (as their pretrains get replaced in a new generation). Instead, new frontier models with more active params should appear on top of the existing models, as continued scaling of pretraining compute motivates their greater size and cost, while retrained models with the older shapes get stronger without getting cheaper. ↩︎

Apart from the trend of how much compute Anthropic had over time, a Dec 2024 Anthropic post claims that the Rainier datacenters being announced there would provide "five times the computing power (in exaflops) used to train our current generation of leading AI models". The reference to the "current generation of leading AI models" is ambiguous, since only Opus 3 was released back then, but Opus 4 was probably already pretrained, so the claim might be referring to it. At that stage in the planned Trainium 2 buildout for Anthropic, the Rainier compute might've referred to 400K chips, which in FP8 would correspond to about 250K H100s (1.3e15 FP8 FLOP/s per Trainium 2 chip compared to 2e15 FP8 FLOP/s per H100 chip). A fifth of that is 50K H100s, 2x less than my assumptions for the big model of 2025 and 4x less than my assumptions for the big 2026 model (which I'm linking to Mythos 5). ↩︎

This is the multi-year rental price until the end of last year, probably when a lot of the GB300 capacity was contracted. The current price is listed as $3.96 per chip-hour in SemiAnalysis's InferenceX (when selecting "Cost per Million Tokens (3 Year Rental)" in the Y-Axis field) (implying $15.6bn per year), and 6-year rental price was stated to be about $4.00 per chip-hour in their Jul 2026 post. ↩︎

The latest public estimate for GB300 from SemiAnalysis is 2,220 W per chip (160 kW per rack), clearly described as before-PUE total IT power (so it includes outside-the-rack networking). There are also estimates for various chips visible in InferenceX (when selecting "Joules per Token" in the Y-Axis field), which are 5% lower for some reason. Bigger datacenters probably have a higher scale-out networking overhead. ↩︎

To make sure everything checks out, let's do the output token cost calculation directly. With 560 KB of KV cache per token and HBM footprint factor of 2.9x, a 500K-long request covers the cost of reading 1.6 TB of HBM per pass (across the whole pipeline). Producing 1M output tokens at 3x MTP speedup then involves reading 540 PB of HBM in 333K passes. At MBU of 70% and HBM bandwidth of 14 TB/s, this takes 15.4 hours of compute die time. ↩︎

Buildout of a post-Feynman Nvidia system is underway over 2031, but I'm stopping at estimating second-year Feynman in this post. ↩︎

The direct calculation starts with 1.4 MB of KV cache per token and HBM footprint factor of 1.6x, so that a 500K-long request needs to cover the cost of reading 2.2 TB of HBM per pass (only 1.4x more than the 1.6 TB for the 2028 model). Producing 1M output tokens at the MTP speedup of 3x in 333K passes then involves reading 740 PB of HBM, which at MBU of 70% and HBM bandwidth of 16.9 TB/s then takes 17.35 hours of (base) compute die time. ↩︎

To see prices for chip-time, select "Cost per Million Tokens (3 Year Rental)" in the Y-Axis field. [↩︎](https://www.lesswrong.com/feed.xml#fnref-w7zy9DDDFfGSqikoh-13)

To see IT power budgets for chips, select "Joules per Token" in the Y-Axis field. [↩︎](https://www.lesswrong.com/feed.xml#fnref-w7zy9DDDFfGSqikoh-14)
── more in #artificial-intelligence 4 stories · sorted by recency
── more on @anthropic 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/quadrillion-param-co…] indexed:0 read:36min 2026-07-27 ·