Skip to Content

vLLM GPU sizing and tuning

Size GPUs for weights + KV cache headroom. Undersized → OOM; oversized → idle depreciation.

Hub: vLLM.

VRAM by model size

ModelMin VRAM (FP16)Notes
7B–8B16 GBSingle-GPU entry
13B–14B24–32 GBAWQ/GPTQ helps
70B2×40 GB+ or 1×80 GBTensor parallelism
vllm serve meta-llama/Llama-3.1-8B-Instruct \ --quantization awq \ --dtype auto

Benchmark quantized vs FP16 on your eval set before cutting cloud traffic.

Throughput knobs

FlagEffect
--max-num-seqsConcurrency — raise until latency breaks SLO
--gpu-memory-utilizationVRAM fraction for KV (default 0.9)
--max-model-lenCap context — lowers KV memory
--enable-prefix-cachingPrefix KV reuse — guide

Prohibited: max-model-len at 128K for every request.

Observability

Prometheus at http://localhost:8000/metrics:

MetricUse
vllm:gpu_cache_usage_percKV pressure
vllm:num_requests_runningConcurrency vs SLO
vllm:time_to_first_token_secondsStreaming TTFT

Tag requests with inference.backend=vllm and feature for cost per outcome.

Last updated on