How much GPU memory do you need to serve an LLM? KV cache math for Qwen3.8-Flash-Next, Nemotron 3.5 Super VL, gpt-oss-120b, Gemma 4 and Qwen3.8-27B
GPU memory for serving = model weights + KV cache. Current open models keep a full KV cache on only some layers: 25 KB per token for Qwen3.8-Flash-Next, 8 KB for Nemotron 3.5 Super VL, 36 KB for gpt-oss-120b. Worked numbers from one H100 to 4x B200 for five models people serve on datacenter GPUs, checked 24 November and 1 December 2026.
Lium team9 min read
llm-inference
vllm
qwen
nemotron
gemma
gpt-oss
buyer-guide

Short answer: the memory you need to serve a model is its weights plus its KV cache. Weights take 2 bytes per parameter in BF16, 1 byte in FP8 and about half a byte in 4-bit formats such as MXFP4 and NVFP4. The KV cache grows with every token in flight, but current open models keep a full cache on only some of their layers. Qwen3.8-Flash-Next stores 25 KB per token, Nemotron 3.5 Super VL 8 KB and gpt-oss-120b 36 KB. So the weights decide how many GPUs you need, and the cache decides how many long requests each node serves at once: Qwen3.8-Flash-Next in FP8 on 4x H100 holds about 115 full 32K-token requests.
Pick the smallest node that holds the weights and the KV cache for your context length and concurrency. The tables below do that math for five models.
How we picked them. Each model is the vendor's latest open-weight release in its line that needs datacenter-class memory (H100, H200, B200) to serve on one node of up to 8 GPUs: Qwen3.8-Flash-Next (Qwen's largest MoE that fits that node) and Qwen3.8-27B (its latest dense model), NVIDIA's Nemotron 3.5 Super VL 120B-A12B (released 15 October 2026), OpenAI's gpt-oss-120b and Google's Gemma 4 31B. Qwen3.8-2.4T-A95B is left out: its FP8 checkpoint is 2,496.1 GB, more than the 1,440 GB of an 8x B200 node. Small models that fit a desktop card are left out on purpose. The model list and every layer shape were read from Hugging Face on 24 November 2026, and the Qwen3.8-Flash-Next and Nemotron 3.5 Super VL figures on 1 December 2026.
The formula
Serving memory = weights + KV cache + a little overhead.
- Weights: the size of the checkpoint you load. BF16 is 2 bytes per parameter, FP8 is 1 byte, 4-bit is about half a byte (Hugging Face quantization overview, read 24 November 2026).
- KV cache per token, full-attention layer: 2 (one key and one value) x KV heads x head size x bytes per value.
- Overhead: the CUDA context, activations and memory fragmentation. The tables below keep 10% of each GPU free for this. That is our rule of thumb, not a vendor figure.
Older models such as Llama 3 used the same full attention on every layer, so you multiplied by the layer count and were done. The models people serve in late 2026 mix layer types, and only some of them grow with the context:
- Full attention layers keep every token's keys and values. This is the part that grows with context.
- Sliding-window layers (Gemma 4, gpt-oss) keep only the last 128 or 1,024 tokens, so their share stops growing after that.
- Linear-attention layers (Qwen3.8, Gated DeltaNet) and Mamba-2 layers (Nemotron 3.5 Super VL) keep a fixed-size state per request, whatever its length.
- Sparse-attention layers (Qwen3.8-Flash-Next's Qwen Sparse Attention) read only a 2,048-token subset for each new token, but still keep every token's keys and values. They also keep one small indexer key per 4-token block, which is how they pick that subset.
Read the shapes from the model's
config.json on Hugging Face. layer_types (or Nemotron's layers_block_type, inside its llm_config) says which layer is which. For most models num_key_value_heads and head_dim give the full-layer shape, and sliding_window the window. Gemma 4 differs: num_key_value_heads (16) and head_dim (256) describe its sliding layers, and its full layers use num_global_key_value_heads (4) and global_head_dim (512). For the Qwen linear layers the state per layer is linear_num_value_heads x linear_key_head_dim x linear_value_head_dim values, plus a small convolution buffer. For Nemotron's Mamba-2 layers it is mamba_num_heads x mamba_head_dim x ssm_state_size values, kept in FP32 (4 bytes) because the config sets mamba_ssm_cache_dtype to float32. For Qwen3.8-Flash-Next's indexer it is indexer_kv_heads x indexer_head_dim values per indexer_compress_ratio tokens. Mixture-of-experts (MoE) models such as Qwen3.8-Flash-Next, Nemotron 3.5 Super VL and gpt-oss activate only a few experts per token, but all experts stay in memory, so count every parameter for the weights.KV cache per model
Shapes come from each model's
config.json on Hugging Face and weights from the size of its checkpoint files, read 24 November 2026 (Qwen3.8-Flash-Next and Nemotron 3.5 Super VL on 1 December 2026). The KV cache is in BF16 (2 bytes per value), the vLLM default. KB means 1,024 bytes and GB means 10^9 bytes.The request columns add up all the parts for one request of that length. Qwen3.8-Flash-Next's 25 KB is 24 KB of keys and values plus 0.75 KB of indexer keys. The Qwen, Gemma and Nemotron checkpoints include their vision encoders, and Qwen3.8-Flash-Next's also includes its n-gram embedding and its one-layer multi-token prediction head. NVIDIA publishes Nemotron 3.5 Super VL in BF16 and NVFP4 only, with no FP8 checkpoint. gpt-oss sets a 131,072-token context, Nemotron 3.5 Super VL 1,048,576 and the others 262,144.
Three things stand out:
- The biggest model does not have the biggest cache. Qwen3.8-Flash-Next has 180 billion parameters, but only 12 of its 48 layers keep a full cache, with 2 KV heads each. A 32K request costs it 0.89 GB, less than half of the 2.2 GB that the 27-billion-parameter Qwen3.8-27B needs.
- Fixed state is cheap at long context. Nemotron 3.5 Super VL's 40 Mamba-2 layers hold the same 170 MB whether the request has 100 tokens or 100,000, and only 8 layers grow. A 128K request costs 1.2 GB, the least of the five.
- Sliding layers are cheap only after the window. Gemma 4's 50 sliding layers cost 800 KB per token, ten times its full layers. Because they keep only 1,024 tokens, they stop at about 0.84 GB per request, and a 128K request is mostly the 80 KB-per-token full layers.
Which GPUs fit, and how many requests at once
This table divides the free memory of the node by the memory of one full-length request. Free memory is 90% of the node's GPU memory minus the weights. Multi-GPU rows assume the weights and cache are split evenly with tensor parallelism. GPU sizes are from Lium's price feed, read 24 November 2026 at 21:21 UTC.
Two pairs that do not fit. Nemotron 3.5 Super VL in NVFP4 is 75.0 GB, more than 90% of one 80 GB H100, so use two H100s or a larger card. NVIDIA's model card lists one H200, two H100s and one RTX PRO 6000 as deployments (read 1 December 2026). Qwen3.8-Flash-Next in FP8 is 185.5 GB, more than one 180 GB B200 holds, so it needs two GPUs.
These are full-length requests. Most real requests are shorter, and vLLM allocates the KV cache in small blocks as tokens arrive (PagedAttention), so a node usually serves more requests than the table shows.
Check it on your own pod
vLLM prints the KV cache it reserved when the server starts, as a number of tokens and the maximum concurrency at your
--max-model-len. Multiply the token count by the full KV per token above and compare with what the card has left after the weights. For hybrid models vLLM also reserves the fixed per-request state, so its token count is a little lower than the full-layer math alone. The vLLM guide shows where that line appears.Four ways to fit more on the same card
- Cap the context.
--max-model-len 32768in vLLM stops one long request from reserving a huge KV cache. Most chat and RAG traffic stays well under 32K tokens. - Quantize the KV cache.
--kv-cache-dtype fp8stores keys and values in 1 byte instead of 2, which halves the full and sliding layers (vLLM quantized KV cache, read 24 November 2026). Check output quality on your own prompts before you rely on it. - Use the quantized checkpoint. Qwen publishes FP8 checkpoints of Qwen3.8-Flash-Next and Qwen3.8-27B, NVIDIA an NVFP4 Nemotron 3.5 Super VL, and gpt-oss ships in MXFP4. Halving the weights can halve the GPUs you rent, and the memory left over goes to the KV cache.
- Split across GPUs.
--tensor-parallel-size 4spreads both the weights and the KV cache over four GPUs, which is how Qwen3.8-Flash-Next fits in BF16. Tensor parallelism needs NVLink between the GPUs to run at full speed, so check the node's wiring in the first minutes of a rental (Before you rent 8 GPUs).
How to pick a card on Lium
- Find your model's row in the first table and add the weights to the memory of one request times the number of requests you serve at once.
- Add 10% for overhead and pick the smallest node that holds the total.
- Rent it by GPU model from the CLI, for example
lium up --gpu H200. Then start vLLM with the--max-model-lenyou planned for. The vLLM guide walks through each command.
Every GPU in the tables has its own page with live prices and availability: L40S, H100, RTX PRO 6000, H200 and B200. Stats shows how many of each are listed and rented right now. For a buyer's view of which GPU cloud to serve from, see the best GPU cloud for LLM inference.
Run it on Lium
Billed per second, no minimum rental.
Get new posts by e-mail: Subscribe to the Lium newsletter


