Persistent Prefix Caching & Lossless bf16p KV Cache in Infernix
How Infernix achieves 84–91% prompt cache hit rates across restarts and packs bit-exact BF16 KV caches into 12 bits per value for 1.31x longer context.
Why Standard KV Prefix Caches Break on Qwen Linear-Attention Layers
Modern Qwen architectures mix standard attention with linear-attention (recurrent) layers. Naive inference engines that only cache standard K/V tensors cannot resume mid-prompt cleanly on linear-attention layers, forcing expensive full-prompt re-prefills whenever an agent appends a single tool output.
Infernix solves this by storing 64-token KV blocks paired with recurrent-state snapshots across three tiers: GPU VRAM (fastest), pinned system RAM, and NVMe disk (--prefix-cache-file). In agentic coding replays, this tiered architecture served 84–91% of all prompt tokens from cache—bringing mean TTFT down to 1.7–2.6 seconds.
What Is bf16p and When Should I Prefer It Over Rotated INT8?
Rotated INT8 (--kv-dtype int8) is the recommended everyday setting because it halves KV memory with minimal quality impact. However, if you are running sensitive code-review or math benchmarks where you want zero quantization drift from reference BF16, pass --kv-dtype bf16p.
bf16p losslessly packs BF16 values into roughly 12 bits per value. You get bit-for-bit identical output to uncompressed BF16 while fitting 1.31x as many tokens inside the exact same RTX 5090 VRAM budget.
# Persist prefix cache to NVMe across restarts + lossless bf16p KV cache:
infernix-serve.exe Qwen3.8-27B-NVIDIA-NVFP4-QAD-Infernix-Exact.infernix ^
--kv-dtype bf16p --max-context auto ^
--prefix-cache-file D:\infernix-cache\qwen27b.pcache ^
--spec dflash2 --draft-tokens auto