vLLMOut of memory
CUDA out of memory. Tried to allocate (vLLM)
The message
CUDA out of memory. Tried to allocate <n> GiB. GPU 0 has a total capacity of <n> GiB of which <n> MiB is free.
Parts in <angle brackets> change from run to run.
What it means
PyTorch, which vLLM runs on, could not allocate the next tensor. In vLLM it usually means the model plus its KV cache does not fit at your settings.
Why it happens
- The weights at this format do not fit, or leave too little for vLLM's KV cache and CUDA graphs.
--max-model-lenis long, so the minimum cache vLLM needs is large.- Another process holds part of the card.
How to fix it
- Shorten
--max-model-lenfirst; raise--gpu-memory-utilizationonly after that, and not past what the card can actually give. - Use a 4-bit AWQ or GPTQ build of the model; check it in the calculator against your card.
--enforce-eagerskips CUDA graph capture, which frees some memory at a cost in speed.
Check the size before changing flags
Most memory errors are a size problem. Put the model, quant level, context and your card into the VRAM calculator: if it is red there, no flag will make it fit.
Guides that cover this
Related errors
Checked against
Message text read from source on 2026-10-26.