Module · MLOps Engineer
Model Serving
Serving models as dependable APIs.
Tool Deep-Dive Available
View full architecture diagrams, CLI cheatsheets, and production gotchas.
Open Model Serving & vLLM Hub ↗TOPIC 01
High-Throughput Inference with vLLM
PagedAttention, KV cache management, and continuous batching architectures for serving LLMs.
High-Throughput Inference with vLLM
Serving Large Language Models in production requires managing massive GPU memory footprints while minimizing Time to First Token (TTFT) and maximizing tokens per second per dollar.
The Memory Bottleneck: KV Cache
During autoregressive generation, keys and values computed for previous tokens must be stored in GPU VRAM (the KV cache). Standard implementations suffer from severe fragmentation (up to 60–80% wasted memory).
PagedAttention Architecture
vLLM solves memory fragmentation by adapting virtual memory paging from operating systems:
- Key-value vectors are split into fixed-size physical memory pages.
- Non-contiguous physical memory blocks are linked via page tables.
- Enables continuous batching: new incoming requests can be joined into existing running batches dynamically without waiting for sequences to finish.
TOPIC 02
The Serving Stack
Build a serving image and put it on a port, like production does.
What you'll practice
- Serve the Model on a Port — practice · intermediate
A command you'll meet
docker run -d -p 8000:80 vllm-serve:v1-p 8000:80 publishes the container on host port 8000 — the last hop between a
model sitting on a disk and a model answering requests. Open the task below for
the full walkthrough.
TOPIC 03
Scaling & Rollouts
Scale with the load you measure, and swap models without dropping a request.
What you'll practice
- Autoscale the Serving Tier — practice · intermediate
- Roll Out a New Model Gradually — challenge · advanced
A command you'll meet
cat ~/serving/hpa.yamlScaling on the wrong signal is the most expensive kind of guess. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Autoscale the Serving Tier
Model servers are slow to start and expensive to keep warm. Write the autoscaler that scales them on GPU utilisation instead of on request count.
Roll Out a New Model Gradually
A new model goes live to a slice of the traffic first, with a rule that sends it back if the metrics move the wrong way.