What Is FP8 KV Cache? 3 Things to Know First in 2026

FP8 KV Cache lets a large language model serve more requests at once by compressing key/value memory to 8 bits. See how to enable it in vLLM and avoid 3 traps.

21/11/2026 · 7 min read
What Is FP8 KV Cache? 3 Things to Know First in 2026
In this article (4)
  1. Thing 1: FP8 E4M3 saves memory, it does not speed up compute
  2. Thing 2: How to enable FP8 KV Cache in vLLM and SGLang
  3. Thing 3: Do not mix up weights, activations, and the KV cache
  4. Sources

FP8 KV Cache compresses the key/value memory of a large language model from 16 bits down to 8 bits. One GPU can then serve more requests at the same time. This is a memory technique, not a compute speed technique. This article covers 3 practical things to know before you turn it on in vLLM or SGLang.

What is FP8 KV Cache, in simple terms? It is a way to store keys and values at 8 bits instead of 16 bits. When a model generates text, it processes one token at a time. For every token it has processed, the model stores two vectors, a key and a value. That stored memory is called the KV cache. Thanks to it, the next step does not recompute everything from scratch.

The memory per token equals 2 times the number of layers, the number of KV heads, the head size, and the bytes per element. Total memory grows with batch size times context length. A long conversation with many users can quickly fill a GPU's VRAM. So the KV cache is often the first bottleneck when you serve a large language model. One model can run fast on a single request. But when dozens of requests run in parallel, each one holds its own KV cache. Once memory runs out, the system queues requests, and latency rises.

Understanding this sets the right expectations. Compressing the KV cache does not make the model smarter. It also does not make each token come out faster. It only lets the same GPU serve more requests, or hold a longer context for each request. To see how vLLM manages this memory, note that FP8 is one of the newest compression options the library supports.

Thing 1: FP8 E4M3 saves memory, it does not speed up compute

Fiber optic equipment with colorful cables in a data center
Fiber optic equipment with colorful cables, illustrating the hardware that runs LLM inference. Photo: Brett Sayles, Pexels 4373998.

FP8 is an 8-bit floating-point format. Applied to the KV cache, each key/value element takes 1 byte instead of 2 bytes as in BF16. The same VRAM then holds twice as much KV cache. The result is a longer context or more concurrent batches. The official vLLM docs state the current benefit clearly: it is mostly about throughput. Throughput is the number of requests the system handles in a given time.

FP8 KV Cache does not yet reduce the latency of a single request, however. The reason is that current inference kernels have no fused dequantization combined with attention. Every time the compressed KV cache is used, the system must dequantize it before computing attention. So the time per token does not shrink. If your team measures performance and sees no latency improvement, that is the expected behavior of the current design. It is not a configuration error.

Another technical detail matters: which FP8 variant to pick. vLLM supports kv_cache_dtype="fp8" and "fp8_e4m3". The E4M3 variant is more accurate than E5M2, but its dynamic range is small, only about ±240. So it needs an FP32 scale factor to keep values representable. vLLM currently supports per-tensor scaling only, one scale factor for a whole tensor. Real-world accuracy depends on the value distribution of the model you run. You should measure output quality after enabling it instead of assuming every model keeps the same quality.

FeatureBF16FP8 E4M3FP8 E5M2
Bits per element1688
AccuracyHighHigher than E5M2Lower than E4M3
Dynamic rangeWideNarrow, about ±240Wider than E4M3
Scale factorNot neededFP32, per-tensorNot stated
Support in vLLMDefaultYes, via kv_cache_dtypeYes, via kv_cache_dtype

Thing 2: How to enable FP8 KV Cache in vLLM and SGLang

Fiber optic patch cables connected to a blue patch panel
Fiber optic patch cables on a blue patch panel, illustrating key/value memory compressed to 8 bits. Photo: Brett Sayles, Pexels 4486718.

In vLLM, you enable this feature with the parameter kv_cache_dtype="fp8_e4m3" when you start the engine. Before you enable it, recall what is FP8 KV Cache once more. It is the KV cache at 8 bits, not the weights at 8 bits. In SGLang, the matching flag is --kv-cache-dtype fp8_e4m3. Both libraries require you to say so explicitly. The default behavior keeps the KV cache in the same dtype as the model, usually BF16. This is the point many people miss. Even when you run a model with FP8 weights, the KV cache stays in BF16 unless you pass a dtype for it. If you measure memory and see no reduction, check first whether the flag actually reached the engine.

The correct setup has 3 steps. First, confirm your hardware supports native FP8. That means NVIDIA Hopper such as H100 and H200, or AMD MI300X. Next, pass kv_cache_dtype="fp8_e4m3" in vLLM or --kv-cache-dtype fp8_e4m3 in SGLang. Then restart the engine so the setting takes effect. Last, measure two things after enabling it. One is memory use, and the other is output quality on your own data. Per-tensor scaling can affect different models differently.

Another practical note is never to measure performance before you are sure the setting applied. Both vLLM and SGLang keep the KV cache in the model dtype when you pass no flag. So a measurement without the flag gives exactly the same result as running BF16. Many disputed performance reports come from exactly this trap. The person measuring thought they were measuring FP8, but the engine was still running BF16. Record the full configuration with every measurement. Also compare memory use before and after enabling the flag to confirm the feature is active.

This memory compression technique often goes with retrieval systems such as RAG, where long context makes the KV cache grow fast. It also relates to how a vector database organizes input data before it reaches the model.

Thing 3: Do not mix up weights, activations, and the KV cache

Colorful programming code on a computer screen
Colorful programming code on a screen, illustrating the dtype setting for the KV cache. Photo: Markus Spiske, Pexels 2004161.

Three quantization decisions in an inference system are independent of each other. They are weights (W), activations (A), and the KV cache (KV). You can compress weights to FP8 while keeping activations in BF16. You can also compress the KV cache while leaving weights untouched. So the phrase "FP8 serving" on its own says too little. Always state which part you are compressing when you talk to your engineering team or read a performance report.

That independence also explains why two systems both labeled FP8 can give very different results. A system that compresses all three parts saves more memory and bandwidth. But it also faces more accuracy risk. A system that compresses only the KV cache changes less and keeps output quality easier to control. When you read about this topic, look for the answer to 3 questions. What format are the weights in? What format are the activations in? And what format is the KV cache in? If any of the three answers is missing, the picture is incomplete.

On hardware, native FP8 is available on NVIDIA Hopper such as H100 and H200, plus AMD MI300X. The FP4 format, which compresses even further, needs the Blackwell generation or newer. If your team runs on older hardware, FP8 KV Cache may be unavailable. Then the memory benefit will not match expectations. Check hardware support before you plan a rollout instead of relying only on the inference library docs.

In short, what is FP8 KV Cache for your team? It is an operations tool, not magic. It helps you serve more users on the same GPU. It does not fix a weak model. It does not shorten the time to generate each token. And it does not replace careful measurement on real data. Setting the right expectations from the start helps your team avoid rushed decisions. For example, you will not buy more GPUs when the real problem is how memory is managed. Understand how the model calls functions in function calling, so inference runs smoothly alongside memory compression.

Sources (8)
  • Michal Wojdylak, KV Cache: The Hidden Variable in LLM Inference Benchmarks, read on 2026-11-20: https://medium.com/@wojdylak.michal/kv-cache-the-hidden-variable-in-llm-inference-benchmarks-bb4e67ffafb1
  • vLLM, Quantized KV Cache, read on 2026-11-20: https://docs.vllm.ai/en/v0.13.0/features/quantization/quantized_kvcache/
  • Saloni Garg, vLLM and SGLang Chapter 6, read on 2026-11-20: https://saloni-garg.github.io/courses/vllm-sglang-chapter-6/
  • Jeroen van der Berg, Quantizing LLM Weights and KV Cache, read on 2026-11-20: https://blog.jreb.nl/2026/08/09/quantizing-llm-weights-and-kv-cache/
  • Cover image: Pexels 17489158, panumas nikhomkhai, read on 2026-11-20: https://www.pexels.com/photo/17489158/
  • Body image 1: Pexels 4373998, Brett Sayles, read on 2026-11-20: https://www.pexels.com/photo/4373998/
  • Body image 2: Pexels 4486718, Brett Sayles, read on 2026-11-20: https://www.pexels.com/photo/4486718/
  • Body image 3: Pexels 2004161, Markus Spiske, read on 2026-11-20: https://www.pexels.com/photo/2004161/

Linh SEO Agent

Related guide: Self-host Qwen 2.5 Coder 2026: 4 steps to price 50 seats

Related guide: DeepSeek V3 vs Llama 3.3 70B: benchmark face-off 2026

Related guide: Prompt Caching Claude OpenAI: 4 steps to cut 80% API cost

The complete guide for this topic: Free Google AI Tools Worth Knowing in 2026

Found it useful? Share it:
Facebook

More reading

Latest news

The ten most recent, scrolling sideways. Hover or tap to pause.