R446 · Infrastructure for agents at scale › Inference providers and serving reliability

4.9x the KV capacity, and the two probes where FP8 still wins

Read the original

kv-cachequantizationrocminference-servingbenchmarks

A 3-bit KV cache format for consumer and workstation AMD GPUs landed in mainline vLLM at the end of November, bringing native HIP kernels for RDNA4 parts. The headline circulating with it is that it delivers 4.9 times the KV capacity of BF16 while beating FP8 on both throughput and latency. The first half is right for one of the three formats. The second half is right for the main serving benchmark and wrong for the fixed-prefix probes run alongside it, and the gap between those two results is the interesting part.

What shipped

The change adds RDNA4 support to an existing 3-bit KV cache scheme, with native HIP kernels for dense attention and for a sparse-attention variant on the gfx1200 and gfx1201 targets — the Radeon AI PRO R9700 and the RX 9060 XT. It builds on an earlier enabling change and an RFC, exposes three cache formats through a ROCm attention backend, and supports FP16/BF16 activations, grouped-query attention and padded head and rotary dimensions.

It opened in mid-November and merged on 29 November. A follow-up fixing the RDNA4 build under a GCC host compiler merged the next day — worth knowing if you pinned the first merge commit.

The capacity claim, precisely

Per token per KV head, the 3-bit K3V4 format stores the tested dense model's attention cache in 248 bytes, against 1,024 for BF16 and 512 for FP8. That is 4.13x BF16 by raw footprint.

The five-way serving benchmark reports engine-reported KV token capacity at a fixed 10 GiB of KV cache per GPU:

KV formatAggregate output tok/sMean TTFT (s)Mean E2E (s)p95 E2E (s)KV token capacity
BF16153.485.5826.6829.65319,945
Segmented FP8154.005.1126.5929.45628,241
3-bit K3V4159.084.6825.7427.861,247,443
3-bit K3V3159.024.7825.7527.821,423,067
3-bit compact K3V3159.954.8125.6027.561,561,629

So the 4.9x figure is real but belongs to compact K3V3 (1,561,629 / 319,945 = 4.88x), not to the K3V4 format usually quoted alongside it, which is 3.90x. Against FP8 the three formats give 2.0 to 2.49x. Anyone reporting "4.9x" should say which format and against which baseline, because the three numbers for one change span 2.0x to 4.9x depending on the pair you choose.

Test conditions: a 27B FP8 model, tensor parallel across two R9700 GPUs, BF16 activations, ROCm 10, identical decode warmup and 32-token prefix matching across all five arms, an eight-conversation workload generating 512 tokens per request against prompt histories of roughly 2.1K to 20.1K tokens, 320 requests measured, about 162K uncached prompt tokens per arm.

Where the latency claim holds and where it does not

On the main serving benchmark the 3-bit formats do win: aggregate throughput 3.3 to 3.9 percent higher and mean time to first token 6.0 to 8.5 percent lower than the baselines, and the p95 end-to-end figures improve too.

On the fixed-prefix probes run in the same validation — 16,384 cached input tokens, 2,048 new input tokens, 64 output tokens per request — throughput advantage narrows to 0.6 to 2.7 percent over segmented FP8, and on one of those probes FP8 is faster to first token: 1.40 s against 1.45 to 1.52 s for the 3-bit formats.

That inversion is the useful signal, and it is mechanically unsurprising. A 3-bit cache buys capacity by spending compute on pack and unpack. When the workload is dominated by long histories that must fit in a fixed budget, capacity wins. When the workload is a short burst against an already-cached prefix, there is little capacity pressure to relieve and the dequantisation cost is exposed with nothing to pay for it. Quantised KV is a capacity optimisation that sometimes also improves latency, not a latency optimisation.

Kernel-level numbers

On the smaller RX 9060 XT part, a retest measured K3V4 prefill at 33.61 ms for grouped-query attention with four groups and 28.76 ms with eight, for a single request with a 256-token chunk against a 256K prefix — reported as 31 percent and 27 percent of the Triton BF16 latency respectively. The same retest passed 324 focused tests.

Accuracy

Five-shot GSM8K with greedy sampling and a 1,024-token output cap, on earlier revisions of the change: the 27B model scored 1,273/1,319 at BF16, 1,275/1,319 at FP8 and 1,275/1,319 at 3-bit. The change's own write-up declines to read anything into the two-answer difference, which is the right call. A sparse-attention model scored 124/128 on a GSM8K subset at both BF16 and 3-bit, with 2.47x the cache capacity at a matched budget and no API errors, extraction failures or token-limit finishes.

This is the weakest part of the evidence, not because the numbers are bad but because GSM8K at these margins cannot distinguish a 3-bit cache from a 16-bit one on anything long-context. The capacity gain exists precisely to serve longer histories, and the accuracy evidence is from short-answer arithmetic.

Two cautions in the change's own text

CI cannot validate this path. Existing continuous integration on datacentre parts selects the relevant tests but cannot validate RDNA4 dispatch; the runtime checks were run locally by the author. So the kernels are mainline but not covered by automated hardware testing on the hardware they target — which is consistent with a build break on a different host compiler surfacing within a day of merge.

An older throughput pair went the other way. A historical eight-turn serving comparison at a smaller 3 GiB per-GPU budget on the sparse-attention model shows the 3-bit format losing at middling concurrency: at two concurrent conversations 40.50 against 50.45 output tok/s, and at four, 64.92 against 112.77 — recovering to parity at eight. The write-up marks this as historical evidence rather than a current claim, notes JIT warnings during measurement and recovered allocator warnings at eight streams, and does not use it. It is still the clearest illustration that these formats have concurrency regimes where they are worse, and that a single benchmark shape will not find them.

Tradeoffs

Capacity against compute. Three bits per element rather than sixteen, paid for with pack and unpack work in the attention kernel. Profitable exactly when memory, not arithmetic, is the binding constraint.

Three formats rather than one. K3V4, K3V3 and compact K3V3 trade footprint against fidelity and kernel complexity, and they differ by nearly 25 percent in capacity. Someone has to choose, and the right choice depends on the workload.

Native kernels against a portable path. Hand-written HIP for two targets gets the latency, at the cost of code that does not follow the hardware forward and cannot be validated by the existing CI fleet.

Mainline against validated. Landing in mainline makes it available; it does not make it covered.

Failure modes

A review checklist

  1. Which of the three formats are you actually enabling, and what is its capacity multiplier against your current format — not against BF16, if you are already on FP8?

  2. Is your workload capacity-bound? Measure KV evictions or preemptions before switching, not throughput.

  3. What is your cache hit rate on prefixes? A high rate moves you toward the regime where FP8 was faster to first token.

  4. Have you measured across at least three concurrency levels? One of the published comparisons reverses at two and four streams.

  5. Is your accuracy check long-context? If the capacity is for long histories, the evaluation has to be too.

  6. What covers this on your hardware, given CI does not validate this dispatch path?

  7. Which exact commit are you building, and does it include the host-compiler build fix?

Connections

See R446 on the knowledge map

Part of the Research notes on nowucca.com. Figures and claims are the source's own unless the summary says otherwise.