Unit 6 of 10 · about 3 hours · explain, measure

Workload distributions, cold start and steady state

A model reconciled on one shape at steady state says nothing about serving. Distributions set which shapes matter; cold and warm separation decides which trials count.

You'll be able to

  • Describe a serving workload by prompt, output, batch, dtype and shape medians plus an arrival note, citing production-style spreads.
  • Separate cold cost (compilation, weight load, allocator and autotune warmup) from warm steady state, and state which trials each keeps.
  • Record a cold and a warm trace for one workload and show where the section checkpoint's reconciliation starts.

Covers

Prompt, output, batch, dtype, shape and arrival distributionsCold start, compilation, autotuning, cache warmup and steady state
1

Read

In this order, only the parts listed

0 of 4 done

  1. Prompt-length spread and day-long load variationEtalon

    Section 4.1 (LMSys-Chat-1M medians 417 and 1418 prefill tokens) with Figure 1; Section 5.1 (hourly runs over 24 hours for traffic variance)

  2. Compilation pipeline: what a cold run pays forHow to Scale Your Model - Inference

    A Thousand-Foot View of the TPU Software Stack (tracing to StableHLO, HLO, LLO and machine code)

    The chapter describes the TPU stack (JAX tracing to StableHLO, then XLA). On a GPU the same cold costs come from framework tracing and graph capture, CUDA or Triton compilation, module loading and autotuning. The chapter gives no warmup protocol, so pair it with the next item for the measurement rule.

  3. Cold and warm separation with environment captureGPU Microbenchmark and Kernel Suite

    Architecture constraints (compilation, autotuning, cold and warm results separated); Milestone B (cold, warm and end-to-end invocation recorded separately); Measurement requirements

  4. Medians, eviction and the prefill-generate ratioHow to Scale Your Model - Inference

    Median-length examples (prefill 8192 with decode 512 and 4096), the eviction math and the disaggregated prefill to generate ratio

2

Focus on

  • Report medians with spread, not points: 417 versus 1418 prefill tokens at median versus p90, 2k to 32k sliders, 24 hourly runs.
  • Cold pays tracing plus staged compilation, weight loading, allocator growth and autotuning; none of it belongs in a steady-state median.
  • Prefill length spread punishes whole-batch prefill (padding, blocking); eviction math (96 tokens per step at , , ) turns medians into capacity.
Common mistakes · 3
  • Sweeping batch at fixed length and calling it a workload. Prompts spread widely (417 median against 1418 at p90 in LMSys-Chat-1M) and decode lengths vary as much (the applied chapter's examples run 512 and 4096), so fix both axes.
  • Warming up with the timed shapes. Autotuning on the benchmark shapes leaks tuning into the measurement; the project schema records autotuning separately from warm trials.
  • Keeping the first trial. First compile and allocation can exceed steady state by orders of magnitude; converge warmup first, then record.
3

Try it yourself

Closed-book, before checking anything

Closed-book, write the workload card for , , : sequences finishing per step 1/64, tokens evicted per step 80, and the cold trials (first compile, first load, first autotune) you discard before the warm median.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Which workload spreads does this unit cite, and why medians plus spread?Answer

    LMSys-Chat-1M 417 median with 1418 p90 prefill tokens, 2k to 32k sliders, hourly runs over 24 hours. Points hide the padding, blocking and queueing that spreads cause.

  2. 2.What belongs in cold cost but never in a warm median?Answer

    Tracing and staged compilation, weight loading, allocator growth and autotuning. Warm trials start after these converge.

  3. 3.At , , , how many tokens leave the cache per step, and why?Answer

    96: sequences finish per step, each evicting tokens, so .

  4. 4.Why did Etalon run public APIs hourly for 24 hours instead of once?Answer

    Traffic and load vary through the day; one run confuses time-of-day effects with system differences.

You're done when

Your workload card states medians, spread, arrival assumption and the cold-warm split, and two traces filed under it reconcile warm medians with the roofline within stated uncertainty.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 6 more in the section
  • How to Scale Your Model - InferenceJAX Scaling Book · primary

    Work through the single-request, batching, key-value memory and parallelism arithmetic. Recompute every quantity for the small model and workload used by the track project, keeping symbols, units and assumptions visible.

  • EtalonEtalon Authors · support

    Read the latency metric definitions, their pitfalls and fluidity-index. Add TTFT and TPOT SLOs to a small load generator, and show why peak token throughput can rank two systems differently from an SLO-qualified rate.

  • GPU Microbenchmark and Kernel SuiteRoadmap-Final · support

    Adopt the project harness schema, architecture constraints and hardware tiers now. Implement only the environment manifest, independent references, raw-trial storage and the initial operation and byte models in this stage.

Also in this section

  • AI Performance Engineering - Start HereWafer · reference

    A curated, dated index. Its Start Here list names the readings this section already assigns; use the later sections only to find a primary source for a later section, never as the reading itself.

  • Transformer Inference ArithmeticKipply · required

    Reproduce the FLOP, parameter-byte, key-value-byte and communication estimates for dense transformer inference. Compare the formulas with an instrumented framework trace and explain model residuals instead of fitting constants after measurement.

  • Efficiently Scaling Transformer InferenceMLSys · required

    Study the latency, memory and parallelism model. Use the paper to derive a batch and parallelism crossover for your workload, while reserving distributed execution for GPU-9.

  • How to Scale Your Model - TrainingJAX Scaling Book · required

    Work Some Problems to Work Questions 1 to 3 for training-step parameters, Adam and activation bytes and step time; read Data Parallelism and Fully-Sharded Data Parallelism for the comms-bound batch rule.

  • Amdahl's lawWikipedia · reference

    Read Definition and Derivation for the overall-speedup formula with the worked share examples; apply it to kernel time shares at fixed workload.

  • DistServe: Disaggregating Prefill and Decoding for Goodput-optimized LLM ServingZhong et al. (OSDI 2024) · support

    Read Section 1 with Figure 1 for per-GPU goodput: the highest request rate served while a target share of requests meets the TTFT and TPOT SLOs.