Two KV cache formats for long-context decode. They hold the cache in less than half of fp8's memory, so each GPU serves 2.2 to 2.5× as many 128k-context users, and decode attention runs 1.3 to 1.9× faster. Measured on Llama-3.1-8B and Llama-3.1-70B.
Today that fleet holds its KV cache in fp8. Serving Llama-3.1-8B it handles 6,000 concurrent 128k-context users; serving Llama-3.1-70B, 2,375. With weights.zip it serves the same users on 40 to 50% of the GPUs, or up to 2.5 times the users on the same fleet.
Llama-3.1-8B · one model copy per H100, 6,000 users with fp8| KV cache format | H100 GPUs | Per year, reserved | Saving vs fp8 | Saving at on-demand rates |
|---|---|---|---|---|
| fp8 | 1,000 | ~$17.5M | baseline | baseline |
| int4 (group size 32) | 500 | ~$8.8M | ~$8.8M | ~$15.8M |
| weights.zip 4-bit | 462 | ~$8.1M | ~$9.4M | ~$17.0M |
| weights.zip 3.5-bit | 400 | ~$7.0M | ~$10.5M | ~$19.0M |
Reserved H100 capacity at about $2.00 per hour ($17,500 per GPU-year); on-demand at about $3.61 per hour. Above 32k context the KV cache dominates inference cost, so GPU memory sets how many users each card can serve. For a lab spending $1B a year on inference, the measured saving on 8B-class models is about $8M to $15M a year.
Llama-3.1-70B · the same 1,000 H100s as 125 eight-GPU nodes, 2,375 users with fp8| KV cache format | H100 GPUs | Per year, reserved | Saving vs fp8 | Saving at on-demand rates |
|---|---|---|---|---|
| fp8 | 1,000 | ~$17.5M | baseline | baseline |
| int4 (group size 32) | 560 | ~$9.8M | ~$7.7M | ~$13.9M |
| weights.zip 4-bit | 504 | ~$8.8M | ~$8.7M | ~$15.7M |
| weights.zip 3.5-bit | 432 | ~$7.6M | ~$9.9M | ~$18.0M |
GPUs are counted in whole eight-GPU nodes: 19 users per node with fp8, 34 with int4, 38 with 4-bit and 44 with 3.5-bit. Same reserved and on-demand H100 rates as above.
Annual value at your scale · 4-bit format vs fp8| Who | Concurrent 128k streams | Annual value |
|---|---|---|
| Hyperscalers and frontier labs | 10,000 to 20,000 | $15M to $30M+ |
| Mid-sized API clouds | 1,000 to 3,000 | $1.6M to $4.7M |
| AI startups and enterprise RAG | 200 to 500 | $300k to $800k |
Pricing is a share of the measured saving, typically 15 to 20%: a site license for the largest fleets, a metered platform license for API clouds, and a commercial SDK license for smaller teams.
| 3.5-bit | 4-bit | |
|---|---|---|
| Bits per cached value | 3.5 | 4.0 |
| KV memory vs fp8 | 0.44× | 0.50× |
| 128k-context users per 80 GB H100 | 15 | 13 |
| Decode attention vs fp8, batch 8 to 64 | 1.57 to 1.89× faster | 1.31 to 1.54× faster |
| Error at 128k vs int4, Llama-3.1-8B | 0.91× | 0.55× |
| 128k-context users per 8x H100 node, Llama-3.1-70B | 44 | 38 |
Users per GPU are concurrent 128k-token sessions of Llama-3.1-8B on one 80 GB H100. On the same card fp8 fits 6 and int4 fits 12. For Llama-3.1-70B on an 8x H100 node, fp8 fits 19 and int4 fits 34.
For providers already running int4-class KV caches.
For providers who want int4-class capacity in less memory than int4.
| Format | Bits per value | KV per session | Sessions per GPU | vs fp8 |
|---|---|---|---|---|
| bf16 | 16 | 17.2 GB | 3 | 0.5× |
| fp8 | 8 | 8.6 GB | 6 | 1× |
| int4 (group size 32) | 4.5 | 4.8 GB | 12 | 2.0× |
| weights.zip 4-bit | 4.0 | 4.3 GB | 13 | 2.2× |
| weights.zip 3.5-bit | 3.5 | 3.8 GB | 15 | 2.5× |
The KV budget is 92% of GPU memory less 16.06 GB of bf16 weights and 4 GB of activations: 58.6 GB. Per-model overhead is about 1.5 MiB and is included.
Capacity · Llama-3.1-70B, concurrent 128k-token sessions on an 8x H100 node| Format | Bits per value | KV per session | Sessions per node | vs fp8 |
|---|---|---|---|---|
| fp8 | 8 | 21.5 GB | 19 | 1× |
| int4 (group size 32) | 4.5 | 12.1 GB | 34 | 1.8× |
| weights.zip 4-bit | 4.0 | 10.7 GB | 38 | 2.0× |
| weights.zip 3.5-bit | 3.5 | 9.4 GB | 44 | 2.3× |
141 GB of bf16 weights across the node, with the same memory rules as above, leaves 416 GB for the KV cache.
Decode attention speed vs fp8 · Llama-3.1-8B layout, 128k context, higher is faster| Batch | int4 | weights.zip 4-bit | weights.zip 3.5-bit |
|---|---|---|---|
| 1 | 1.57× | 1.50× | 1.73× |
| 8 | 1.71× | 1.43× | 1.73× |
| 32 | 1.60× | 1.34× | 1.64× |
| 64 | 1.85× | 1.54× | 1.89× |
fp8 is NVIDIA's TensorRT-LLM XQA kernel through FlashInfer 0.7.0, running at about 2.8 TB/s. int4 is a kernel running at about 2.9 TB/s, close to the H100's memory bandwidth limit. At 32k and 64k context with batch 8 to 64, the 4-bit format runs 1.31 to 1.53× faster than fp8 and the 3.5-bit format 1.57 to 1.87×. At batch 8 and 128k, the 3.5-bit format cuts decode attention time by 42% against fp8. Every configuration decodes bit for bit identically to its reference decoder.
Decode attention speed vs fp8 · Llama-3.1-70B layout, 128k context, higher is faster| Batch | weights.zip 4-bit | weights.zip 3.5-bit |
|---|---|---|
| 8 | 1.41× | 1.62× |
| 32 | 1.55× | 1.84× |
| 64 | 1.38× | 1.64× |
The per-GPU shape of a 70B model served across 8 GPUs, against NVIDIA's TensorRT-LLM XQA kernel for fp8. These are the same configurations as the 70B quality results below. The ratios hold when the 70B is served on 4 GPUs or on 1.
Quality at 128k context vs the uncompressed model · Llama-3.1-8B, lower is better| Format | Bits | Error vs int4 | Perplexity change | Words changed |
|---|---|---|---|---|
| fp8 | 8 | 0.17× | +0.49% | 3.7% |
| int4 (group size 32) | 4.5 | 1× | +3.49% | 8.6% |
| weights.zip 4-bit | 4.0 | 0.55× | +1.93% | 6.3% |
| weights.zip 3.5-bit | 3.5 | 0.91× | +3.30% | 7.8% |
Scored at every position of two held-out 131,072-token windows against the bf16 model, with no subsampling. Error is average token KL divergence. Words changed is the share of positions where the most likely next token differs from bf16.
Long-context retrieval · Llama-3.1-8B, multi-key needle in a haystack| Format | Bits | 96k | 128k | Both lengths |
|---|---|---|---|---|
| bf16 (uncompressed) | 16 | 100.0% | 81.8% | 90.9% |
| int4 (group size 32) | 4.5 | 100.0% | 81.8% | 90.9% |
| weights.zip 3.5-bit | 3.5 | 95.5% | 77.3% | 86.4% |
44 RULER-style prompts (22 per length), every format answering the same ones, H100. The 3.5-bit format sits below int4 at these lengths but within measurement noise, at 22% less memory. Pooled over 64k, 96k and 128k (66 prompts) it scores 89.4% against int4's 90.9% and bf16's 93.9%.
Quality at 128k context vs the uncompressed model · Llama-3.1-70B, lower is better| Format | Bits | Text A: error vs int4 | Text A: perplexity change | Text B: error vs int4 | Text B: perplexity change |
|---|---|---|---|---|---|
| int4 (group size 32) | 4.5 | 1× | +5.26% | 1× | +4.29% |
| weights.zip 4-bit | 4.0 | 0.97× | +5.40% | 0.91× | +3.98% |
Two held-out 131,072-token texts, every position scored against bf16, with no test text used in calibration. On text A the 4-bit format agrees with the uncompressed model's top token 93.8% of the time, against int4's 93.7%. No late-context error spike out to 128k tokens.
Long-context retrieval · Llama-3.1-70B, multi-key needle in a haystack at 96k and 128k| Format | Bits | Correct |
|---|---|---|
| bf16 (uncompressed) | 16 | 61.1% |
| int4 (group size 32) | 4.5 | 61.1% |
| weights.zip 4-bit | 4.0 | 58.3% |
72 prompts, every format answering the same ones. The 4-bit format is within measurement noise of int4 (2.8 points, 95% interval 8.2 below to 2.7 above) and gave the same answers as int4 on every 96k prompt. These prompts are hard for the 70B even uncompressed, so most sit near the edge of what it can retrieve.
All figures are measured on public models (Qwen2.5 0.5B and 1.5B, Llama-3.1 8B and 70B, Pythia-160M, GPT-2 and a 27B FP8 model) on NVIDIA H100 SXM, H200 and RTX 4060 GPUs. Every restore was checked byte for byte against the original. zstd comparisons use zstd level 19 or NVIDIA nvCOMP Zstd on the same files. Dollar figures assume S3 Standard-class storage at about $24 per TB-month and typical cloud egress pricing. Results depend on the model and data type, so the free benchmark measures yours.