New Tool Radar

Local Model Setup

How to Limit vLLM GPU Memory Use With –gpu-memory-utilization

Start vLLM with --gpu-memory-utilization so the server reserves only part of the GPU and leaves room for other work.

Schematic diagram with four steps: start vLLM with --gpu-memory-utilization 0.8, check the models list at port 8000, send a chat completion, then confirm other GPU work still fits.

By default vLLM takes most of the GPU memory for its KV cache, which is fast but leaves nothing for anything else on the card. If you share the GPU with another job, set --gpu-memory-utilization to cap the fraction vLLM reserves.

Start the server with a memory fraction

Start the server with the flag set to the fraction you want to allow, for example 0.8 for eighty percent: vllm serve Qwen/Qwen2.5-1.5B-Instruct --gpu-memory-utilization 0.8. The server still loads the whole model, but the KV cache pool it builds is smaller, so long conversations and many parallel requests will hit the context limit sooner.

vllm serve Qwen/Qwen2.5-1.5B-Instruct --gpu-memory-utilization 0.8
# check it answers:
curl http://localhost:8000/v1/models

The server listens on http://localhost:8000 by default; change the address with --host and --port. If the model itself is bigger than the fraction allows, the server fails at load time — the flag caps the cache, it does not shrink the weights.

Try it: four checks

Check What you should see If you do not see it
Server starts vllm serve prints that it is ready Raise the fraction or pick a smaller model
Models list curl /v1/models returns the model name Check the port and the server log
Chat works A chat completion returns a reply Check the model name in the request matches
Other job fits The second GPU job still has memory Lower the fraction further

Expected result. We checked the vLLM Quickstart and the OpenAI-Compatible Server docs, which give the vllm serve command, the default http://localhost:8000 address, the –host and –port flags, and the /v1/models check. We did not run vLLM on this machine.

Limits

This guide covers the memory fraction only. The exact flag name and its default can change between vLLM versions, so check vllm serve --help on your install. We did not test the flag ourselves.

Sources

See all