Bias-aware KV quantization · R&D conclusion · September 2026

Protect the keys.
Quantize the values.

Do not choose one KV-cache dtype for every model. Symmetric FP8 is a useful capacity tier when the model's keys tolerate it. It can fail catastrophically on models with fragile, biased key geometry. For those models, keep keys in BF16 and store values in FP8: asymmetric K16/V8 preserves measured quality while reducing KV bytes by 25%.

Pre-bias confirmed the diagnosis: removing the key bias restores long-context retrieval while keeping K8/V8 storage. It did not become the serving fix. The final equal-memory gate showed a decisive throughput and latency regression, so the pre-bias kernel-optimization line is permanently closed and countersigned (2026-09-01). Pre-bias remains a documented capacity option (1.50× the measured K16/V8 token capacity), never the default; K16/V8 remains the default for fragile-key models.

Deployment decisionClassify key fragility first. Use K8/V8 for quality-admissible models, K16/V8 for fragile-key models, and BF16 when neither compressed tier has been qualified.
DIAGNOSIS CONFIRMEDPRE-BIAS KERNEL CLOSEDK16/V8 FRAGILE-KEY DEFAULTMODEL-AWARE TIERS

Deploy a policy, not a universal dtype

Capacity is free only after quality and execution support pass. The storage ratios below are exact for conventional caches with equally sized K and V tensors; compressed-latent attention needs its own accounting.

KV tierbytes per K/V element paircapacity vs BF16quality ruledeployment status
BF16 K / BF16 V41.00×referencefallback
BF16 K / FP8 V (K16/V8)31.333×measured quality-preserving kneefragile-key default
FP8 K / FP8 V (K8/V8)22.00×requires model qualificationrobust-key tier
pre-biased FP8 K / FP8 V22.00×retrieval repairednot the serving default
sub-8-bit frontiervaries>2.00× possiblekeys dominate error; values are saferresearch tiers
ROBUST KEYS: QUANTIZE BOTH

Use symmetric FP8 only after long-context retrieval and generation probes show that key quantization is admissible for the model and serving stack.

FRAGILE KEYS: KEEP K IN BF16

Use K16/V8 to retain the value-side savings without exposing the model to destructive key quantization.

UNKNOWN MODEL: QUALIFY FIRST

Do not infer safety from weight precision, model family labels, perplexity alone, or a kernel benchmark. Run the model-level gate.

The R&D chain is now coherent

Each page answers a different question. Read them in this order instead of treating the results as independent threads.

1 · DiagnoseWhy symmetric FP8 keys fail, which geometries are fragile, and which probes reveal the failure.
2 · ChooseThis page turns the diagnosis and pre-bias result into a deployment policy.
3 · CompareThe compression frontier measures the byte-versus-quality trade across more aggressive K/V formats.
4 · OperateCapacity accounting and result provenance carry the chosen K/V representation into planning and measurement.

Keep the pre-bias finding; stop the kernel line

Pre-bias answered the scientific question and failed the engineering decision. Those are compatible conclusions.

Numerical diagnosis

Retrieval is repaired

1.00

Pre-bias restores needle retrieval at 8K, 16K, and 30,720 tokens where ordinary symmetric K8/V8 scores 0.00 on the tested fragile-key model (Qwen2.5-7B; the biased-key Qwen2/Qwen2.5 family).

Correctness gate

Served geometry passes

PASS

The clean kernel passes all eight mutation cases at the served geometry. Injected live defects fail as intended.

Equal-memory serving gate

Performance fails

0.654×

Pre-bias at concurrency 48 delivers 0.654× the completed-request rate of K16/V8 at concurrency 32, with 2.056× p95 request latency (Qwen2.5-7B on an H100, 30,720-token inputs with 128-token outputs; result commit 85fa7b2d, countersigned in c82c5db9; serving stack: vLLM fork 8a1714108, FlashInfer fork 6dfdc833).

decision metricrequiredmeasuredverdict
completed requests per secondat least 1.20× K16/V80.654×fail
p95 request latencyat most 1.25× K16/V82.056×fail
served mutation suiteall clean cases pass; defects failmeets gatepass
long-context retrievalrepair ordinary K8/V8 collapse0.00 → 1.00pass

Gate provenance: result commit 85fa7b2d, countersigned c82c5db9 (2026-09-01); serving stack: vLLM fork 8a1714108, FlashInfer fork 6dfdc833.

Scope the claim correctly. The serving record contains two agreeing ABAB blocks rather than the five repetitions in the original performance-certification plan. That is enough for the negative engineering decision because both throughput and latency miss their frozen bounds by wide margins. It is not a five-repetition performance certification.
RETAIN

Pre-bias is evidence that key bias causes the failure and that a bias-aware representation can recover quality at symmetric-FP8 capacity.

DO NOT RETRY

Do not spend another tuning cycle on this kernel. The pre-bias kernel-optimization line is permanently closed and countersigned (2026-09-01). New hardware, a different kernel family, or a materially different representation would open a new line, not reopen this one.

Separate storage, quality, and kernel speed

A dtype does not have one universal speed. Kernel family, batch, layout, transforms, and launch policy decide whether reduced bytes become useful throughput.

SM90 Tensor Core family
16–19%

Ordinary K8/V8 is faster than K16/V8 at the measured bandwidth-bound shapes within the same audited kernel family (result commit f75960a6).

Batch-one crossing
K8/V8 loses

The same K8/V8 path loses at batch 1. Context length alone does not predict the sign of the result.

Pre-bias path
closed

Numerical repair does not erase transformation and scheduling cost. The full serving gate, not a microbenchmark, sets the default.

Preserve exact kernel, build, layout, scale, transform, and launch provenance with every performance result. Do not compare storage formats across unrelated kernel families as if dtype were the only variable.

Carry the policy into capacity planning

No additional public results page is needed for the two planning tools. They are operational consequences of this policy and belong here, next to the decision they implement.

Capacity model

aiconfigurator: K16/V8 byte accounting v2

Represents key and value widths separately, computes the exact 3-byte K/V pair for conventional attention, and exposes K16/V8 as a capacity-only mode. It rejects compressed-latent caches and refuses to invent latency without measured mixed-dtype kernel rows.

Review the v2 branch →
Measurement provenance

InferenceX: requested/effective dtype provenance v2

Records requested key and value dtypes separately, identifies symmetric and asymmetric representations, and keeps effective dtype unknown unless the engine attests it. It stores an argv fingerprint, never the raw server command line.

Review the v2 branch →
Planner boundary. The 4:3:2 byte ratio is exact for a conventional, equally sized K/V cache. Real deployment capacity must also include block fragmentation, allocator reservations, scale metadata, prefix sharing, offload buffers, sliding windows, and model-specific state. MLA and other compressed-latent layouts are separate representations, not K16/V8 with a different multiplier.

What the research established

Decode is often a memory-traffic problem.KV compression can improve residency and throughput, but only when the serving path converts fewer bytes into useful work.
Symmetric FP8 is not universally quality-safe.Fragile, biased keys can turn an apparently small quantization choice into catastrophic long-context retrieval failure.
Keys and values deserve different precision.K16/V8 preserves key geometry while capturing value-side savings, producing the measured quality-preserving knee.
Pre-bias validates the mechanism.Removing bias before key quantization recovers retrieval, so the failure is predictable and correctable rather than random.
A correct representation can still be a poor serving default.The pre-bias implementation passes correctness and fails the equal-memory serving gate.
The compression frontier continues below FP8.Further value compression is promising; reducing key precision remains the dominant quality risk.
Planning needs representation-aware bytes and evidence.Capacity estimates must distinguish K from V, and results must distinguish requested dtype from the dtype the engine actually used.

The assessment is closed; production R&D is not

The pre-bias decision and the high-level quantization policy are complete. The remaining work is integration, broader validation, and operational proof.

UPSTREAM THE ASYMMETRIC PATH

Land K16/V8 cache allocation, writers, decode kernels, serialization, and API plumbing in the serving projects that own them.

ATTEST THE EFFECTIVE DTYPE

Have each engine emit the resolved key/value representation after configuration, checkpoint defaults, and backend selection. Requested flags are not proof of runtime state.

VALIDATE REAL CAPACITY

Compare planner estimates with allocator telemetry across block sizes, prefix caching, sliding windows, offload, speculative decoding, tensor parallelism, and disaggregated serving.

BROADEN THE QUALIFICATION MATRIX

Extend model, context, workload, hardware, and kernel-family coverage. Treat new accelerators and compressed-latent attention as new measurement domains.

HARDEN CACHE LIFECYCLES

Test save/restore, transfer, eviction, swapping, prefix reuse, LMCache codecs, and mixed-version compatibility with asymmetric K/V dtypes.

AUTOMATE THE POLICY GATE

Turn key-fragility probes, long-context retrieval, generation quality, capacity, and serving performance into a repeatable admission test for each model and release.