DEV Community

kkkevin
kkkevin

Posted on Originally published at opshubs.space

vLLM GPU VRAM Sizing Guide: Weights, KV Cache & Tensor Parallelism (7B to 72B)

A 70B model in 4-bit quantization only takes ~38 GB on disk—yet deploying it on a single 48 GB L40S often crashes with CUDA out of memory as soon as concurrent users connect. Why? Because KV cache and CUDA runtime buffers consume far more VRAM than most sizing guides mention.

The Three Components of vLLM VRAM

  • Model Weights: Roughly Parameters (B) × Bytes per Parameter (2.0 B for FP16/BF16, 1.0 B for FP8/INT8, ~0.55 B for 4-bit AWQ/GPTQ).

  • KV Cache (PagedAttention): Scales linearly with concurrent_requests × context_length. Serving 16 concurrent 32K-context requests on a 70B model can require 40+ GiB of KV cache alone.

  • Activation & CUDA Graph Overhead: Reserve 10%–15% headroom using --gpu-memory-utilization 0.90.

Quick GPU Reference (8K Context, 8 Concurrent Requests)

  • Llama-3.1-8B (FP8): ~11 GiB total → runs smoothly on 1x RTX 4090 / L4 (24 GB).

  • Qwen2.5-32B (FP8): ~38 GiB total → fits cleanly on 1x L40S / A6000 (48 GB).

  • Llama-3.3-70B (FP8): ~80+ GiB total → requires 2x A100 80GB (--tensor-parallel-size 2) for comfortable concurrency, or 4-bit AWQ on a single 80 GB GPU.

Sample Production vllm serve Command

vllm serve Qwen/Qwen2.5-32B-Instruct-FP8 
  --tensor-parallel-size 1 
  --max-model-len 16384 
  --gpu-memory-utilization 0.90 
  --quantization fp8
Enter fullscreen mode Exit fullscreen mode

Calculate Your Exact GPU & Flags

Stop guessing GPU instance sizes: use our free vLLM & Local LLM GPU VRAM Calculator to estimate weights, KV cache, and get a ready-to-paste vllm serve command.

Want to compare self-hosting against cloud APIs? Run your numbers in our LLM API Cost Calculator.

Originally published at OpsHubs. Found it useful? Buy us a coffee ☕.

Top comments (1)

Collapse
 
userxnom profile image
Abdullah Naseer •

The line that reframes the whole guide is the 70B one: ~38 GB on disk in 4-bit, yet it still OOMs on a single 48 GB L40S the moment concurrent users connect — because the KV cache, not the weights, is what eats the card. Your 16-concurrent-32K-context example needing 40+ GiB of KV cache alone makes the point concrete: most people size for weights and then discover the cache.

The quick reference table is the part I would bookmark: Llama-3.1-8B FP8 at ~11 GiB on a single RTX 4090, Qwen2.5-32B FP8 at ~38 GiB on an L40S, and Llama-3.3-70B FP8 at 80+ GiB needing 2x A100 80GB. My question: at what concurrency does the 10-15% headroom rule start to break down for you — do you raise --gpu-memory-utilization past 0.90 when the KV cache dominates, or does that just trade OOMs for evictions?