Most vLLM tutorials still tell you that --gpu-memory-utilization defaults to 0.9, that --swap-space buys you headroom and that guided_json constrains output. v0.32.0 raised that default to 0.92, v0.34.0 now sets it to 1.0 and sizes the KV cache from memory that is actually free, --swap-space no longer exists, and a request carrying guided_json comes back with HTTP 200 and unconstrained text. This vLLM cheat sheet follows what vllm serve accepts today, and it explains why each flag changes what you can fit on a GPU.
You get the serve flags people search for (--tensor-parallel-size, --max-model-len, --gpu-memory-utilization, --quantization), OpenAI-compatible API calls with curl and Python, the Docker run line, multi-GPU layouts and the OOM and CUDA errors with their fixes. Every flag, default and error string below was checked in November 2026 against the vLLM v0.32.0 source, the last release that still ships CUDA 12.9 images, and against the v0.34.0 release notes, and where v0.34.0 changed a default the section says so.
vLLM cheat sheet: quick reference
We grouped the whole cheat sheet into the tables below by what you are trying to do. The examples use Qwen/Qwen3-0.6B because it is not gated and loads on almost any NVIDIA card, so swap in your own model ID once the command works. Every flag also has a long form you can put in a YAML file passed with --config, which keeps long serve lines out of your shell history.
Install and inspect
| Command | What it does |
|---|---|
uv pip install vllm --torch-backend=auto | Install vLLM with the PyTorch build that matches your driver |
vllm download-kernels | Fetch precompiled FlashInfer kernels (rerun after every upgrade) |
vllm --version | Print the installed vLLM version |
vllm collect-env | Dump GPU, driver, CUDA and PyTorch details for a bug report |
vllm serve --help=max-model-len | Show help for one flag only |
hf download Qwen/Qwen3-0.6B | Download weights into the Hugging Face cache before the first serve |
Start a server
| Command | What it does |
|---|---|
vllm serve Qwen/Qwen3-0.6B | Serve a model on port 8000 |
--host 127.0.0.1 --port 8001 | Bind address and port |
--api-key $VLLM_API_KEY | Require a Bearer token on /v1 routes |
--served-model-name qwen | Name clients send in the model field |
--generation-config vllm | Ignore the model’s own sampling defaults |
--config serve.yaml | Load flags from a YAML file |
--allowed-origins '["https://chat.example.com"]' | Allow a browser origin (CORS is closed by default) |
Memory, context and batching
| Command | What it does |
|---|---|
--gpu-memory-utilization 0.85 | Fraction of VRAM this instance may claim (default 0.92 up to v0.33, 1.0 from v0.34.0) |
--kv-cache-memory-bytes 8G | Fixed KV cache size per GPU, overrides the fraction |
--max-model-len 16K | Context cap in tokens (16K = 16384, 16k = 16000) |
--max-model-len auto | Largest context that fits in memory |
--max-num-seqs 64 | Concurrent sequences per step |
--max-num-batched-tokens 4096 | Tokens processed per scheduler step |
--kv-cache-dtype fp8 | Store the KV cache in FP8 to roughly halve it |
--enforce-eager | Skip CUDA graphs and torch.compile, saves memory |
--cpu-offload-gb 8 | Keep part of the weights in system RAM |
Multi-GPU and quantization
| Command | What it does |
|---|---|
-tp 2 | Tensor parallel: split every layer across 2 GPUs |
-pp 2 | Pipeline parallel: split the layers into 2 stages |
-dp 2 | Data parallel: 2 full replicas behind one endpoint |
CUDA_VISIBLE_DEVICES=2,3 vllm serve ... | Pin the server to specific GPUs |
-q fp8 | Quantize BF16 weights to FP8 at load time |
-q awq --dtype half | Force AWQ kernels on a pre-quantized model |
--dtype half | FP16 for GPUs without BF16 (compute capability under 8.0) |
Call the API and test it
| Command | What it does |
|---|---|
curl localhost:8000/health | Liveness check, HTTP 200 when the engine is up |
curl localhost:8000/v1/models | List served model names |
curl localhost:8000/version | Server version |
curl localhost:8000/metrics | Prometheus metrics (KV cache usage, queue) |
vllm chat --url http://localhost:8000/v1 | Interactive chat against a running server |
vllm complete --url http://localhost:8000/v1 | Plain completion prompt |
vllm bench serve --model Qwen/Qwen3-0.6B | Load test a running server (random 1024 in, 128 out) |
vllm run-batch -i in.jsonl -o out.jsonl --model Qwen/Qwen3-0.6B | Offline batch in OpenAI batch format |
Docker and environment
| Command | What it does |
|---|---|
--gpus all --ipc=host | GPU access plus shared memory for PyTorch workers |
-v ~/.cache/huggingface:/root/.cache/huggingface | Reuse downloaded weights across containers |
-v vllm-cache:/root/.cache/vllm | Keep the torch.compile cache between restarts |
--env HF_TOKEN | Pass your token for gated models |
-e VLLM_ENABLE_CUDA_COMPATIBILITY=1 | Run CUDA 13 images on older datacenter drivers |
VLLM_LOGGING_LEVEL=DEBUG | Verbose engine logs |
NCCL_DEBUG=TRACE | Trace multi-GPU communication failures |
We explain the rows that cause most of the trouble in the rest of the page. Memory flags interact with each other, so read the next two sections before you start tuning numbers at random.
What installing vLLM actually needs
vLLM installs on Linux only, needs Python 3.11 to 3.14 (v0.32.0 dropped 3.10), and needs an NVIDIA GPU with compute capability 7.5 or higher, which means Turing (RTX 20 series, T4) and newer. The docs recommend uv because --torch-backend=auto picks the PyTorch wheel that matches the CUDA driver on the box, which removes the most common install failure: a PyTorch build that expects a newer driver than you have. If you still need a card for this, our GPU buying guide for LLMs ranks them by VRAM, since VRAM decides which models vLLM can hold.
Create a virtual environment and install into it:
uv venv --python 3.12 ~/vllm-env
source ~/vllm-env/bin/activate
uv pip install vllm --torch-backend=auto
vllm download-kernels
Do not skip the last line. vllm download-kernels pulls FlashInfer’s precompiled kernels, and the docs say to rerun it after every install or upgrade. A stale kernel set is one of the quieter ways an upgrade breaks. For a hardened setup with a systemd unit and a dedicated user, follow our production vLLM install on Linux, which this cheat sheet does not repeat.
Start the smallest useful server and send it a first request to confirm the install:
vllm serve Qwen/Qwen3-0.6B --max-model-len 8K
The server listens on port 8000 once the log shows the API routes, and curl localhost:8000/v1/models from a second terminal should list Qwen/Qwen3-0.6B. If the server exits before that point, the cause is almost always memory, which is the subject of the next section.
How vllm serve decides how much GPU memory to take
vLLM grabs a fixed share of VRAM at startup and keeps it, which is why nvidia-smi shows the process using about 92% of the card before a single request arrives. The share comes from --gpu-memory-utilization, a per-instance fraction that defaults to 0.92 in v0.32.0 and v0.33.0 (vllm/config/cache.py), not the 0.9 that older guides quote. On those releases the mechanism runs in order:
- Budget: total VRAM times the fraction becomes this instance’s budget, so 0.92 of a 24 GB card is about 22 GB.
- Weights: the model loads first and takes its share of that budget.
- Profiling: a dummy forward pass measures activation memory and CUDA graph overhead.
- KV cache: whatever is left becomes paged KV cache blocks, and that pool decides how many tokens across all requests can be in flight.
v0.34.0 changes the first step. The extensible KV cache is on by default there, gpu_memory_utilization defaults to 1.0 when you leave it unset, and the cache is sized from the memory that is actually free after warmup. The release notes say that in most cases the flag is now best removed from your configs. Keep setting it when the GPU is shared with another process, as in the two-model example below, or when the extensible cache is disabled. On v0.34.0 nvidia-smi therefore shows close to the whole card in use rather than 92%.
Two consequences follow on v0.32.0 and v0.33.0. If something else already holds VRAM (a desktop session, a second vLLM instance, an Ollama process), the budget check fails before the model even loads, because the fraction is measured against total memory, not free memory. And raising the fraction does not make the model faster. It only enlarges the KV cache pool, which helps when you serve many long requests at once. Running two models on one card is a matter of giving each a fraction that adds up to under 1.0:
vllm serve Qwen/Qwen3-0.6B --port 8000 --gpu-memory-utilization 0.40 --max-model-len 8K
A second instance then starts on another port with its own fraction. Put a second model on port 8001 with the same flag at 0.45, and the 15% left over covers the CUDA context each process creates, which the fraction does not account for on a shared card:
vllm serve Qwen/Qwen2.5-1.5B-Instruct --port 8001 --gpu-memory-utilization 0.45 --max-model-len 8K
When you want a predictable KV cache rather than a percentage, --kv-cache-memory-bytes sets the cache size per GPU directly, and vLLM ignores --gpu-memory-utilization while it’s set. That suits shared hosts where the percentage would drift each time another process grows. Check what is already on the card with nvidia-smi before choosing either number.
What –max-model-len and –max-num-seqs trade against each other
--max-model-len caps prompt plus output tokens for one request, and vLLM refuses to start if a single request at that length cannot fit in the KV cache pool. Leave it unset and vLLM uses the model’s own maximum from its config. For a model advertising 128K tokens, the cache must then hold 128K tokens for one sequence, which is the most common reason a 7B or 8B model fails to start on a 24 GB card. Setting auto (or -1) asks vLLM to pick the largest length that fits instead of failing.
The value parser has a quirk worth knowing: lowercase suffixes are decimal and uppercase are binary, so 16k is 16,000 tokens while 16K is 16,384. Both are accepted, and the difference only shows up when you compare the number to a model card that lists powers of two:
vllm serve Qwen/Qwen2.5-7B-Instruct-AWQ --max-model-len 16K --max-num-seqs 32
--max-num-seqs is the other side of the same pool. It limits how many sequences the scheduler runs per step, and each one reserves cache blocks as it grows. In v0.32.0 the server default depends on the card: GPUs under 70 GiB, plus any A100, get 256 sequences and 2,048 batched tokens per step, H100 and H200 class cards get 1,024 and 8,192, and 160 GiB parts such as B200 get 1,024 and 16,384 (vllm/engine/arg_utils.py). On a single 24 GB card serving a handful of users, 256 concurrent sequences is far more than you need, and lowering it trims the memory vLLM sets aside for CUDA graphs and batch buffers.
Prefix caching is already on by default, so repeated system prompts reuse cached blocks without a flag. One behavior changed in v0.32.0 that affects long prompts: max_tokens is no longer reserved from the context window, so a request with a long prompt and a large max_tokens is admitted and stops when it hits --max-model-len, instead of being rejected up front.
How the OpenAI-compatible API maps to vLLM
vllm serve exposes the OpenAI routes your client libraries already speak, so the only things that change in client code are the base URL and the model name. The v0.32.0 server registers these routes, among others:
- /v1/chat/completions and /v1/completions: the two endpoints most clients use, with streaming.
- /v1/responses and /v1/messages: the OpenAI Responses API and an Anthropic Messages endpoint.
- /v1/embeddings, /score, /rerank, /pooling: answer only when the served model is an embedding or scoring model.
- /health, /version, /metrics, /tokenize, /detokenize: operations routes;
--api-keydoesn’t protect them, because it only covers the /v1, /v2, /inference and /cohere paths. The same goes for /score, /rerank, /pooling, /classify and /invocations.
Open operations routes catch people who put vLLM on a public interface and assume the key locks everything. /metrics stays readable, so bind to 127.0.0.1 or put a reverse proxy in front when the port is reachable from outside. A chat request with curl looks like this:
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "Qwen/Qwen3-0.6B", "messages": [{"role": "user", "content": "Name three Linux init systems."}], "max_tokens": 200, "temperature": 0.7}'
vLLM also accepts sampling parameters OpenAI doesn’t have, such as top_k, min_p, repetition_penalty, min_tokens and chat_template_kwargs. The official Python client passes them through extra_body, and the same field carries structured output constraints. Save this as client.py:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
resp = client.chat.completions.create(
model="Qwen/Qwen3-0.6B",
messages=[{"role": "user", "content": "Is this review positive or negative? The fan is loud."}],
extra_body={
"top_k": 20,
"structured_outputs": {"choice": ["positive", "negative"]},
"chat_template_kwargs": {"enable_thinking": False},
},
)
print(resp.choices[0].message.content)
Use structured_outputs with choice, json, regex or grammar inside it. The old top-level guided_json, guided_regex, guided_choice and guided_grammar fields were removed, and the v0.32.0 server still answers such a request with HTTP 200 and unconstrained text, logging only a warning. A client that was written against an older release therefore keeps working while silently losing its constraint, which is worth a grep through your code before you upgrade.
Tool calling needs two flags together, and reasoning models need a third so the thinking text lands in its own field. For Qwen3 the parsers are hermes and qwen3:
vllm serve Qwen/Qwen3-0.6B --enable-auto-tool-choice --tool-call-parser hermes --reasoning-parser qwen3
Each model family has its own parser name, listed in the vLLM tool calling docs. If you’re coming from Ollama, the Ollama commands cheat sheet covers the equivalent API calls there, and the two servers can share one client because both speak /v1/chat/completions.
How to run vLLM in Docker without shared memory errors
The official image is vllm/vllm-openai, and its entrypoint is the API server, so everything after the image name is a vllm serve argument. You need the NVIDIA Container Toolkit on the host (our CUDA and Container Toolkit guide covers Fedora). The command from the vLLM Docker docs, with the model passed through --model:
docker run --runtime nvidia --gpus all \
-v ~/.cache/huggingface:/root/.cache/huggingface \
-v vllm-cache:/root/.cache/vllm \
--env "HF_TOKEN=$HF_TOKEN" \
-p 8000:8000 --ipc=host \
vllm/vllm-openai:v0.34.0 \
--model Qwen/Qwen3-0.6B --max-model-len 8K
Each mount and flag has a job. --ipc=host exists because PyTorch worker processes exchange tensors through shared memory, and Docker’s default 64 MB /dev/shm is far too small once tensor parallel starts. Use --shm-size=16g instead when host IPC is not allowed. The Hugging Face mount stops every new container from downloading the weights again, and the vllm-cache volume keeps compiled graphs so restarts skip the torch.compile step.
Pin the tag rather than using latest, because the defaults above moved between releases (tags page). Driver version decides which tag you can use. The images are built on CUDA 13.0 and need an R580 or newer driver. A host on R570 or older either stays on the last CUDA 12.9 build or, on supported datacenter cards, sets -e VLLM_ENABLE_CUDA_COMPATIBILITY=1. Pull the 12.9 build explicitly:
docker pull vllm/vllm-openai:v0.32.0-cu129 # pin: CUDA 12.9 build for drivers older than R580 https://hub.docker.com/r/vllm/vllm-openai/tags
That tag is the end of the line for CUDA 12.9. v0.33.0 stopped publishing the CUDA 12.9 wheels and the -cu129 images, so v0.33.0-cu129 and v0.34.0-cu129 do not exist, and newer releases need the driver upgrade or the compatibility variable on supported datacenter cards.
How tensor, pipeline and data parallel split a model
vLLM offers three ways to use more than one GPU, and they solve different problems. Tensor and pipeline parallel exist because the model does not fit on one card, while data parallel exists because one copy cannot keep up with the traffic. Picking the wrong one either wastes memory or adds latency for no gain:
- Tensor parallel (
-tp): every layer is split across GPUs, which talk on every token, so it wants fast links (NVLink, or at least PCIe on one host). - Pipeline parallel (
-pp): layers are split into stages that hand activations forward, with less traffic, so it suits multiple nodes or slow interconnects. - Data parallel (
-dp): each GPU group holds a full copy and requests are spread across them, so it raises throughput but not the size of model you can load.
On one machine we would start with tensor parallel across all its GPUs. A 32B model in BF16 needs roughly 64 GB for weights alone, so it goes on two 48 GB cards or four 24 GB cards:
vllm serve Qwen/Qwen2.5-32B-Instruct --tensor-parallel-size 4 --max-model-len 16K
The tensor parallel size must divide the model’s attention head count, which is why 2, 4 and 8 work almost everywhere and 3 or 6 usually fail at startup. Mixing the modes multiplies: -tp 2 -dp 2 on four GPUs gives two replicas, each spread over two cards. To keep a server off a GPU that another job uses, set CUDA_VISIBLE_DEVICES before the command, as in CUDA_VISIBLE_DEVICES=0,1 vllm serve ..., and vLLM numbers the visible cards from zero. Two used RTX 3090s are the cheapest way into this, and our dual RTX 3090 build shows the parts and 70B numbers. Current street prices sit on the GPU prices page.
Which –quantization value matches your GPU
Most of the time you don’t pass --quantization at all. A pre-quantized checkpoint such as Qwen/Qwen2.5-7B-Instruct-AWQ carries a quantization_config, and vLLM reads the method from it and picks the fastest kernel the card supports (Marlin on Ampere and newer). The flag matters in two cases: forcing a specific kernel, and -q fp8, which quantizes an ordinary BF16 checkpoint to FP8 as it loads. Hardware decides what is available, per the vLLM supported-hardware table:
| Method | Minimum GPU generation | Notes |
|---|---|---|
| AWQ | Turing (7.5) | Use --dtype half; Marlin kernel on Ampere and newer |
| GPTQ | Volta (7.0) in the table, 7.5 for vLLM itself | Marlin kernel on Ampere and newer |
FP8 (-q fp8) | Turing (7.5) weight-only, Ada (8.9) or newer for full W8A8 | On Turing and Ampere it runs as W8A16 through Marlin, saving memory but not compute |
| INT8 W8A8 (compressed-tensors) | Turing (7.5) | Checkpoints from llm-compressor |
FP8 KV cache (--kv-cache-dtype fp8) | Depends on attention backend | Separate from weight quantization |
Read the FP8 row before buying hardware for it: an RTX 3090 or A100 loads FP8 weights but runs them as weight-only W8A16 through Marlin, so it saves memory without the FP8 compute speedup that an RTX 4090 or L40S gets. Two formats that older vLLM guides list are gone from the built-in method list in v0.32.0. bitsandbytes moved to an out-of-tree plugin in v0.28.0, and GGUF moved to the out-of-tree vllm-gguf-plugin that you install with uv pip install vllm-gguf-plugin. For GGUF files llama.cpp or Ollama is the better fit, and the llama.cpp cheat sheet covers its llama-server flags the same way this page covers vllm serve. Our Ollama vs vLLM vs llama.cpp comparison measures the three engines on the same GPU if you’re still choosing between them.
Which vLLM flags were renamed or removed
vLLM ships a release roughly every two weeks, and the V1 engine rewrite removed a batch of options that copy-pasted serve lines still carry. Passing a removed flag stops the server at argument parsing, but removed environment variables such as VLLM_ATTENTION_BACKEND are simply never read and removed request fields are ignored, so those two kinds fail silently. These changed by v0.32.0, plus the two v0.34.0 changes that break existing configs:
| Old form | Status | Use instead |
|---|---|---|
--swap-space | Removed | --kv-offloading-size for KV cache in RAM, or a smaller --max-model-len |
VLLM_USE_V1=1 | Removed, V1 is the only engine | Nothing |
VLLM_ATTENTION_BACKEND | Removed | --attention-backend |
--task generate | Removed | Inferred from the model, or --runner pooling / --convert embed |
guided_json and other guided_* fields | Ignored with a warning | structured_outputs |
--disable-log-requests | Removed | Drop it, logging is off unless --enable-log-requests |
--disable-cascade-attn | Accepted with a no-effect warning, still in v0.34.0 | Drop it |
| Open CORS | Default is now no origins (v0.32.0) | --allowed-origins |
VLLM_USE_V2_MODEL_RUNNER=0 | Fails at startup in v0.34.0, Model Runner V1 is gone | Drop it |
--block-size default 16 | Default is 64 from v0.34.0 | --block-size 16 keeps the old behavior |
The CORS change is the one that breaks web front ends after an upgrade: a browser app on another origin gets blocked even though curl from the same machine works fine. If you run Open WebUI or a custom chat page on a different host or port, add its origin with --allowed-origins as a JSON list, exactly as in the quick reference table.
Fix common vLLM OOM and CUDA errors
Each heading below quotes the error string as it appears in the v0.32.0 source, so you can match them against your log. Several error messages were reworded in recent releases, which is why searches for the older text often land on fixes for a different problem.
Error: “To serve at least one request with the model’s max seq len (N) … is larger than the available KV cache memory”
This replaced the older “max seq len is larger than the maximum number of tokens that can be stored in KV cache” message, and it means one request at --max-model-len doesn’t fit in the cache that is left after the weights load. The message now prints the estimated maximum length that would fit, so the quickest fix is to set --max-model-len to that number or below it. Other fixes, in the order we’d try them: raise --gpu-memory-utilization if nothing else uses the card (on v0.34.0 it already defaults to 1.0, so lower --max-num-seqs instead), add --kv-cache-dtype fp8, switch to a quantized checkpoint, or add a GPU with -tp 2. Setting --max-model-len auto does the first fix for you.
Error: “No available memory for the cache blocks”
Here the weights plus profiling used the whole budget and zero KV cache blocks are left. The model is too big for the fraction you gave it. Raise --gpu-memory-utilization if you set it below 1.0, lower --max-num-seqs so the profiling run reserves less activation memory, or load a smaller or quantized model. It shows up when the weights only just fit, for example a model whose BF16 weights take nearly all of a 0.92 budget, because a model that does not fit at all fails earlier with a PyTorch CUDA OOM during loading.
Error: “Free memory on device … on startup is less than desired GPU memory utilization (0.92, X GiB)”
Another process holds VRAM, so the budget can’t be reserved. The quoted text is the v0.32.0 message, which prints the configured fraction (0.92 when unset). On v0.34.0 this check only runs when the extensible KV cache is disabled. Find the process with nvidia-smi, stop it, or lower the fraction until it fits in what is free. A crashed vLLM that left a zombie worker produces this too, and pkill -f "vllm serve" followed by a fresh nvidia-smi clears it.
Error: “torch.OutOfMemoryError: CUDA out of memory” during serving
A PyTorch OOM after startup comes from memory vLLM didn’t plan for, usually CUDA graph capture or a burst of large batches. The vLLM conserving-memory docs list the fixes: lower --max-num-seqs and --max-num-batched-tokens, shrink the CUDA graph capture sizes, or start with --enforce-eager to skip graphs entirely at some cost in speed. If the OOM appears near graph.replay() in the traceback, --enforce-eager is the documented first test.
Error: “Total number of attention heads (N) must be divisible by tensor parallel size (M)”
Your model’s head count cannot be split evenly across the GPUs you asked for. Check num_attention_heads in the model’s config.json and pick a -tp that divides it, then use the leftover GPUs with -pp or -dp instead of forcing tensor parallel onto them.
Error: “Bfloat16 is only supported on GPUs with compute capability of at least 8.0”
Turing cards (RTX 20 series, T4) can’t run BF16, and most current checkpoints default to it. The error text names the fix: add --dtype half. Expect slightly different numerical behavior in FP16, which rarely matters for chat but can for models trained purely in BF16.
Error: “the provided PTX was compiled with an unsupported toolchain”
Your driver is older than the CUDA version the build expects, which with v0.32.0 means a driver below R580 running the CUDA 13 image or wheel. The vLLM troubleshooting page also lists “The NVIDIA driver on your system is too old” for the same cause. Upgrade the driver, use the v0.32.0-cu129 image (the last CUDA 12.9 build), or set VLLM_ENABLE_CUDA_COMPATIBILITY=1 on supported datacenter cards. On an RTX 50 series card, a similar “no kernel image is available for execution on the device” means the PyTorch build lacks Blackwell support, and a CUDA 12.8 or newer build fixes it.
Error: NCCL “unhandled system error” or a bus error in Docker
Multi-GPU workers couldn’t set up shared memory. In Docker this is almost always a missing --ipc=host (or too small a --shm-size), and the vLLM docs also name a missing IPC_LOCK capability. Run the server again with NCCL_DEBUG=TRACE to see which transport failed, and on hosts without peer-to-peer support NCCL_P2P_DISABLE=1 forces the slower path that works.
Error: “Failed to infer device type”
vLLM can’t see a GPU at all. Inside a container that means the NVIDIA runtime wasn’t used (add --gpus all and check the Container Toolkit), and on bare metal it usually means the driver isn’t loaded. Confirm with nvidia-smi first. The message itself suggests rerunning with VLLM_LOGGING_LEVEL=DEBUG for the detection details.
Common misconceptions about vLLM memory
Most vLLM tuning advice goes wrong because it treats the server like a desktop app that grows as it works. It doesn’t, and three beliefs follow from that mistake:
- “vLLM is leaking memory because nvidia-smi shows almost the whole card used”: that is the reserved budget (92% on v0.32.0, nearly all free memory on v0.34.0), taken at startup on purpose, and it stays flat under load.
- “A bigger fraction makes it faster”: it only enlarges the KV cache pool, which raises concurrency and maximum context, not single-request speed.
- “If the weights fit, the model fits”: the cache for one full-length request must fit too, which is why
--max-model-lenfixes more startup failures than any other flag.
Keep that model in mind and the error messages read as arithmetic: weights plus activations plus one full-length request must fit inside the fraction you set. When they don’t, cut context first, quantize second, and add GPUs last. If you’re still deciding which card buys you the most of that budget per dollar, the best GPU for LLMs guide sorts the options by VRAM, and the Ollama models cheat sheet lists which models fit at each size.