Pidoku
2The Physics of Inference
On this page

The Physics of Inference

Module 28 lessons~8h 35m

Lessons, in order

2.a Model Anatomy: Parameters, Weights, ActivationsModule 10 builds a neural network from scratch. For this lesson you only need these words: 1h 2.b Tensors and the Forward PassThis lesson introduces the vocabulary used for the rest of the material. Skim the table now and come back when a word appears: 1h 2.c Latency, Throughput, and the Metrics That MatterLatency is how long one thing takes. Throughput is how many things you finish per unit time. They are different, they are often in conflict, and for LLMs you need at least four numbers, not … 1h 15m 2.d Batching: The Central TradeoffBatching means processing several requests in one pass through the model, so the weights are read from memory once and used many times. 1h 2.e Compute vs MemoryEvery computation has two costs: doing the arithmetic and moving the data to where the arithmetic happens. One of them takes longer. Whichever it is, that is your bottleneck, and optimizing … 1h 15m 2.f FLOPs, Bandwidth, and Arithmetic IntensityThis lesson is the quantitative heart of Module 2. Lesson 2.e defined arithmetic intensity and the ridge point; this one teaches you to count FLOPs and bytes for any operation and any model, … 1h 30m 2.g CPU vs GPUFor inference, the GPU wins — but understanding why tells you when it doesn't. 1h 2.h From Pixels to TensorsGPUs were invented to draw video-game frames. Drawing a frame means running the same small calculation for millions of pixels, sixty times a second. Neural networks turned out to need … 35 min

About this module

The handful of ideas every later module is built on: what a model is made of, what running it means, the metrics that judge it, why batching is the central trade-off, why memory bandwidth usually matters more than raw compute, and why that makes the GPU the machine for the job.

Lessons#

#LessonTime
2.aModel Anatomy: Parameters, Weights, Activations60 min
2.bTensors and the Forward Pass60 min
2.cLatency, Throughput, and the Metrics That Matter75 min
2.dBatching: The Central Tradeoff60 min
2.eCompute vs Memory75 min
2.fFLOPs, Bandwidth, and Arithmetic Intensity90 min
2.gCPU vs GPU60 min
2.hFrom Pixels to Tensors35 min

Previous: The Big Picture · Next: Computer Foundations

↑↓ navigate↵ openesc close

100% drag to pan · scroll or pinch to zoom · double-click to zoom in