Skip to main content
vLLM is a fast and easy-to-use library for LLM inference and serving, designed for high throughput and memory efficiency.

Prerequisites

Install vLLM and start serving a model:
The command below requires a supported Linux GPU environment. Choose the installation path for your hardware and operating system in the vLLM GPU installation guide before running it.
install vLLM
start vLLM server
This spins up the vLLM server with an OpenAI-compatible API. Set the VLLM_API_KEY environment variable. VLLM raises an error without it. If you started the server without --api-key, any value works:
set API key
VLLM connects to http://localhost:8000/v1/ by default. Override with the base_url parameter or the VLLM_BASE_URL environment variable.

Example

Advanced Usage

With Tools

vLLM models work with Agno tools:
with_tools.py
View more examples here.
For the full list of supported models, see the vLLM documentation.

Params

VLLM is a subclass of the OpenAILike class and has access to the same params.