Apply quantization to shrink a model's memory footprint, then measure the accuracy tradeoff.
Fast & Efficient LLM Inference with vLLM
Instructors:
Earn an accomplishment with PRO
- Intermediate
- 1h38m
- 9 Video Lessons
- 3 Code Examples
- 1 Graded Assignment PRO
- Earn an accomplishment with PRO
- Instructors:
Red Hat- Learn more aboutMembership PRO Plan
What you'll learn
Serve a model with vLLM and see how efficiently it handles many concurrent requests using techniques like continuous batching and PagedAttention.
Benchmark your deployment and measure model quality so you can make informed tradeoffs between speed, cost, and accuracy.
About this course
Introducing Fast & Efficient LLM Inference with vLLM, a short course built in partnership with Red Hat and taught by Cedric Clyburn, Senior Developer Advocate at Red Hat.
Serving open-source LLMs efficiently, for many users at low latency and reasonable cost, comes down mostly to memory management. Two things compete for that memory: the model weights and the KV cache. A 70-billion-parameter model takes around 140 GB of memory just for the weights, while the KV cache grows with every request you serve. In this course, you'll learn to shrink the weights through quantization, and serve the model with vLLM, the widely adopted open-source serving system, taking advantage of the memory management techniques it provides like PagedAttention and prefix caching.
You'll run the full optimize-deploy-benchmark workflow on a real model: compressing an open-source Qwen model with LLM Compressor, serving it with vLLM, and benchmarking your deployment under realistic traffic using GuideLLM and lm-eval.
In detail, you'll:
- Understand why efficient LLM deployment matters, what happens during inference, what the KV cache is, and how the GPU memory hierarchy shapes performance.
- Explore LLM optimization fundamentals and how compression techniques like weight and activation quantization enhance a model’s throughput and latency while preserving accuracy.
- Use LLM Compressor to quantize a full-precision model, compare its size before and after, and use perplexity to measure whether the compressed model still performs well.
- Learn the three core techniques behind modern LLM serving: continuous batching to keep the GPU busy, PagedAttention to manage the KV cache without waste, and prefix caching to skip recomputation when requests share content.
- Connect to a vLLM inference server, send requests through the OpenAI-compatible API, and watch vLLM’s memory management techniques working live in the metrics.
- Benchmark your deployment under load with GuideLLM and evaluate model quality with lm-eval.
By the end, you'll have run the full optimize-deploy-benchmark workflow on a real model and built the intuition to navigate the tradeoffs between accuracy, speed, and cost.
Who should join?
ML engineers, platform engineers, and developers who need to deploy open-source LLMs efficiently. Familiarity with Python and basic LLM concepts (tokens, inference, GPU usage) is recommended.
Instructors
Want to learn more about AI?
Keep learning with updates on curated AI news, courses, and events, as well as Andrew Ng’s thoughts from DeepLearning.AI!