vLLM quickstart: serve an open model on your own GPU
vLLM serves an open language model through an OpenAI-compatible API and handles several parallel users on one GPU server. This tutorial takes you from installation to a first answer via curl and the OpenAI Python client.

What you will have at the end and what you need
At the end, a vLLM server runs on your Linux machine and answers requests in the format of the OpenAI API. Applications that already talk to that API can point at your server instead. Single-user desktop tools are built for one person at a time, whereas vLLM is built for high throughput, so several colleagues can send requests at the same moment.
The vLLM quickstart documentation lists the prerequisites: Linux and Python 3.11 to 3.14. This tutorial follows the NVIDIA CUDA path, so you need a server with an NVIDIA GPU. The documentation also describes routes for AMD, Intel, TPU, Ascend and Apple Silicon, which this tutorial leaves out.
The documentation also covers offline batched inference, where a script passes a list of prompts to the engine directly. This tutorial concentrates on online serving, because that is the mode in which colleagues and applications reach one shared model over the network.
Install vLLM with uv
The documentation recommends uv, a fast Python environment manager, and asks you to install it first. The next block creates a virtual environment with Python 3.14, activates it and installs vLLM. The flag --torch-backend=auto lets uv pick the matching PyTorch index by inspecting the installed CUDA driver version.
uv venv --python 3.14 --seed
source .venv/bin/activate
uv pip install vllm --torch-backend=autoThe documentation also advises running one more command after installing or upgrading. It installs precompiled kernels that vLLM would otherwise download and compile at startup, which can add several minutes on Hopper and newer GPUs.
vllm download-kernelsIf you prefer a specific backend, the documentation shows that you can set --torch-backend=cu126 instead of auto. The environment variable UV_TORCH_BACKEND does the same job. Conda users can create an environment and install uv inside it through pip.
Start the server with an open model
The command below starts the server with the Qwen2.5-1.5B-Instruct model. By default vLLM downloads models from Hugging Face and listens on http://localhost:8000. You can change the address with --host and --port, and the server hosts one model at a time.
vllm serve Qwen/Qwen2.5-1.5B-InstructOn a shared server the API should demand a key. The flag --api-key, or the environment variable VLLM_API_KEY, makes the server check for a key in the request header. You can pass several keys after the flag and the server accepts any of them, which helps with key rotation. Replace the example value with a long random secret of your own.
vllm serve Qwen/Qwen2.5-1.5B-Instruct --api-key ersetzen-sie-michQuery it with curl and the OpenAI client
The first request lists the models the server offers. If you started the server with an API key, the request needs that key in its header as well.
curl http://localhost:8000/v1/modelsThe next call uses the chat completions endpoint. It sends a system message and a user message to the model, in the same JSON format as the OpenAI API.
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen2.5-1.5B-Instruct",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Tell me a joke."}
]
}'The same request works from Python with the openai package. The script below points the client at the local server through base_url and sends the same two messages. The documentation uses the placeholder EMPTY as key for a server without key checking. With --api-key you pass your real key instead.
from openai import OpenAI
# Point the client at the local vLLM server.
client = OpenAI(api_key="EMPTY", base_url="http://localhost:8000/v1")
chat_response = client.chat.completions.create(
model="Qwen/Qwen2.5-1.5B-Instruct",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Tell me a joke."},
],
)
print("Chat response:", chat_response)Checking, pitfalls and operation in a company
The setup works when the models request returns the model name and the chat request returns a response object with generated text. The documentation names a few details that surprise people. The server applies the generation_config.json from the model repository if one exists, so sampling defaults may differ from what you expect. Adding --generation-config vllm switches that off. The chat template comes from the tokenizer by default, and the documentation describes how to override it.
Startup can take several minutes if you skipped vllm download-kernels. A server without key checking accepts requests from anyone who can reach the port, so bind it carefully and set a key. For production, someone has to own updates, model choice and access, and your data protection officer should see where prompts and logs end up. If you run the server inside your own network, the data stays under your control, which is the idea behind local AI and the on-premise options.
souveraen.ai offers an OpenAI-compatible developer API and a model catalogue with local models, models hosted in Germany and external models in the EU with zero data retention. Questions on security and hosting are covered on a separate page.
Sources
- vLLM quickstart, vLLM documentation


