Introduction to GPU Inference
Welcome
Hello, Athos here. Welcome to my course, Introduction to GPU Inference. I put this course together to share what I know about inference, and I added a few extras to make the experience more interactive.
The lessons are short, and each one has diagrams you can run yourself. If you’d rather listen, the lessons can be read aloud. I’m adding lessons as I write them, so there’s more on the way. When you’re ready, start with Chapter 1: Foundations.
I hope you enjoy the course, and have a wonderful day!
Chapter 1: Foundations4 lessons complete
- From prompt to reply6 min
What happens between sending a prompt and reading the reply.
How one GPU serves several requests together, and how that affects the speed of each.
- Measuring inference7 min
What time to first token, time per output token, throughput and percentiles measure, and how they relate to each other.
- Inference at scale9 min
The hardware behind a service with millions of users, how requests are distributed across it, how demand varies through the day and what it costs.
Chapter 2: Serving inference4 lessons complete
- Serving architectures10 min
Prefill and decode, aggregated and disaggregated serving, and static and adaptive allocation by cold or hot swap.
- Inference engines6 min
What an inference engine does, how its configuration divides a GPU's memory into slots, and a few widely used engines.
What a serving framework does, and how Narwhal switches engines between prefill and decode without reloading the model.
Install Narwhal, run four llama.cpp engines and a router on your own computer with narwhal dev, send them prompts and watch an engine switch roles.
Chapter 3: Inference Deep DiveComing soon
- Capacity and saturation
Athrael.net