Gradium × TensorTonic Voice Challenge is open for registration.Register now
30 Problems

Inference Engineering

Implement attention variants, sparse experts, decoding, quantization, serving schedulers, and distributed inference systems from first principles.

5 Easy13 Medium12 Hard

Unlock the full study plan

Upgrade to Pro to access the full curriculum.

Upgrade to Pro
6 sections

What you will learn

Inference engineering is the work of serving large language models quickly and cheaply. This plan has 30 problems in six sections covering attention variants, efficient Transformer components, KV caching and decoding, quantization, batching and serving metrics, and distributed inference.

Prerequisites

You should know Python, NumPy or PyTorch, and how attention works in a Transformer. The attention mechanism and the KV cache are good preparation.

The sections, in order

  1. Attention architectures: scaled dot-product, multi-head, multi-query, grouped-query and multi-head latent attention.
  2. Efficient Transformer components: rotary embeddings for decoding, FlashAttention with online softmax, sampling, and mixture-of-experts routing and dispatch.
  3. KV cache and decoding: decoding with a KV cache, cache memory for each attention type, PagedAttention block allocation, prefix caching and speculative decoding.
  4. Quantization and GPU performance: INT8, per-channel, group-wise INT4 and block-wise FP8 quantization, and roofline analysis of prefill and decode.
  5. Batching and serving metrics: latency percentiles, TTFT, TPOT and throughput, dynamic and continuous batching, and chunked prefill.
  6. Distributed inference systems: memory and GPU-count estimates, tensor and expert parallelism, disaggregated prefill and decode, and cost under a latency target.

Where to go next

Write the kernels behind these systems with the Triton study plan, or see the full training-to-serving stack in Language Modeling from Scratch.