Genai Applied
Sign in Get my playbook

Track 13 · Production

13.2 Inference Engineering

60 topics in 27 parts. Use it as a checklist before an interview, or as a map of what to learn next.

  • CCritical
  • HHigh
  • MMedium
  • NNew 2026

01Inference Optimization11 topics

  • vLLM: PagedAttention + continuous batchingC
  • TGI (Text Generation Inference): HuggingFace servingH
  • SGLang: RadixAttention, 20-40% better throughputN
  • Triton Inference Server: NVIDIA, multi-modelM
  • Speculative decoding: draft + verify, 2-4× speedupH
  • Flash Attention 2/3: tiling, O(n) memoryH
  • Tensor parallelism: split weight matrices across GPUs (row/column parallel)M
  • Pipeline parallelism: split layers across GPUs, micro-batching to hide bubbleM
  • Multi-GPU serving: NVLink (fast GPU-GPU), NVMe offload (weights to SSD)M
  • Batching strategies: static vs continuous batchingH
  • Prefill-decode disaggregation: 2-6× throughputN

02What Is LLM Inference / Training vs Inference2 topics

  • Inference = running a trained, frozen model to generate a responseC
  • Training: throughput-oriented, batch-flexible. Inference: latency-oriented, demand-drivenC

03How an LLM Works — Prefill vs Decode3 topics

  • Tokenize → embed → transformer blocks (attention + FFN)C
  • Prefill: whole prompt in one pass, compute-boundC
  • Decode: one token at a time, memory-bandwidth-boundC

04Where Inference Runs — CPU vs GPU vs TPU2 topics

  • GPUs: default choice, CUDA (NVIDIA) / ROCm (AMD)H
  • TPUs: Google's tensor accelerators, best inside GCP onlyM

05Key Metrics: TTFT, TPOT, Throughput3 topics

  • TTFT (Time to First Token) — dominated by prefillC
  • TPOT/ITL — inter-token latency during decodeC
  • Throughput vs latency — the fundamental tradeoff every optimization makesC

06Serverless vs Self-Hosted2 topics

  • Managed API: zero infra, pay-per-token, fastest to shipC
  • Self-hosted (vLLM/SGLang): full control, owns the ops burdenC

07Choosing the Right Model & GPU2 topics

  • Smallest model that clears the accuracy + context-length bar winsH
  • NVIDIA (L4/A100/H100/H200/B200) vs AMD (MI250X/MI300X/MI350X)H

08Calculating GPU Memory for Serving2 topics

  • Weights: params × bytes-per-param (FP16/INT4 etc.)C
  • KV cache scales with context length × batch size — can exceed weight sizeC

09Choosing a Framework / BYOC / On-Prem3 topics

  • Serving frameworks provide batching/KV-mgmt/API layer "for free"H
  • BYOC: vendor-operated software, runs inside your cloud accountM
  • On-prem: full control, for air-gapped/strict-regulatory casesM

10LLM Distillation3 topics

  • Small student model trained to mimic a larger teacher's soft labelsC
  • vs. quantization: distillation shrinks the architecture, not just precisionH
  • Composes with quantization — distill, then quantize againM

11OpenAI/Anthropic-Compatible APIs2 topics

  • vLLM/SGLang/TGI expose OpenAI-shaped endpoints by defaultC
  • Enables the vendor-agnostic gateway pattern (LiteLLM) with zero client changesH

12Inference Parameters — Performance Angle2 topics

  • max_tokens can reserve KV cache space upfront in some frameworksM
  • Structured-output grammar constraints add per-token decode overheadM

13Static, Dynamic & Continuous Batching1 topics

  • Continuous batching: requests join/leave mid-flight — 2026 production standardC

14PagedAttention1 topics

  • Block-based KV cache storage, OS-paging-style — eliminates fragmentationC

15Speculative Decoding1 topics

  • Small draft model proposes tokens, large target model verifies in parallelH

16Prefill-Decode Disaggregation1 topics

  • Separate GPU pools for compute-bound prefill vs memory-bound decodeC

17Prefix Caching & Inference Routing2 topics

  • Reuse KV cache for shared prompt prefixes across requestsH
  • Route by cache locality, queue depth, KV pressure — not round-robinH

18KV Cache Offloading1 topics

  • Move idle sessions' KV cache to CPU RAM to hold more concurrent sessionsM

19Data, Tensor, Pipeline, Expert & Hybrid Parallelism3 topics

  • Tensor parallelism: split weight matrices across GPUs (model too big for one)C
  • Expert parallelism: MoE experts placed on different GPUs (DeepSeek V3, Mixtral)H
  • Hybrid: combine multiple types for frontier-scale (400B+) modelsH

20Offline Batch Inference & Benchmarks1 topics

  • No latency constraint → maximize throughput only, large static batchesM

21GPU Architecture Fundamentals2 topics

  • SMs, warps (32 threads), memory hierarchy (registers → shared → L2 → HBM)H
  • Tensor cores: hardware built for the matmul-accumulate patternH

22FlashAttention2 topics

  • Tiles attention computation, never materializes full N×N matrix in HBMC
  • Direct enabler of today's long-context windowsC

23Choosing a Kernel Tool1 topics

  • cuBLAS/cuDNN (hand-tuned) · Triton (Python-like custom kernels) · Mojo/MAXM

24Distributed Inference & Observability2 topics

  • Inference across GPUs/workers/nodes/regions for scale and reliabilityH
  • Same LLMOps observability stack, viewed from the infra sideM

25Fast Scaling & Build/Maintenance Cost2 topics

  • Warm standby + snapshotting to fight slow GPU cold-startsH
  • In-house inference platform = ongoing eng investment — same TCO logic as System Design trackH

26Multi-Model Pipelines & Multi-Cloud2 topics

  • Chaining models (router → generator → reranker → moderator) trades quality for latency hopsM
  • Cross-region/multi-cloud for latency, availability, and cost arbitrageM

27InferenceOps & Management1 topics

  • Deployment playbooks, capacity planning, inference-specific incident responseH

All 53 modules

Practise it

Knowing it is half.
Saying it is the rest.

Run a realistic voice interview with an AI panel in the Interview Room, then read a scored report on every answer.