What is vLLM?
An open-source inference and serving engine for large language models. PagedAttention and continuous batching give it high throughput and low latency, and its OpenAI-compatible API lets OpenAI SDKs talk to your own model without code changes.
Which machine should I choose?
A GPU machine: g5.2xlarge (one A10G, 24 GB) on AWS or g2-standard-8 (one L4, 24 GB) on Google Cloud for 7B to 8B models. Move to larger GPU types for bigger models or more concurrency.
Which models can I run?
Any Hugging Face model that fits in your GPU memory, including Llama, Qwen, Mistral, Gemma and Phi. Set it by repository ID at deployment; gated or private models also need a Hugging Face token.
Is the API secured by default?
No. The endpoint answers anyone who can reach it. Restrict the security group or firewall to trusted IPs, put it behind a VPN or an authenticating proxy, or run vLLM with an API key before exposing it.
How do I call it from my code?
Point any OpenAI-compatible client at https://your-domain/v1 and use the chat completions or completions route with the model you deployed. Swagger UI at /docs lists every route.
Why do I get a 502 error after launch?
vLLM is still downloading the model weights and loading them onto the GPU. Wait 5-15 minutes and refresh.
How do I change the model?
Update the model setting (the ModelName stack parameter on AWS, or the service configuration on the server) and restart vLLM. Make sure the new model fits your GPU memory.
Does stopping the server stop GPU billing?
Yes. Stopping the instance or VM halts GPU charges while keeping the disk, so you can start it again later.