Skip to content
Courses/Local MLOps and model deployment/vLLM with OpenAI-compatible API

vLLM with OpenAI-compatible API

vLLM is designed to serve models efficiently on GPU. Its main practical advantage: it exposes an OpenAI-compatible API, so many apps can switch backends with minimal changes.

  • Start a vLLM server for local or lab testing.
  • Connect an app using the OpenAI client pointed at your endpoint.
  • Measure latency, tokens per second, and basic errors.

Minimal server

Terminal
python -m venv .venv
source .venv/bin/activate
pip install -U vllm

vllm serve Qwen/Qwen3-8B \
  --host 127.0.0.1 \
  --port 8000

OpenAI client with vLLM

Terminal
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "local",
  baseURL: "http://127.0.0.1:8000/v1",
});

const response = await client.chat.completions.create({
  model: "Qwen/Qwen3-8B",
  messages: [{ role: "user", content: "Give me an LLM deployment checklist." }],
});

console.log(response.choices[0].message.content);
Complete Aulafy mapSee how this lesson fits without leaving your path.

Complete Aulafy map

How all courses connect

This is not a checklist. Start with the foundation, choose an outcome, and go deeper only when your project needs more control.

  1. 1Understand
  2. 2Apply or build
  3. 3Operate with confidence
01

Choose an application

Turn the foundation into a visible outcome: a website, a business improvement, media, or an interactive experience.

Continue into the technical branch when you need to maintain code, data, or infrastructure.

02

Build with code

Prepare your environment, work with coding agents, and run models while keeping control of your projects.

This branch prepares you to design and operate reliable AI systems.

03

Take systems to production

Combine retrieval, agents, evaluation, security, deployment, and model adaptation when the problem requires it.

You do not need every course: choose the component your system needs and return as it grows.

View full catalogue