Home › Articles › KV Cache Precision Tail: Implementation and Benchmarks
A small exact recent tail can recover much of a low-bit KV cache's lost precision, as shown on Qwen 3.6 27B and Gemma 4 31B across standard and KVarN formats.
Quantizing the whole KV cache treats every retained token alike, even though the newest tokens are often carrying the unfinished sentence, the current code block, or the tool output the model is about to act on. BeeLlama v0.4.0 adds a new precision tail feature: a configurable exact suffix that gives that recent span full-precision storage while leaving older history in the selected low-bit body.
The effect is easy to see in the Qwen controls. Standard q4_0 starts at 0.001846 median KLD and 1152.00 MiB with tail 0. tail 128 moves the median to 0.001206 for 1160.00 MiB; tail 1024 reaches 0.001057 for 1248.00 MiB; tail 2048 reaches 0.001019 for 1312.00 MiB. The first exact tokens do most of the work, and the second thousand buy a smaller change.
The tail changes storage precision, not the attention pattern. Full-attention layers still attend across the exact suffix and quantized body. Sliding-window layers still observe their configured window. As tokens arrive, the boundary advances: once a token falls behind the exact span it is stored in the quantized body.
Standard caches in these runs use a BF16 tail. KVarN quantizes in groups of 128 tokens, and each group is quantized only when its last token arrives. The newest tokens have not filled a group yet, so they stay in F16 until they do. BeeLlama floors the tail at one full group, so a raw request of 0 becomes an effective 128-token exact suffix. The tables display that minimum as 128*, and KVarN has no tail 0 rows, as they are impossible to achieve.
The full tables are deliberately symmetric: K and V use the same type in every non-BF16 row. That covers all eleven symmetric standard types, including the _1 variants, and all six symmetric KVarN types, which isolates body width and tail size before the broader practical review introduces asymmetric pairs. Qwen includes standard tails 0, 128, 1024, and 2048 plus KVarN tails 128*, 1024, and 2048. Gemma stops at 1024 because that already covers its visible sliding window.
Median KLD ranks the typical scored position. Mean and upper percentiles show whether a similar median hides a heavier error tail, and section 5 puts that check to work. Same-top probability asks whether the most likely token agrees with the BF16-cache baseline. Tok/s is prompt processing from the quality run, not generation speed. Persistent KV memory sums the row-matched runtime cache buffers.
Low-bit bodies have the largest recoverable error. On Qwen, standard q2_0 falls from 0.019374 median KLD at tail 0 to 0.007521 at 128, 0.004648 at 1024, and 0.003696 at 2048. KVarN2 begins from a stronger intrinsic 128* configuration at 0.007108, then falls to 0.003811 and 0.002820. At eight bits the curve is almost flat: standard q8_0 moves from 0.000909 at tail 0 to 0.000895 at 2048, while kvarn8 is 0.000871 at 128* and 1024 and 0.000877 at 2048.
| Cache | Tail | KV cache (MiB) | Median KLD |
|---|---|---|---|
q2_0 | 0 | 640.00 | 0.019374 |
q2_0 | 1024 | 736.00 | 0.004648 |
kvarn2 | 128* | 672.00 | 0.007108 |
kvarn2 | 1024 | 720.00 | 0.003811 |
q4_0 | 0 | 1152.00 | 0.001846 |
q4_0 | 1024 | 1248.00 | 0.001057 |
kvarn4 | 128* | 1184.00 | 0.001111 |
kvarn4 | 1024 | 1232.00 | 0.000994 |
q8_0 | 0 | 2176.00 | 0.000909 |
q8_0 | 1024 | 2272.00 | 0.000897 |
kvarn8 | 128* | 2208.00 | 0.000871 |
kvarn8 | 1024 | 2256.00 | 0.000871 |
Tail 128 is valuable here as a control and fairness point. It is not automatically the best working size. Teacher-forced Wikitext continually gives the most recent text a chance to matter, which can flatter even a short exact suffix. For a real long-context workload, tail 1024 is the more practical first step when recent source or tool output is privileged, while tail 2048 and above are a task-specific purchase after that.
On Qwen, KVarN records lower median KLD than the standard cache at the same nominal width and published tail. At 128 tokens, kvarn4 records 0.001111 against 0.001206 for standard q4_0. At 1024 the comparison is 0.000994 against 0.001057. At two bits the gap widens instead, from 5.5% at tail 128 to 18.0% at 1024 and 23.7% at 2048, and three bits behaves the same way. The longer exact suffix helps the low-bit KVarN body more than it helps the low-bit standard body.
Those are median rankings, and the mean sometimes disagrees. At tail 1024, kvarn4 records the lower median against q4_0, 0.000994 against 0.001057, and the higher mean, 0.003059 against 0.002881; kvarn5 against q5_0 behaves the same way. This is partually a matter of noise and is hard to draw conclusions from, because even doing the same benchmarks at different batch sizes would results in mean extremes shifting significantly.
Memory runs the other way as the tail grows. The KVarN body is smaller than the standard body at the same width, 1136.00 MiB against 1152.00 at four bits, while its intrinsic exact group costs 48.00 MiB where a standard tail 128 overlay costs 8.00 MiB. That leaves KVarN 24.00 MiB larger at tail 128. At tail 1024 and 2048 both sides carry the same overlay, only the body difference remains, making every Qwen KVarN row 16.00 MiB smaller.
The standalone KVarN article uses the same baseline structure. Standard tail 0 is a diagnostic control for suffix effects; standard tail 128 versus KVarN 128* compares deployable configurations at the same suffix length. The comparison is not a pure quantizer ablation because KVarN uses F16 for the suffix and retains an exact prefix sink on non-SWA layers.
For Qwen, a low-bit body benefits materially from the first 1024 exact tokens. At five bits and above the tail's measured contribution shrinks, though the body is still a measurable step below BF16 at every width. On the KLD axis alone the tail is often the better purchase: q4_0 at tail 1024 records 0.001057 for 1248.00 MiB, while q5_0 at tail 0 records 0.001154 for 1408.00 MiB. This review still prefers body precision for workloads that value old and recent tokens equally, because teacher-forced Wikitext rewards the recent span more heavily than a long agent session does.
A balanced starting point is a KVarN4 or KVarN5 body with tail 1024 when the backend supports it; standard q4/q5 is useful when prefill speed or portability matters more. Tail 2048 makes sense when the newest two thousand tokens are genuinely the privileged working set, such as a long compiler trace or a source file just loaded into context. It is less persuasive for retrieval-first workloads where an instruction or definition from much earlier must survive.
The standard path is faster in Qwen prefill throughout these symmetric rows. At the four-bit matched point it processes 871.68 tokens/s for standard q4 tail 128 versus 822.51 for KVarN4 128*. Within every symmetric Qwen series, measured prefill throughput also falls as the published tail grows. Generation throughput stayed solid, as shown separately below.
Gemma's 50 sliding-window layers see 1024 tokens while ten layers use full attention. In these benchmark artifacts, tail 1024 makes the complete visible window exact in most layers, alongside a large KLD improvement and a sharp memory/throughput transition. Standard q4 moves from 0.134091 at tail 0 to 0.044082 at 1024, while KVarN4 moves from 0.058185 at 128* to 0.037354 at 1024.
| Cache | Tail | KV cache (MiB) | Median KLD |
|---|---|---|---|
q2_0 | 0 | 387.50 | 2.95758 |
q2_0 | 1024 | 1080.86 | 0.382933 |
kvarn2 | 128* | 698.98 | 2.091697 |
kvarn2 | 1024 | 1090.86 | 0.194587 |
q4_0 | 0 | 697.50 | 0.134091 |
q4_0 | 1024 | 1240.86 | 0.044082 |
kvarn4 | 128* | 1008.98 | 0.058185 |
kvarn4 | 1024 | 1250.86 | 0.037354 |
The exact window also weakens the normal memory ladder. Standard q4 tail 1024 uses 1240.86 MiB against 1250.86 for KVarN4 at the same tail, while q8 tail 0 uses 1317.50 MiB and keeps much higher prefill throughput. Gemma therefore needs a separate decision: exact-window configurations are compelling when recent context dominates, while a standard high-bit body is a strong general default.
KLD measures how the full output distribution shifts at every scored position, so it is sensitive to cache changes that perplexity can hide, but it is not coding accuracy, long-range retrieval, instruction retention, tool reliability, or error accumulation. A tail that cuts median KLD in half on Wikitext may do far less for a task where the model needs to recall a function signature from 3000 tokens ago, or far more for a task where the last few lines of context carry most of the signal.
Tail 128 produces some of the largest KLD improvements in these tables because even a small exact suffix keeps the newest tokens in full precision format. Real tasks are not scored token-by-token across an encyclopedic corpus. Instruction following, code completion, and tool use depend on retaining specific earlier context, and the tokens that matter may sit well beyond 128 positions back. A working tail for those tasks likely starts at 1024 or 2048 and may need to be even larger, depending on how the model uses its context window.
The quality matrix uses one RTX 3090 on Windows 11, BeeLlama v0.4.0, CUDA 13.1 build. Both models use Q5_K_S weights and Wikitext-2 raw with batch size 2048, micro-batch size 512, seed 1, FlashAttention, unified KV, no mmap, mlock, and no host offload. KLD is calculated against a matching BF16-cache baseline.
KV cache cells show the persistent total. Where a cache pair has a shorter reference row, a smaller (Δ...) gives the difference from that tail 0 total. KVarN 128* is its own requested-0 baseline and carries no delta, because its intrinsic exact group is already inside the total: on Qwen that group accounts for 48.00 MiB where a standard tail 128 overlay costs 8.00 MiB. Longer KVarN tails are measured from that 128* row, so KVarN and standard deltas begin from different baselines and should be read within a family rather than across the two.
| Cache | Tail | KV cache (MiB) | Median KLD | Mean KLD | KLD +/- | 90% KLD | 95% KLD | 99% KLD | 99.9% KLD | Maximum KLD | Same top p | Tok/s | Elapsed (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bf16 | 0 | 4096.00 | 0 | 0 | 0 | 0.000016 | 0.000023 | 0.000037 | 0.00005 | 0.000065 | 99.995% +/- 0.002% | 887.82 | 334.479 |
q8_0 | 0 | 2176.00 | 0.000909 | 0.002754 | 0.000247 | 0.004262 | 0.006775 | 0.019907 | 0.093029 | 22.259039 | 97.93% +/- 0.039% | 886.04 | 333.999 |
q8_0 | 128 | 2184.00 (Δ8.00) | 0.000901 | 0.00253 | 0.00017 | 0.004231 | 0.006683 | 0.019529 | 0.090395 | 11.783675 | 98% +/- 0.039% | 874.94 | 343.638 |
q8_0 | 1024 | 2272.00 (Δ96.00) | 0.000897 | 0.002718 | 0.000235 | 0.004219 | 0.006665 | 0.019525 | 0.087699 | 16.639639 | 97.936% +/- 0.039% | 866.46 | 340.834 |
q8_0 | 2048 | 2336.00 (Δ160.00) | 0.000895 | 0.002644 | 0.00021 | 0.004228 | 0.006628 | 0.019229 | 0.087113 | 17.801193 | 97.998% +/- 0.039% | 857.8 | 343.684 |
kvarn8 | 128* | 2208.00 | 0.000871 | 0.002472 | 0.00016 | 0.004099 | 0.006477 | 0.018442 | 0.088652 | 11.741246 | 98.039% +/- 0.038% | 816.51 | 359.779 |
kvarn8 | 1024 | 2256.00 (Δ48.00) | 0.000871 | 0.002401 | 0.00018 | 0.004105 | 0.006414 | 0.018772 | 0.087639 | 17.570065 | 98.036% +/- 0.038% | 811.11 | 361.748 |
kvarn8 | 2048 | 2320.00 (Δ112.00) | 0.000877 | 0.002592 | 0.000205 | 0.004112 | 0.006514 | 0.018998 | 0.088857 | 14.825253 | 98.026% +/- 0.038% | 802.55 | 364.918 |
q6_1 | 0 | 1792.00 | 0.00095 | 0.002941 | 0.000287 | 0.004433 | 0.007011 | 0.019964 | 0.087622 | 21.414415 | 97.976% +/- 0.039% | 884.41 | 334.494 |
q6_1 | 128 | 1800.00 (Δ8.00) | 0.000912 | 0.002744 | 0.00023 | 0.004305 | 0.006743 | 0.019552 | 0.088572 | 19.139778 | 97.976% +/- 0.039% | 869.7 | 334.481 |
q6_1 | 1024 | 1888.00 (Δ96.00) | 0.000903 | 0.002855 | 0.000237 | 0.004254 | 0.006673 | 0.019611 | 0.085322 | 17.96875 | 98.01% +/- 0.039% | 866.66 | 340.834 |
q6_1 | 2048 | 1952.00 (Δ160.00) | 0.000906 | 0.002633 | 0.000205 | 0.004246 | 0.006703 | 0.019805 | 0.088669 | 15.910205 | 97.968% +/- 0.039% | 857.66 | 343.974 |
q6_0 | 0 | 1664.00 | 0.00096 | 0.002771 | 0.000228 | 0.004462 | 0.007087 | 0.02013 | 0.091134 | 20.712107 | 97.906% +/- 0.04% | 884.75 | 334.314 |
q6_0 | 128 | 1672.00 (Δ8.00) | 0.000913 | 0.002624 | 0.000176 | 0.004263 | 0.006714 | 0.019789 | 0.092442 | 14.56512 | 97.99% +/- 0.039% | 869.65 | 334.683 |
q6_0 | 1024 | 1760.00 (Δ96.00) | 0.000908 | 0.002693 | 0.000229 | 0.004272 | 0.006679 | 0.019239 | 0.085197 | 19.6115 | 97.97% +/- 0.039% | 866.51 | 340.762 |
q6_0 | 2048 | 1824.00 (Δ160.00) | 0.000904 | 0.002605 | 0.000178 | 0.004255 | 0.006733 | 0.019133 | 0.089872 | 14.915945 | 97.929% +/- 0.039% | 857.54 | 343.761 |
kvarn6 | 128* | 1696.00 | 0.000889 | 0.002688 | 0.000216 | 0.004177 | 0.00656 | 0.019039 | 0.088993 | 15.319936 | 98.034% +/- 0.038% | 814.17 | 360.353 |
kvarn6 | 1024 | 1744.00 (Δ48.00) | 0.000879 | 0.00244 | 0.000193 | 0.004099 | 0.006482 | 0.018972 | 0.084629 | 17.962435 | 98.02% +/- 0.038% | 808.9 | 362.461 |
kvarn6 | 2048 | 1808.00 (Δ112.00) | 0.000876 | 0.002524 | 0.000173 | 0.004154 | 0.006502 | 0.019227 | 0.086027 | 13.384098 | 98.01% +/- 0.039% | 801.99 | 365.166 |
q5_1 | 0 | 1536.00 | 0.001087 | 0.003134 | 0.000221 | 0.005035 | 0.00785 | 0.022133 | 0.097902 | 15.788761 | 97.783% +/- 0.041% | 883.44 | 336.501 |
q5_1 | 128 | 1544.00 (Δ8.00) | 0.00096 | 0.002943 | 0.000253 | 0.004502 | 0.007069 | 0.020294 | 0.09145 | 17.408974 | 97.94% +/- 0.039% | 869.37 | 334.367 |
q5_1 | 1024 | 1632.00 (Δ96.00) | 0.000926 | 0.002811 | 0.000231 | 0.004359 | 0.006797 | 0.019638 | 0.084896 | 18.908886 | 97.929% +/- 0.039% | 865.09 | 341.159 |
q5_1 | 2048 | 1696.00 (Δ160.00) | 0.000924 | 0.002762 | 0.00024 | 0.00434 | 0.006829 | 0.020037 | 0.096556 | 18.341221 | 97.948% +/- 0.039% | 856.48 | 344.288 |
q5_0 | 0 | 1408.00 | 0.001154 | 0.003269 | 0.000241 | 0.005367 | 0.008346 | 0.023467 | 0.09707 | 20.078678 | 97.755% +/- 0.041% | 883.3 | 334.95 |
q5_0 | 128 | 1416.00 (Δ8.00) | 0.00097 | 0.002773 | 0.000185 | 0.004618 | 0.007266 | 0.021703 | 0.087685 | 14.906242 | 97.975% +/- 0.039% | 869.16 | 334.391 |
q5_0 | 1024 | 1504.00 (Δ96.00) | 0.000938 | 0.002715 | 0.000203 | 0.004402 | 0.006971 | 0.020275 | 0.088132 | 17.625654 | 97.968% +/- 0.039% | 864.91 | 341.636 |
q5_0 | 2048 | 1568.00 (Δ160.00) | 0.000928 | 0.002568 | 0.000162 | 0.004362 | 0.006877 | 0.019983 | 0.089668 | 13.544785 | 97.94% +/- 0.039% | 856.17 | 344.366 |
kvarn5 | 128* | 1440.00 | 0.000927 | 0.002729 | 0.00022 | 0.004396 | 0.006968 | 0.020241 | 0.086537 | 17.650526 | 97.941% +/- 0.039% | 821.65 | 357.442 |
kvarn5 | 1024 | 1488.00 (Δ48.00) | 0.000897 | 0.002851 | 0.000259 | 0.00424 | 0.00673 | 0.019242 | 0.087666 | 20.33749 | 98.009% +/- 0.039% | 815.52 | 359.7 |
kvarn5 | 2048 | 1552.00 (Δ112.00) | 0.000892 | 0.002474 | 0.00017 | 0.004191 | 0.006602 | 0.019269 | 0.088074 | 15.335611 | 98.01% +/- 0.039% | 807.75 | 362.98 |
q4_1 | 0 | 1280.00 | 0.001666 | 0.004274 | 0.000225 | 0.007669 | 0.011826 | 0.031583 | 0.135315 | 17.828527 | 97.32% +/- 0.045% | 883.26 | 335.34 |
q4_1 | 128 | 1288.00 (Δ8.00) | 0.001134 | 0.003696 | 0.000344 | 0.005526 | 0.008701 | 0.024801 | 0.101361 | 22.062103 | 97.755% +/- 0.041% | 871.15 | 333.547 |
q4_1 | 1024 | 1376.00 (Δ96.00) | 0.001019 | 0.002969 | 0.000194 | 0.004924 | 0.007806 | 0.021975 | 0.09734 | 12.446983 | 97.869% +/- 0.04% | 865.05 | 341.923 |
q4_1 | 2048 | 1440.00 (Δ160.00) | 0.000988 | 0.003055 | 0.000248 | 0.004722 | 0.007459 | 0.020887 | 0.098411 | 20.933098 | 97.862% +/- 0.04% | 856.67 | 344.404 |
q4_0 | 0 | 1152.00 | 0.001846 | 0.004673 | 0.000231 | 0.008483 | 0.012958 | 0.034532 | 0.154408 | 20.69981 | 97.199% +/- 0.046% | 884.31 | 334.626 |
q4_0 | 128 | 1160.00 (Δ8.00) | 0.001206 | 0.003406 | 0.000239 | 0.005876 | 0.009256 | 0.025325 | 0.111271 | 21.159081 | 97.678% +/- 0.042% | 871.68 | 333.643 |
q4_0 | 1024 | 1248.00 (Δ96.00) | 0.001057 | 0.002881 | 0.000143 | 0.005101 | 0.008056 | 0.023155 | 0.104486 | 11.471374 | 97.861% +/- 0.04% | 866.05 | 341.103 |
q4_0 | 2048 | 1312.00 (Δ160.00) | 0.001019 | 0.002882 | 0.000182 | 0.004875 | 0.007718 | 0.022027 | 0.092499 | 13.589367 | 97.861% +/- 0.04% | 857.4 | 344.146 |
kvarn4 | 128* | 1184.00 | 0.001111 | 0.003244 | 0.000246 | 0.005424 | 0.008568 | 0.023939 | 0.112781 | 21.767607 | 97.771% +/- 0.041% | 822.51 | 356.928 |
kvarn4 | 1024 | 1232.00 (Δ48.00) | 0.000994 | 0.003059 | 0.000273 | 0.004751 | 0.007558 | 0.021571 | 0.090391 | 19.718029 | 97.878% +/- 0.04% | 813.17 | 361.01 |
kvarn4 | 2048 | 1296.00 (Δ112.00) | 0.000952 | 0.002733 | 0.000184 | 0.004534 | 0.007209 | 0.021061 | 0.09727 | 15.36698 | 97.871% +/- 0.04% | 808.93 | 362.72 |
q3_1 | 0 | 1024.00 | 0.00423 | 0.01029 | 0.0004 | 0.019683 | 0.029942 | 0.075515 | 0.279691 | 27.81566 | 95.811% +/- 0.055% | 884.17 | 334.732 |
q3_1 | 128 | 1032.00 (Δ8.00) | 0.001876 | 0.00552 | 0.000224 | 0.010366 | 0.01666 | 0.043393 | 0.170819 | 14.557376 | 97.044% +/- 0.047% | 869.81 | 334.407 |
q3_1 | 1024 | 1120.00 (Δ96.00) | 0.001405 | 0.004149 | 0.000225 | 0.007479 | 0.011949 | 0.034135 | 0.12753 | 15.229436 | 97.369% +/- 0.044% | 869.35 | 339.538 |
q3_1 | 2048 | 1184.00 (Δ160.00) | 0.001266 | 0.003801 | 0.000199 | 0.006535 | 0.010529 | 0.02972 | 0.124204 | 14.238562 | 97.581% +/- 0.042% | 856.4 | 344.375 |
q3_0 | 0 | 896.00 | 0.004696 | 0.011004 | 0.000358 | 0.021818 | 0.033181 | 0.081459 | 0.304186 | 22.705723 | 95.605% +/- 0.057% | 885.36 | 334.421 |
q3_0 | 128 | 904.00 (Δ8.00) | 0.002057 | 0.006154 | 0.000296 | 0.011425 | 0.018424 | 0.048951 | 0.199019 | 22.161623 | 96.932% +/- 0.048% | 870.21 | 334.152 |
q3_0 | 1024 | 992.00 (Δ96.00) | 0.001551 | 0.0047 | 0.000292 | 0.008217 | 0.013194 | 0.036316 | 0.167386 | 20.203789 | 97.305% +/- 0.045% | 867 | 340.803 |
q3_0 | 2048 | 1056.00 (Δ160.00) | 0.001382 | 0.004117 | 0.00028 | 0.007193 | 0.011464 | 0.031356 | 0.135249 | 28.136419 | 97.544% +/- 0.043% | 857.76 | 343.812 |
kvarn3 | 128* | 928.00 | 0.001797 | 0.005434 | 0.000273 | 0.010039 | 0.016111 | 0.04355 | 0.180254 | 20.401459 | 97.05% +/- 0.047% | 825.77 | 355.546 |
kvarn3 | 1024 | 976.00 (Δ48.00) | 0.001316 | 0.003978 | 0.000206 | 0.007084 | 0.01146 | 0.031418 | 0.139558 | 15.251789 | 97.472% +/- 0.043% | 820.69 | 357.751 |
kvarn3 | 2048 | 1040.00 (Δ112.00) | 0.001158 | 0.003483 | 0.000177 | 0.006078 | 0.009778 | 0.027241 | 0.132605 | 13.852559 | 97.656% +/- 0.042% | 813.59 | 360.368 |
q2_1 | 0 | 768.00 | 0.02059 | 0.043056 | 0.000518 | 0.093896 | 0.141153 | 0.327285 | 1.101459 | 23.262442 | 90.826% +/- 0.08% | 886.58 | 333.891 |
q2_1 | 128 | 776.00 (Δ8.00) | 0.007739 | 0.021777 | 0.000403 | 0.047277 | 0.074847 | 0.190396 | 0.698771 | 24.132849 | 93.921% +/- 0.066% | 872.49 | 333.498 |
q2_1 | 1024 | 864.00 (Δ96.00) | 0.004916 | 0.014746 | 0.000371 | 0.030683 | 0.049573 | 0.128309 | 0.46978 | 20.716208 | 95.143% +/- 0.059% | 867.2 | 340.82 |
q2_1 | 2048 | 928.00 (Δ160.00) | 0.004049 | 0.011989 | 0.000293 | 0.024539 | 0.040398 | 0.106158 | 0.401181 | 18.575218 | 95.609% +/- 0.057% | 857.88 | 343.837 |
q2_0 | 0 | 640.00 | 0.019374 | 0.042107 | 0.000589 | 0.09044 | 0.136494 | 0.31708 | 1.198902 | 25.117481 | 91.176% +/- 0.078% | 888.39 | 333.246 |
q2_0 | 128 | 648.00 (Δ8.00) | 0.007521 | 0.022825 | 0.000438 | 0.049145 | 0.079826 | 0.210698 | 0.809721 | 23.872931 | 93.878% +/- 0.066% | 874.48 | 332.792 |
q2_0 | 1024 | 736.00 (Δ96.00) | 0.004648 | 0.015511 | 0.00039 | 0.031896 | 0.0539 | 0.151391 | 0.563713 | 25.558784 | 95.065% +/- 0.06% | 870.67 | 339.272 |
q2_0 | 2048 | 800.00 (Δ160.00) | 0.003696 | 0.01292 | 0.000419 | 0.024213 | 0.041882 | 0.122822 | 0.539967 | 24.472837 | 95.62% +/- 0.057% | 862.37 | 342.255 |
kvarn2 | 128* | 672.00 | 0.007108 | 0.020849 | 0.000388 | 0.045561 | 0.072373 | 0.180687 | 0.693597 | 21.17305 | 94.234% +/- 0.064% | 823.72 | 356.612 |
kvarn2 | 1024 | 720.00 (Δ48.00) | 0.003811 | 0.01304 | 0.000401 | 0.026707 | 0.043382 | 0.115258 | 0.450496 | 24.745974 | 95.608% +/- 0.057% | 818.98 | 358.301 |
kvarn2 | 2048 | 784.00 (Δ112.00) | 0.00282 | 0.00975 | 0.000305 | 0.019724 | 0.033202 | 0.090067 | 0.347906 | 25.212008 | 96.214% +/- 0.053% | 812.89 | 360.53 |
* KVarN requested tail 0 resolves to an effective 128-token F16 suffix and is displayed as 128*. Standard tails use BF16.
| Cache | Tail | KV cache (MiB) | Median KLD | Mean KLD | KLD +/- | 90% KLD | 95% KLD | 99% KLD | 99.9% KLD | Maximum KLD | Same top p | Tok/s | Elapsed (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bf16 | 0 | 2480.00 | 0 | 0 | 0 | 0.000007 | 0.000013 | 0.000029 | 0.000047 | 0.000063 | 99.995% +/- 0.002% | 945.51 | 407.259 |
q8_0 | 0 | 1317.50 | 0.0371 | 0.455988 | 0.003782 | 1.065346 | 2.340681 | 7.322694 | 16.813929 | 34.116127 | 80.445% +/- 0.103% | 932.09 | 410.772 |
q8_0 | 128 | 1428.36 (Δ110.86) | 0.036941 | 0.446595 | 0.003738 | 1.042519 | 2.28076 | 7.119495 | 16.757271 | 35.361652 | 80.541% +/- 0.103% | 859.82 | 439.033 |
q8_0 | 1024 | 1560.86 (Δ243.36) | 0.036325 | 0.446657 | 0.003758 | 1.038163 | 2.268654 | 7.200713 | 16.800247 | 36.42054 | 80.521% +/- 0.103% | 749.76 | 487.73 |
kvarn8 | 128* | 1628.98 | 0.035682 | 0.436457 | 0.003711 | 1.004478 | 2.217923 | 7.066823 | 16.556686 | 42.167252 | 80.779% +/- 0.103% | 739.52 | 493.807 |
kvarn8 | 1024 | 1570.86 (Δ−58.12) | 0.035325 | 0.436848 | 0.003697 | 1.012084 | 2.213313 | 7.067196 | 16.519888 | 42.97501 | 80.706% +/- 0.103% | 720.16 | 504.573 |
q6_1 | 0 | 1085.00 | 0.041691 | 0.496318 | 0.004002 | 1.193682 | 2.57511 | 7.813056 | 17.119785 | 34.462643 | 79.643% +/- 0.105% | 927.52 | 412.792 |
q6_1 | 128 | 1195.86 (Δ110.86) | 0.038113 | 0.461399 | 0.003794 | 1.092941 | 2.376459 | 7.340671 | 16.499638 | 35.249336 | 80.253% +/- 0.104% | 856.25 | 389.712 |
q6_1 | 1024 | 1440.86 (Δ355.86) | 0.036879 | 0.453074 | 0.0038 | 1.053313 | 2.30901 | 7.282362 | 16.726944 | 34.065845 | 80.576% +/- 0.103% | 754.61 | 485.382 |
q6_0 | 0 | 1007.50 | 0.042636 | 0.506265 | 0.004037 | 1.234986 | 2.608924 | 7.880782 | 17.30599 | 34.820602 | 79.496% +/- 0.105% | 927.41 | 412.918 |
q6_0 | 128 | 1118.36 (Δ110.86) | 0.038613 | 0.470964 | 0.00389 | 1.118139 | 2.400956 | 7.482912 | 17.205654 | 36.263268 | 80.062% +/- 0.104% | 860.59 | 436.973 |
q6_0 | 1024 | 1400.86 (Δ393.36) | 0.037012 | 0.454068 | 0.003778 | 1.056343 | 2.321572 | 7.331576 | 16.252821 | 36.147408 | 80.46% +/- 0.103% | 753.16 | 486.222 |
kvarn6 | 128* | 1318.98 | 0.036528 | 0.452431 | 0.003767 | 1.057252 | 2.319934 | 7.198008 | 16.54286 | 37.141392 | 80.56% +/- 0.103% | 762.59 | 481.15 |
kvarn6 | 1024 | 1410.86 (Δ91.88) | 0.035561 | 0.440467 | 0.003741 | 1.020351 | 2.211617 | 6.995099 | 17.048428 | 35.345776 | 80.677% +/- 0.103% | 723.82 | 502.106 |
q5_1 | 0 | 930.00 | 0.058351 | 0.597636 | 0.004457 | 1.510055 | 3.103061 | 8.748694 | 18.167061 | 35.175705 | 77.261% +/- 0.109% | 932.42 | 410.804 |
q5_1 | 128 | 1040.86 (Δ110.86) | 0.04509 | 0.504284 | 0.004002 | 1.230225 | 2.579378 | 7.821627 | 17.326775 | 33.956615 | 79.047% +/- 0.106% | 862.19 | 435.146 |
q5_1 | 1024 | 1360.86 (Δ430.86) | 0.038664 | 0.457079 | 0.003793 | 1.068858 | 2.319697 | 7.303724 | 16.803717 | 33.48465 | 80.394% +/- 0.103% | 754.09 | 485.46 |
q5_0 | 0 | 852.50 | 0.061747 | 0.626347 | 0.004621 | 1.610424 | 3.239471 | 9.084101 | 18.731647 | 36.826859 | 76.802% +/- 0.11% | 929.94 | 412.09 |
q5_0 | 128 | 963.36 (Δ110.86) | 0.046119 | 0.522704 | 0.004112 | 1.288301 | 2.687745 | 8.064505 | 16.966459 | 40.778828 | 78.886% +/- 0.106% | 861.09 | 435.778 |
q5_0 | 1024 | 1320.86 (Δ468.36) | 0.038596 | 0.462 | 0.003825 | 1.080524 | 2.366693 | 7.410694 | 16.760483 | 40.052086 | 80.185% +/- 0.104% | 751.48 | 486.962 |
kvarn5 | 128* | 1163.98 | 0.041262 | 0.483087 | 0.003896 | 1.152129 | 2.477363 | 7.594825 | 16.600363 | 33.928799 | 79.609% +/- 0.105% | 773.59 | 475.443 |
kvarn5 | 1024 | 1330.86 (Δ166.88) | 0.035761 | 0.445017 | 0.003755 | 1.044459 | 2.267868 | 7.212839 | 16.502676 | 36.113117 | 80.59% +/- 0.103% | 724.48 | 501.753 |
q4_1 | 0 | 775.00 | 0.152159 | 0.82964 | 0.005123 | 2.182901 | 4.107193 | 10.02248 | 19.547009 | 34.10622 | 71.06% +/- 0.118% | 934.8 | 409.714 |
q4_1 | 128 | 885.86 (Δ110.86) | 0.093721 | 0.631331 | 0.00443 | 1.586001 | 3.142838 | 8.747749 | 17.926983 | 33.085419 | 75.303% +/- 0.112% | 866.94 | 433.113 |
q4_1 | 1024 | 1280.86 (Δ505.86) | 0.039669 | 0.472397 | 0.003802 | 1.133379 | 2.436755 | 7.443701 | 16.418152 | 35.277176 | 79.782% +/- 0.105% | 753.28 | 485.759 |
q4_0 | 0 | 697.50 | 0.134091 | 0.901654 | 0.005545 | 2.506218 | 4.581851 | 10.909316 | 20.442234 | 34.099125 | 71.347% +/- 0.118% | 935.69 | 410.587 |
q4_0 | 128 | 808.36 (Δ110.86) | 0.080066 | 0.68597 | 0.004751 | 1.805469 | 3.538877 | 9.421975 | 18.574099 | 35.535553 | 75.323% +/- 0.112% | 867.61 | 433.472 |
q4_0 | 1024 | 1240.86 (Δ543.36) | 0.044082 | 0.529547 | 0.004138 | 1.307984 | 2.747738 | 8.109934 | 17.312519 | 36.541374 | 78.961% +/- 0.106% | 752.35 | 486.25 |
kvarn4 | 128* | 1008.98 | 0.058185 | 0.602912 | 0.004457 | 1.55143 | 3.138905 | 8.615164 | 17.856567 | 36.170742 | 77.281% +/- 0.109% | 785.4 | 469.964 |
kvarn4 | 1024 | 1250.86 (Δ241.88) | 0.037354 | 0.459012 | 0.003778 | 1.080839 | 2.363478 | 7.393579 | 16.498676 | 37.706348 | 80.315% +/- 0.104% | 724.91 | 501.383 |
q3_1 | 0 | 620.00 | 0.411032 | 1.498782 | 0.007078 | 4.317879 | 6.763145 | 13.245721 | 22.972654 | 42.413551 | 63.91% +/- 0.125% | 929.26 | 411.321 |
q3_1 | 128 | 730.86 (Δ110.86) | 0.238195 | 1.044233 | 0.005828 | 2.847552 | 5.008366 | 11.243305 | 20.877897 | 44.065434 | 69.846% +/- 0.12% | 860.69 | 435.77 |
q3_1 | 1024 | 1200.86 (Δ580.86) | 0.062901 | 0.632607 | 0.004466 | 1.673504 | 3.295895 | 8.648371 | 17.779415 | 35.903477 | 76.455% +/- 0.11% | 751.5 | 487.325 |
q3_0 | 0 | 542.50 | 0.504075 | 1.623258 | 0.007318 | 4.627861 | 7.143236 | 13.667959 | 23.15744 | 40.138046 | 61.353% +/- 0.127% | 929.29 | 411.375 |
q3_0 | 128 | 653.36 (Δ110.86) | 0.266479 | 1.226356 | 0.006373 | 3.532668 | 5.918259 | 12.181767 | 21.289965 | 40.931717 | 66.241% +/- 0.123% | 861.22 | 435.892 |
q3_0 | 1024 | 1160.86 (Δ618.36) | 0.10468 | 0.813621 | 0.005224 | 2.244999 | 4.205494 | 10.247611 | 19.8862 | 35.229645 | 73.013% +/- 0.116% | 752.03 | 486.351 |
kvarn3 | 128* | 853.98 | 0.250445 | 1.050518 | 0.005675 | 2.890264 | 4.907852 | 11.204556 | 20.025103 | 37.644432 | 67.647% +/- 0.122% | 793.64 | 466.326 |
kvarn3 | 1024 | 1170.86 (Δ316.88) | 0.043896 | 0.537944 | 0.004196 | 1.344904 | 2.834105 | 8.202885 | 17.908707 | 35.759712 | 78.86% +/- 0.106% | 725.03 | 502.173 |
q2_1 | 0 | 465.00 | 1.994402 | 3.893148 | 0.013096 | 10.672856 | 14.308146 | 22.368641 | 33.068935 | 51.265995 | 44.632% +/- 0.129% | 929.5 | 412.603 |
q2_1 | 128 | 575.86 (Δ110.86) | 0.985623 | 3.402086 | 0.013552 | 10.669716 | 14.492702 | 23.043888 | 34.696259 | 51.925564 | 52.817% +/- 0.13% | 862.41 | 434.906 |
q2_1 | 1024 | 1120.86 (Δ655.86) | 0.367938 | 2.407332 | 0.011102 | 7.973629 | 11.529114 | 19.5315 | 30.591965 | 44.873363 | 60.195% +/- 0.127% | 744.03 | 491.99 |
q2_0 | 0 | 387.50 | 2.95758 | 4.16791 | 0.011264 | 9.854963 | 13.008256 | 19.665325 | 27.834961 | 40.672546 | 31.667% +/- 0.121% | 931.44 | 411.283 |
q2_0 | 128 | 498.36 (Δ110.86) | 1.329847 | 2.592323 | 0.009197 | 6.949316 | 9.831617 | 16.547577 | 25.065128 | 39.417271 | 48.565% +/- 0.13% | 863.07 | 435.219 |
q2_0 | 1024 | 1080.86 (Δ693.36) | 0.382933 | 1.410219 | 0.006738 | 4.007506 | 6.430677 | 12.819506 | 21.792351 | 38.700363 | 61.698% +/- 0.127% | 742.25 | 492.926 |
kvarn2 | 128* | 698.98 | 2.091697 | 3.06769 | 0.008941 | 7.221704 | 9.813798 | 16.245176 | 23.645214 | 39.493034 | 40.932% +/- 0.128% | 803.3 | 461.73 |
kvarn2 | 1024 | 1090.86 (Δ391.88) | 0.194587 | 1.020443 | 0.005831 | 2.821557 | 4.97137 | 11.57934 | 20.181767 | 37.064072 | 68.488% +/- 0.121% | 725.59 | 501.628 |
* KVarN requested tail 0 resolves to an effective 128-token F16 suffix and is displayed as 128*. tail 1024 covers Gemma's visible sliding window; tail 2048 is outside this quality matrix.
| Model | Cache | Tail | 1024 | 4096 | 16384 | 32768 | 65536 |
|---|---|---|---|---|---|---|---|
| Gemma | bf16 | 0 | 28.38 | 27.23 | 23.76 | — | — |
| Gemma | kvarn4 | 128* | 21.38 | 20.75 | 20.13 | — | — |
| Gemma | kvarn4 | 1024 | 28.58 | 28.00 | 26.36 | — | — |
| Gemma | q4_0 | 0 | 30.93 | 30.16 | 26.90 | — | — |
| Gemma | q4_0 | 1024 | 26.64 | 26.25 | 24.03 | — | — |
| Qwen | bf16 | 0 | 36.15 | 34.88 | 30.95 | 26.93 | 21.50 |
| Qwen | kvarn4 | 128* | 32.81 | 32.09 | 30.42 | 28.52 | 25.30 |
| Qwen | kvarn4 | 1024 | 32.18 | 31.70 | 30.06 | 28.14 | 25.00 |
| Qwen | q4_0 | 0 | 36.40 | 35.49 | 32.63 | 29.46 | 24.63 |
| Qwen | q4_0 | 1024 | 34.38 | 34.01 | 31.51 | 28.57 | 24.10 |