Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
LLM Serving, Deployment & Scaling - Ollama, vLLM & Ray Serve
Rating: 1.8 out of 5(3 ratings)
73 students

LLM Serving, Deployment & Scaling - Ollama, vLLM & Ray Serve

Learn to serve, deploy, optimize and scale LLMs using Ollama, vLLM, Ray Serve, OpenAI-compatible APIs, FastAPI & Docker.
Created byUplatz Training
Last updated 8/2026
English
English [Auto],

What you'll learn

  • Understand fundamentals of LLM serving, including inference, token generation, latency, throughput, batching, KV cache, quantization, and streaming responses.
  • Set up a reliable development environment for building and running local and production-oriented LLM applications.
  • Install, configure, and use Ollama to run and manage large language models locally.
  • Build practical LLM-powered applications using Python, REST APIs, system prompts, conversation history, and error-handling techniques.
  • Integrate local LLMs with OpenAI-compatible APIs and use the OpenAI Python SDK with alternative model-serving platforms.
  • Understand the architecture and performance advantages of vLLM, including PagedAttention, continuous batching, and GPU memory optimisation.
  • Deploy and optimise high-performance LLM inference services using vLLM.
  • Benchmark LLM-serving systems and evaluate latency, throughput, memory usage, and concurrency.
  • Understand distributed AI-serving concepts and use Ray Serve to deploy, scale, route, and manage LLM applications.
  • Integrate Ray Serve with FastAPI and vLLM-style serving architectures.
  • Apply autoscaling, replica management, fault tolerance, monitoring, and request-routing concepts to scalable AI services.
  • Containerise LLM applications using Docker and manage multi-service environments with Docker Compose.
  • Design OpenAI-style API endpoints that support both standard and streaming responses.
  • Build a complete production-oriented LLM-serving project using Ollama, FastAPI, Ray Serve, OpenAI-compatible APIs, and Docker Compose.
  • Choose the appropriate serving technology based on application requirements, infrastructure, scale, performance, and deployment complexity.

Course content

10 sections • 13 lectures • 6h 28m total length
  • LLM Serving Introduction18:26

Requirements

  • Enthusiasm and determination to make your mark on the world!

Description

A warm welcome to LLM Serving, Deployment & Scaling - Ollama, vLLM & Ray Serve course by Uplatz.


What is LLM Serving?

LLM serving is the process of running a trained language model and making it available to applications or users for inference.

The model has already been trained. Serving begins when a system loads the model into memory and accepts requests such as:

  • Summarise this document.

  • Answer this question.

  • Generate a product description.

  • Continue this conversation.

A typical serving flow is:

Application sends a request.
The LLM-serving engine receives it.
The model performs inference.
The model generates output tokens.
The response is returned to the application.

When a request reaches the serving system:

  1. The input text is converted into tokens.

  2. The model processes the input tokens.

  3. The model generates output tokens, usually one at a time.

  4. The tokens are converted back into readable text.

  5. The response is returned to the application.

LLM serving commonly includes:

  • Loading the model

  • Receiving inference requests

  • Tokenising prompts

  • Generating responses

  • Managing CPU or GPU memory

  • Streaming output tokens

  • Batching requests

  • Managing latency and throughput

  • Exposing the model through an API

LLM serving is different from LLM training.

Training creates or updates the model. Serving allows users and applications to interact with the trained model.


What is LLM Deployment?

LLM deployment is the broader process of placing an LLM-serving system into an environment where it can be used reliably.

Serving refers mainly to running the model and generating responses. Deployment includes everything required to make that serving system operational.

LLM deployment may involve:

  • Selecting the appropriate model

  • Choosing a serving engine

  • Preparing CPU or GPU infrastructure

  • Configuring API endpoints

  • Packaging the application

  • Managing environment variables

  • Securing the service

  • Starting and restarting the system

  • Monitoring performance

  • Handling failures

  • Updating models and application code

  • Making the service accessible to users

A simple local deployment may consist of:

A laptop running Ollama, a local language model and a Python application.

A production deployment may consist of:

A user-facing application, an API layer, Ray Serve for orchestration, vLLM for high-performance inference and GPU infrastructure for running the model.

Deployment answers questions such as:

  • Where will the model run?

  • How will applications access it?

  • How will the service be configured?

  • How will it recover from failure?

  • How will updates be released?

  • How will traffic be secured?

  • How will the system be monitored?


What is LLM Scaling?

LLM scaling means increasing the capacity of an LLM-serving system so that it can handle more users, requests, models or workloads without unacceptable delays or failures.

A model-serving system may work well for one user but struggle when hundreds or thousands of users send requests at the same time.

Scaling can be achieved in several ways.

Vertical Scaling

Vertical scaling means increasing the resources available to one server.

This may include:

  • Adding more GPU memory

  • Using a faster GPU

  • Adding more CPUs

  • Increasing system memory

  • Using higher-performance storage

Vertical scaling can help the system run larger models or process more requests on one machine.

Horizontal Scaling

Horizontal scaling means running multiple copies of the model-serving application.

Incoming requests are distributed across several replicas instead of being handled by one instance.

For example, a serving system may have three model replicas. A request router sends each incoming request to an available replica.

This improves:

  • Capacity

  • Reliability

  • Concurrent request handling

  • Fault tolerance

Model-Level Scaling

Model-level scaling focuses on making model inference more efficient.

It may include:

  • Continuous batching

  • Tensor parallelism

  • Pipeline parallelism

  • Quantisation

  • KV-cache optimisation

  • Multi-GPU execution

These techniques improve how efficiently the model uses available hardware.

Application-Level Scaling

Application-level scaling focuses on managing traffic and application components.

It may include:

  • Request routing

  • Replica management

  • Autoscaling

  • Load balancing

  • Queue management

  • Retry handling

  • Health checks

  • Fault recovery

Ray Serve is especially relevant to application-level scaling.


What is LLM Inference?

Inference is the process of using a trained model to generate an output from an input.

When a user submits a prompt, the model is normally not being retrained. It is performing inference.

For example, the user may ask:

“Explain cloud computing in simple terms.”

The model processes the prompt and repeatedly predicts the next token until it completes the response.

Inference performance depends on several factors:

  • Model size

  • Input length

  • Output length

  • GPU capability

  • Number of concurrent requests

  • Quantisation level

  • Batching strategy

  • Available memory


What are Latency and Throughput?

Latency and throughput are two of the most important measurements in LLM serving.

Latency

Latency is the amount of time required to process a request and return a response.

Important latency measurements include:

  • Time to first token

  • Time between generated tokens

  • Total response time

Time to first token measures how long the user waits before the first part of the response appears.

Low latency is especially important for:

  • Chatbots

  • Virtual assistants

  • Interactive AI applications

  • Customer-support systems

  • Real-time coding assistants

Throughput

Throughput measures how much work the serving system can process during a given period.

It may be measured using:

  • Requests per second

  • Tokens per second

  • Completed responses per minute

A system can achieve high throughput while an individual user still experiences slower responses.

Production systems therefore need to balance latency and throughput.


What is Batching?

Batching means combining multiple inference requests and processing them together.

GPUs are usually more efficient when they process several requests at the same time rather than processing each request individually.

Traditional batching may wait until enough requests have arrived before processing them together.

However, traditional batching can be inefficient when requests have different input and output lengths.

What is Continuous Batching?

Continuous batching dynamically adds and removes requests while model generation is taking place.

When one request finishes, a new request can enter the active batch without waiting for all other requests to complete.

Continuous batching improves:

  • GPU utilisation

  • Throughput

  • Concurrent request handling

  • Resource efficiency

  • Overall serving performance

Continuous batching is one of the main reasons vLLM performs well under heavy traffic.


What is the KV Cache?

During text generation, the model repeatedly uses information calculated from previously processed tokens.

The KV cache, or key-value cache, stores these intermediate attention calculations so that the model does not need to calculate them again for every new token.

Without a KV cache, token generation would be much slower.

However, the KV cache can consume a large amount of GPU memory, especially when:

  • Prompts are long

  • Many users are active

  • Responses are long

  • The model is large

Efficient KV-cache management is therefore essential for high-performance LLM serving.

vLLM uses a technique called PagedAttention to manage KV-cache memory more efficiently.


What is Quantisation?

Quantisation reduces the numerical precision used to represent model weights.

A model may be converted from higher-precision values to formats such as:

  • 8-bit precision

  • 4-bit precision

  • Other lower-precision formats

Quantisation can:

  • Reduce memory usage

  • Allow larger models to run on smaller hardware

  • Improve inference speed

  • Reduce infrastructure requirements

  • Lower deployment costs

The main trade-off is that aggressive quantisation may reduce model quality or require specific hardware support.


What are Streaming Responses?

Without streaming, the user must wait until the model has generated the complete response.

With streaming, generated tokens are sent to the application gradually as they are produced.

This allows the user to see the response appearing progressively instead of waiting for the entire answer.

Streaming improves perceived responsiveness and is commonly used in chat applications.

Ollama, vLLM, OpenAI-compatible APIs and FastAPI-based applications can all support streaming responses.


What is Ollama?

Ollama is a tool for running and managing language models locally.

It simplifies tasks such as:

  • Downloading supported models

  • Running models on a local machine

  • Managing installed models

  • Testing prompts

  • Calling models through a local API

  • Streaming responses

  • Adjusting basic model settings

A developer can install Ollama, download a model and begin using it without manually configuring a complex inference environment.

A typical Ollama workflow consists of:

A Python application sending a request to the Ollama API. Ollama then sends the prompt to the locally running model and returns the generated response.


Ollama introduces learners to practical LLM serving in a simple local environment.

It is useful for:

  • Local development

  • Prototyping

  • Learning API integration

  • Testing prompts

  • Building small internal applications

  • Running open-source models without relying on a hosted provider

Ollama is generally easier to begin with than a high-performance production-serving engine.


What is vLLM?

vLLM is a high-performance inference and serving engine for large language models.

It is designed to improve:

  • Throughput

  • GPU memory utilisation

  • Concurrent request processing

  • Token-generation efficiency

  • Production inference performance

Two important vLLM concepts are PagedAttention and continuous batching.

PagedAttention

PagedAttention manages KV-cache memory in smaller blocks instead of requiring large continuous memory allocations.

This reduces memory waste and allows the serving system to handle more concurrent requests.

Continuous Batching in vLLM

vLLM dynamically combines active requests during inference.

When one request finishes, another request can be added without waiting for the entire batch to complete.

This keeps the GPU busy and improves throughput.

Role of vLLM

vLLM represents the high-performance model-serving layer.

It is used to teach:

  • Production-oriented inference

  • GPU memory optimisation

  • Continuous batching

  • Quantised model serving

  • Performance benchmarking

  • OpenAI-compatible model endpoints

  • High-concurrency serving

A typical vLLM setup consists of:

An application sending a request to an OpenAI-compatible endpoint. vLLM receives the request, runs the model on GPU infrastructure and returns the generated output.

vLLM focuses mainly on efficient model inference. It is not a complete application-orchestration platform.


What is Ray Serve?

Ray Serve is a scalable application-serving and orchestration framework built on Ray.

It helps developers deploy and manage distributed applications, including LLM-based systems.

Ray Serve can manage:

  • Application replicas

  • Request routing

  • Autoscaling

  • Concurrent requests

  • Fault recovery

  • Distributed deployments

  • Multi-stage inference pipelines

  • Integration with web frameworks

A replica is a running copy of a deployment.

Ray Serve can create or remove replicas based on traffic and system requirements.

For example, Ray Serve may distribute incoming requests across several vLLM replicas.

Role of Ray Serve in This Course

Ray Serve handles the orchestration and scaling layer.

It helps learners understand:

  • How serving replicas are managed

  • How traffic is distributed

  • How systems scale horizontally

  • How failed components can be replaced

  • How application components are deployed together

  • How vLLM can fit into a distributed architecture

The distinction is important:

vLLM runs the model efficiently.

Ray Serve manages, routes and scales the wider serving application.

They can be used together and are not necessarily direct alternatives.


What are OpenAI-Compatible APIs?

An OpenAI-compatible API follows request and response formats similar to those used by OpenAI APIs.

This compatibility allows developers to use familiar SDKs and application code while changing the underlying model provider or serving engine.

An application may send a chat-completion request containing:

  • The model name

  • User and system messages

  • Temperature settings

  • Maximum token settings

  • Streaming preferences

The underlying backend may be:

  • Ollama

  • vLLM

  • A hosted model provider

  • Another compatible inference server

The application may only need to change:

  • The base URL

  • The model name

  • API-key configuration

Role of OpenAI-Compatible APIs

OpenAI-compatible APIs provide a standard interface between applications and model-serving systems.

They help with:

  • Portability

  • Easier integration

  • Reusing existing SDKs

  • Switching between model backends

  • Reducing application-code changes

  • Standardising request and response structures

The term OpenAI-compatible describes the API format.

It does not mean that the underlying model must be an OpenAI model.


What is FastAPI?

FastAPI is a Python web framework used to create APIs.

It can be used to define endpoints such as:

  • /chat

  • /generate

  • /health

  • /models

  • /v1/chat/completions

FastAPI handles the application and web API layer.

It can manage:

  • HTTP requests

  • Input validation

  • Output formatting

  • API routing

  • Authentication integration

  • Error responses

  • Streaming endpoints

  • Automatic API documentation

A typical FastAPI setup consists of:

A client sends a request to a FastAPI endpoint. FastAPI validates the request and forwards it to Ollama, vLLM or another model-serving backend. The generated response is then returned to the client.


Role of FastAPI

FastAPI helps learners create the application-facing API around the serving system.

It may be used to:

  • Receive prompts from users

  • Validate request data

  • Forward requests to a model-serving backend

  • Return generated responses

  • Add application logic

  • Expose OpenAI-style endpoints

  • Add health checks

  • Handle errors

  • Support streaming

FastAPI does not itself perform LLM inference.

It provides the web interface through which the inference service can be accessed.


What is Docker?

Docker is a containerisation platform used to package and run software consistently.

A Docker container can include:

  • Application code

  • Python runtime

  • Required libraries

  • System dependencies

  • Configuration

  • Startup commands

Docker helps reduce problems such as:

  • Different Python versions

  • Missing packages

  • Inconsistent operating systems

  • Dependency conflicts

  • Applications working on one machine but failing on another

Docker Compose can define and run several services together.

For example, a Docker Compose setup may include:

  • A FastAPI service

  • An Ollama service

  • A Ray Serve service

  • A model-serving service

  • A supporting database

  • A monitoring component

Role of Docker

Docker supports packaging and deployment.

It helps learners:

  • Containerise a FastAPI application

  • Package dependencies consistently

  • Run services in isolated environments

  • Configure environment variables

  • Start multiple services together

  • Move applications between development and production environments

Docker is not an LLM-serving engine or an LLM-serving framework.

It is supporting infrastructure used to package and run the components involved in the serving system.

How the Technologies Work Together

A simple local setup may consist of:

  • A user application

  • Ollama

  • A locally installed language model

The application sends a request to Ollama. Ollama runs the local model and returns the generated response.

A more structured local application may consist of:

  • A user interface

  • FastAPI

  • Ollama

  • A local language model

FastAPI receives the request, validates it and sends it to Ollama. Ollama performs inference and returns the result.

A performance-focused production system may consist of:

  • A client application

  • An OpenAI-compatible API endpoint

  • vLLM

  • A GPU-hosted language model

The application sends a standard API request. vLLM processes the request efficiently and returns the generated tokens.

A scalable production system may consist of:

  • Multiple users

  • A FastAPI or OpenAI-compatible API layer

  • Ray Serve

  • Several vLLM replicas

  • GPU infrastructure

Ray Serve distributes traffic across the available vLLM replicas and can increase or reduce the number of replicas based on demand.

Docker may be used to package and run these components consistently.

For example, Docker Compose may coordinate:

  • The FastAPI application

  • Ray Serve

  • The model-serving component

  • Configuration services

  • Supporting infrastructure


Primary Role of Each Technology

  • Ollama provides simple local model running and serving.

  • vLLM provides high-performance LLM inference and serving.

  • Ray Serve provides distributed deployment, routing, orchestration and scaling.

  • OpenAI-compatible APIs provide a standard interface for accessing different model backends.

  • FastAPI provides the Python web API and application layer.

  • Docker packages and runs software components consistently.

  • Docker Compose coordinates multiple containerised services.


Serving, Deployment and Scaling: The Key Difference

LLM serving means running a trained model and responding to inference requests.

LLM deployment means placing the complete serving system into an operational environment.

LLM scaling means increasing the system’s ability to handle more users, requests and workloads.

API development means creating the interface that applications use to communicate with the model.

Containerisation means packaging the application and its dependencies consistently.

Orchestration means coordinating replicas, request routing, recovery and distributed execution.


About the Course

LLM Serving, Deployment & Scaling with Ollama, vLLM, Ray Serve, OpenAI-compatible APIs, FastAPI, and Docker


Large language models become useful only when they can be made accessible to applications, users and business systems in a reliable and efficient way.

This course by Uplatz focuses on the practical technologies, concepts and architectural patterns used to run, serve, deploy and scale large language models.

Learners begin with the fundamentals of LLM inference and serving, including tokenisation, token generation, latency, throughput, batching, KV cache, quantisation and streaming responses.

The course then introduces Ollama as a simple and accessible platform for running and serving language models locally. Learners explore how to install Ollama, manage models, use its command-line interface, call its REST API and integrate local models into Python applications.

The course also covers OpenAI-compatible APIs, showing how applications can communicate with different model-serving backends through a standard request and response format. Learners understand how familiar OpenAI-style SDKs can be used with local and open-source models.

After establishing the local serving workflow, the course moves into high-performance LLM serving with vLLM. Learners explore how vLLM improves inference performance through continuous batching, efficient GPU memory management and PagedAttention.

The course then introduces Ray Serve for distributed deployment, application orchestration, request routing, replica management, autoscaling and fault tolerance.

FastAPI is used to build application-facing API routes, while Docker and Docker Compose are used to package and run the different components consistently.

The course concludes with a practical production-oriented project that combines local model serving, API development, OpenAI-compatible endpoint design, scaling architecture and containerised deployment.


What This Course Teaches

This course teaches learners how to move from running a language model locally to designing a structured and scalable LLM-serving system.

Learners will understand:

  • What LLM serving means and how it differs from model training

  • How LLM inference works

  • How prompts are converted into tokens

  • How language models generate output tokens

  • How latency and throughput affect serving performance

  • How batching and continuous batching improve GPU utilisation

  • How KV cache affects memory usage and generation speed

  • How quantisation reduces model size and infrastructure requirements

  • How streaming responses improve user experience

  • How to run and manage local language models using Ollama

  • How to call Ollama through Python and REST APIs

  • How to build simple LLM-powered applications

  • How to maintain conversation history and system prompts

  • How OpenAI-compatible APIs standardise model access

  • How to use the OpenAI Python SDK with alternative model backends

  • How vLLM provides high-performance LLM inference

  • How PagedAttention improves KV-cache memory management

  • How continuous batching improves throughput

  • How to optimise and benchmark LLM-serving workloads

  • How Ray Serve manages distributed AI applications

  • How request routing and replica management work

  • How autoscaling supports changing traffic levels

  • How fault tolerance improves application reliability

  • How FastAPI provides an application-facing API layer

  • How Docker packages an LLM application consistently

  • How Docker Compose coordinates multiple services

  • How local serving, API design, scaling and deployment fit together


How the Course Progresses

The course follows a practical learning journey.

It begins with the core concepts of LLM serving and inference.

Learners then set up their development environment and run their first local model using Ollama.

After learning how to interact with models through command-line tools, REST APIs and Python, learners build simple LLM-powered applications.

The course then introduces OpenAI-compatible APIs, allowing learners to understand how the same application interface can be used with different model-serving systems.

The next stage focuses on production-oriented serving with vLLM, including GPU memory management, continuous batching, quantisation and performance benchmarking.

Learners then move into distributed deployment and scaling with Ray Serve.

Finally, the course brings the technologies together through Docker, Docker Compose, FastAPI and a complete production-oriented project.


Main Technologies Covered

Ollama

Ollama is used for running and serving language models locally.

It provides a simple entry point into practical LLM serving and allows learners to download, manage and interact with local models through a command-line interface and REST API.

vLLM

vLLM is used for high-performance LLM inference and serving.

It introduces learners to production-focused concepts such as PagedAttention, continuous batching, GPU memory optimisation, quantisation, concurrency and performance benchmarking.

Ray Serve

Ray Serve is used for orchestration, deployment and scaling.

It helps manage application replicas, route requests, support autoscaling, improve fault tolerance and operate distributed AI services.

OpenAI-Compatible APIs

OpenAI-compatible APIs provide a standard interface for communicating with different LLM backends.

They allow applications to use familiar request formats and SDKs while connecting to Ollama, vLLM or other compatible systems.

FastAPI

FastAPI is used to create web APIs around LLM-serving systems.

It handles application routes, request validation, response formatting, health checks, errors and streaming endpoints.

Docker

Docker is used to package applications, dependencies and configurations into consistent containers.

Docker supports deployment but is not itself an LLM-serving engine.

Docker Compose

Docker Compose is used to run and coordinate multiple services, such as a FastAPI application, model-serving backend and supporting infrastructure.


LLM Serving, Deployment & Scaling with Ollama, vLLM & Ray Serve - Course Curriculum


Episode 1 – Course Introduction

This episode introduces the course and provides an overview of the modern LLM-serving ecosystem.

Topics covered:

  • Course introduction

  • What learners will build and understand

  • Understanding the modern LLM-serving stack

  • Difference between local and production AI systems

  • Difference between training and serving

  • Difference between serving, deployment and scaling

  • Common challenges in AI deployments

  • Overview of Ollama, vLLM, Ray Serve, FastAPI and Docker

  • Course learning journey


Episode 2 – Development Environment Setup

This episode focuses on preparing a stable development environment for LLM-serving projects.

Topics covered:

  • Development environment setup

  • Installing and configuring Python

  • Managing different Python versions

  • Creating virtual environments

  • Installing project dependencies

  • Resolving missing or mismatched dependencies

  • Verifying Docker installation

  • Fixing Docker installation and runtime issues

  • Configuring the correct editor interpreter

  • Checking local model runtime availability

  • Understanding environment variables

  • Troubleshooting common setup problems


Episode 3 – LLM Serving Fundamentals

This episode explains the essential concepts behind LLM inference and serving.

Topics covered:

  • What LLM serving means

  • Difference between training and inference

  • How LLM inference works

  • Tokens and tokenisation

  • Input tokens and output tokens

  • The token-generation lifecycle

  • Batch inference

  • Real-time inference

  • Latency

  • Time to first token

  • Token-generation speed

  • Throughput

  • Requests per second

  • Tokens per second

  • Traditional batching

  • Continuous batching

  • KV-cache fundamentals

  • GPU memory usage

  • Quantisation basics

  • Streaming responses

  • Core LLM-serving architecture


Episode 4 – Introduction to Ollama

This episode introduces Ollama and demonstrates how to run language models locally.

Topics covered:

  • What Ollama is

  • Why developers use Ollama

  • How Ollama fits into a local serving stack

  • Supported operating systems

  • Installing Ollama on Windows

  • Installing Ollama on Linux

  • Installing Ollama on macOS

  • Running the first local model

  • Downloading models

  • Managing installed models

  • Viewing available models

  • Removing models

  • Main Ollama CLI commands

  • Sending prompts through the command line

  • Calling Ollama through its REST API

  • Understanding Ollama request and response formats

  • Streaming responses with Ollama

  • Adjusting basic model settings

  • Using Ollama in a practical development workflow


Episode 5 – Building Applications with Ollama

This episode shows how to integrate Ollama with Python applications.

Topics covered:

  • Python integration with Ollama

  • Calling Ollama APIs from Python

  • Sending prompts programmatically

  • Processing model responses

  • Building a simple chat application

  • Managing conversation history

  • Maintaining message context

  • Using system prompts

  • Separating user and assistant messages

  • Prompt-engineering fundamentals

  • Configuring model parameters

  • Handling connection errors

  • Handling invalid responses

  • Implementing retry logic

  • Designing reusable functions

  • Building a reusable AI assistant


Episode 6 – OpenAI-Compatible APIs

This episode explains how standardised APIs simplify LLM application development.

Topics covered:

  • What OpenAI-compatible APIs are

  • Why API compatibility matters

  • Standard chat-completion request formats

  • Standard response formats

  • System, user and assistant messages

  • Model names and endpoint configuration

  • Temperature and token settings

  • Streaming request formats

  • Streaming token responses

  • Using the OpenAI Python SDK

  • Connecting the SDK to local models

  • Configuring a custom base URL

  • Connecting applications to Ollama

  • Switching between model backends

  • Reusing application code

  • Advantages and limitations of API compatibility


Episode 7 – Introduction to vLLM

This episode introduces vLLM as a high-performance LLM inference and serving engine.

Topics covered:

  • What vLLM is

  • Why vLLM was created

  • Limitations of basic model-serving systems

  • Why vLLM is fast

  • vLLM architecture

  • Understanding PagedAttention

  • Understanding KV-cache memory fragmentation

  • How PagedAttention manages memory

  • Understanding continuous batching

  • How vLLM handles concurrent requests

  • How vLLM manages GPU memory

  • Supported model formats

  • OpenAI-compatible serving with vLLM

  • Starting a vLLM server

  • Sending requests to vLLM

  • When to use vLLM

  • When a simpler local runtime may be sufficient


Episode 8 – Production Serving with vLLM

This episode explores production-oriented inference architecture and optimisation techniques.

Topics covered:

  • Designing production inference architecture

  • How a request moves through vLLM

  • Request scheduling

  • Token generation under concurrent workloads

  • OpenAI-compatible serving in production

  • Continuous batching under real traffic

  • Improving throughput

  • Reducing latency

  • Improving time to first token

  • Managing GPU memory

  • Setting concurrency limits

  • Understanding model context length

  • Quantised models

  • When to use quantisation

  • Memory optimisation techniques

  • Model-loading considerations

  • Performance benchmarking

  • Measuring requests per second

  • Measuring tokens per second

  • Measuring latency

  • Creating clean benchmark tests

  • Common vLLM deployment problems

  • GPU out-of-memory errors

  • Model compatibility issues

  • Configuration problems

  • Practical deployment patterns


Episode 9 – Introduction to Ray Serve

This episode introduces distributed AI systems and application serving with Ray Serve.

Topics covered:

  • What Ray is

  • What distributed computing means

  • What distributed AI systems are

  • What Ray Serve is

  • Why Ray Serve is used

  • Ray architecture

  • Ray clusters

  • Nodes, workers and tasks

  • Ray Serve architecture

  • Deployments

  • Applications

  • Replicas

  • Request routing

  • Installing Ray Serve

  • Creating the first Ray Serve deployment

  • Sending requests to a deployment

  • Integrating Ray Serve with FastAPI

  • Understanding autoscaling

  • Ray Serve replica configuration

  • Introduction to the Ray Dashboard

  • Viewing deployments and system status


Episode 10 – Scaling LLM Applications with Ray Serve

This episode explains how Ray Serve supports scalable and reliable LLM applications.

Topics covered:

  • Why orchestration matters

  • Difference between model serving and orchestration

  • Deploying LLM-style APIs with Ray Serve

  • Integrating Ray Serve with FastAPI

  • How Ray Serve fits with vLLM

  • Request routing in scalable systems

  • Traffic distribution

  • Replica management

  • Increasing and reducing replicas

  • Handling concurrent requests safely

  • Managing request queues

  • Autoscaling fundamentals

  • Scaling based on traffic

  • Fault-tolerance fundamentals

  • Recovering failed replicas

  • Improving application reliability

  • Monitoring Ray Serve deployments

  • Using the Ray Dashboard

  • Common production deployment patterns

  • Multi-component serving applications

  • Separating API and inference layers


Episode 11 – Dockerizing LLM Services

This episode explains how Docker supports consistent packaging and deployment.

Topics covered:

  • Docker basics

  • What containers are

  • Difference between containers and virtual machines

  • Why Docker is useful for AI applications

  • Docker images

  • Docker containers

  • Dockerfiles

  • Writing a Dockerfile

  • Selecting a base image

  • Installing Python dependencies

  • Copying application code

  • Defining startup commands

  • Containerising a FastAPI application

  • Containerising an Ollama-based application

  • Running an AI API in a container

  • Port mapping

  • Volume mapping

  • Environment variables

  • Managing configuration

  • Introduction to Docker Compose

  • Running multiple services

  • Connecting containers

  • Basic container health checks

  • Basic production container practices

  • Clarifying the role of Docker in LLM deployment


Episode 12 – Final Production Project

This episode combines the course concepts into a complete production-oriented project.

Project components:

  • Ollama for local model serving

  • FastAPI for application routes

  • OpenAI-style endpoint design

  • Standard chat-completion request format

  • Model configuration

  • Conversation request handling

  • Error handling

  • Health-check endpoint

  • Stream flag support

  • Starter streaming mode

  • Ray Serve deployment design

  • Replica and scaling configuration

  • Request-routing architecture

  • Dockerfile creation

  • Docker Compose configuration

  • Multi-service application startup

  • Environment-variable management

  • Testing the complete application

  • Sending API requests

  • Troubleshooting integration issues

  • Understanding how the architecture can evolve for production


Episode 13 – Course Conclusion

This episode reviews the complete course and provides a roadmap for further learning.

Topics covered:

  • Reviewing the full course journey

  • Revisiting LLM-serving fundamentals

  • Reviewing Ollama-based local serving

  • Reviewing OpenAI-compatible APIs

  • Reviewing high-performance serving with vLLM

  • Reviewing orchestration and scaling with Ray Serve

  • Reviewing FastAPI integration

  • Reviewing Docker-based packaging

  • Reviewing the final production project

  • Important production considerations

  • Security considerations

  • Monitoring considerations

  • Cost and infrastructure considerations

  • Model-selection considerations

  • Suggested next learning steps

  • Advanced inference optimisation

  • Kubernetes and cloud deployment

  • LLM observability

  • GPU infrastructure

  • Production security

  • Moving from learning mode to building mode

Who this course is for:

  • Beginners in LLM deployment who want to understand how large language models are served locally and in production environments.
  • Python developers interested in building applications powered by local and open-source language models.
  • AI and machine learning engineers who want to develop practical skills in LLM inference, deployment, optimisation, and scaling.
  • Generative AI developers looking to work with Ollama, vLLM, Ray Serve, FastAPI, and OpenAI-compatible APIs.
  • Backend developers who want to integrate language models into APIs, applications, and distributed services.
  • Data scientists seeking to move trained or downloaded models from experimentation into usable AI services.
  • DevOps, MLOps, and platform engineers interested in containerising, deploying, monitoring, and scaling LLM applications.
  • Software engineers and solution architects who need to understand modern LLM-serving architectures and technology choices.
  • Technical students and aspiring AI professionals who want hands-on experience with practical LLM infrastructure.
  • Technology professionals and technical leaders evaluating different options for running and scaling open-source language models.