AI engineering and inference

Work through each chapter, practice the ideas, and finish its challenge.

— XPLoading progress…
← All courses

9 chapters · 54 lessons · 0 completed

E1Inference basics0/6 lessons complete

Trace a generation request through prefill and decode and distinguish latency, throughput and hardware bottlenecks.

  1. E1.1The request path
  2. E1.2Prefill
  3. E1.3Decode
  4. E1.4Latency measurements
  5. E1.5Throughput and goodput
  6. E1.6Compute and bandwidth
E2The KV cache0/6 lessons complete

Calculate KV-cache memory and explain how layers, KV heads, context length and concurrent sequences affect it.

  1. E2.1What is cached
  2. E2.2Growth with context
  3. E2.3Concurrent sequences
  4. E2.4MQA and GQA
  5. E2.5Precision and overhead
  6. E2.6Memory budgeting
E3Paged attention0/6 lessons complete

Allocate logical token blocks to physical KV-cache blocks and quantify internal waste and shared-prefix behavior.

  1. E3.1Contiguous reservation
  2. E3.2Blocks and tables
  3. E3.3Internal fragmentation
  4. E3.4Sharing prefixes
  5. E3.5Copy-on-write
  6. E3.6Allocation and release
E4Scheduling and continuous batching0/6 lessons complete

Trace static and iteration-level schedules and explain chunked prefill, preemption and latency tradeoffs.

  1. E4.1Static batches
  2. E4.2Continuous batching
  3. E4.3Prefill interference
  4. E4.4Chunked prefill
  5. E4.5Preemption
  6. E4.6Service objectives
E5Prefix caching0/6 lessons complete

Identify reusable prompt prefixes, calculate saved prefill work and distinguish token savings from hit rates.

  1. E5.1Reusable prefixes
  2. E5.2Hash-based lookup
  3. E5.3Radix trees
  4. E5.4Hit rates and saved tokens
  5. E5.5Prompt layout
  6. E5.6Limits and isolation
E6Quantization0/6 lessons complete

Estimate weight memory at different precisions and explain quantization error, scales and calibration.

  1. E6.1Floating formats
  2. E6.2Integer quantization
  3. E6.3Granularity
  4. E6.4GPTQ and AWQ
  5. E6.5Containers and KV state
  6. E6.6Quality and runtime
E7Speculative decoding0/6 lessons complete

Trace draft-and-verify decoding, explain distribution-preserving acceptance, and calculate a simplified speedup.

  1. E7.1Draft and verify
  2. E7.2Acceptance tests
  3. E7.3Rejection correction
  4. E7.4Expected progress
  5. E7.5Time and speedup
  6. E7.6Variants and measurement
E8Serving at scale0/6 lessons complete

Compare kernel, parallelism and disaggregated-serving choices using memory, communication and latency constraints.

  1. E8.1IO-aware attention
  2. E8.2Tensor parallelism
  3. E8.3Pipeline parallelism
  4. E8.4Data parallel replicas
  5. E8.5Disaggregated prefill and decode
  6. E8.6Engine comparisons
E9Cost and operations0/6 lessons complete

Calculate cost per token, estimate stable concurrency and define operational metrics tied to user-facing objectives.

  1. E9.1Cost units
  2. E9.2Capacity and concurrency
  3. E9.3Utilization
  4. E9.4Autoscaling
  5. E9.5Observability
  6. E9.6Quality in production