Quick Start
This chapter gets two things working on an ungated small model: offline generation, and OpenAI-compatible HTTP. Finish Installation first and confirm nvidia-smi sees a GPU.
Default chat model:
Even smaller completion model (no chat template; use /v1/completions or LLM.generate):
Neither requires a Llama license. If VRAM is still tight, pick a smaller Instruct checkpoint or add --max-model-len 2048.
Start the OpenAI-compatible server
Preferred (newer CLI):
The first run pulls weights from Hugging Face, then listens on port 8000. Wait for the Uvicorn / ready log line before sending traffic.
Legacy module (still in many blog posts; current source marks it deprecated—check current docs):
Some newer messages may say vllm server instead of vllm serve. When unsure, run vllm --help.
Useful flags (full list: --help):
Chat Completions with curl
Base URL: http://localhost:8000/v1. Instruct models use Chat Completions:
From Windows PowerShell against a WSL server, prefer curl.exe, or:
The model field is usually the ID you passed to serve (or the name from /v1/models). They must match.
List models:
OpenAI Python SDK
Local servers often do not check the key unless you passed --api-key token-abc123. Auth scope is documented in Serving.
Offline: LLM + SamplingParams
No HTTP process—good for batch scripts:
Chat models may support llm.chat(...) (check your installed API). Details: Sampling.
Day-one checklist
nvidia-smilists a GPUimport vllmworks afterpip install vllmvllm serve Qwen/Qwen2.5-0.5B-Instructstays up- curl or the SDK returns non-empty
choices[0].message.content - Optional: offline
generatewithfacebook/opt-125m
If it fails: lower --max-model-len, wait for the Hub download, or free port 8000.