vLLM is a high-throughput inference engine for Hugging Face models on GPUs. Its vllm serve command starts an OpenAI-compatible server on http://localhost:8000, so existing OpenAI clients work against a local model by changing only the base URL.
What you need
- Linux with an NVIDIA GPU and CUDA drivers
- Python 3.10 to 3.13 and uv installed
- About 50 GB free disk space for the install and model weights
Step 1: Install vLLM in a fresh environment
Run uv venv –python 3.12 –seed, activate it with source .venv/bin/activate, then run uv pip install vllm –torch-backend=auto. Use a fresh environment because vLLM bundles its own PyTorch and CUDA kernels. Verify with python -c ‘import vllm; print(vllm.__version__)’.
Step 2: Serve a first model
Run vllm serve Qwen/Qwen2.5-1.5B-Instruct. On first run the model downloads to the Hugging Face cache; later runs load from cache. The server binds http://localhost:8000 by default and is ready when the log shows Application startup complete.
Step 3: Test the endpoint
Run curl http://localhost:8000/v1/models to list the served model, then send a chat completion to http://localhost:8000/v1/chat/completions with the model field set to Qwen/Qwen2.5-1.5B-Instruct. The model field must match exactly what was passed to vllm serve.
Worked example: serve Qwen2.5-1.5B-Instruct
The table below is a synthetic example. The commands and the default port come from the vLLM quickstart and setup guide; the model is their documented example.
| Step | Command | Expected result |
|---|---|---|
| Install | uv pip install vllm –torch-backend=auto | vllm imports, version prints |
| Serve | vllm serve Qwen/Qwen2.5-1.5B-Instruct | Application startup complete |
| Test | curl http://localhost:8000/v1/models | Model listed |
Expected result (UNTESTED). the server starts, /v1/models lists the model, and a chat completion returns an answer. This check was not run live; the commands come from the cited vLLM docs.
Limits
- vLLM runs on Linux only; macOS and Windows are not supported.
- Gated models such as Llama need a Hugging Face token and accepted terms first.
- The server hosts one model at a time.
- Startup takes minutes for small models and longer for large ones.
