Lesson deck
Request lifecycle, metrics and the roofline flashcards
Reviewing needs JavaScript. You can read every card in the list below.
Loading your cards...
Back to the lesson13 cards in this deck
Read all 13 cards as a list
- Front
- List the steps of one request and say which sets TTFT and which sets ITL.
- Back
- Tokenize, queue, prefill, decode loop, stream. TTFT is queueing plus prefill (plus network, as a client sees it). ITL is the decode step time.
- Front
- How do you compute inter-token latency and end-to-end latency?
- Back
- ITL = (e2e latency − TTFT) ÷ (output tokens − 1). End-to-end latency = TTFT + generation time.
- Front
- Why is a throughput figure alone not a result?
- Back
- It needs the token type (input or output), the concurrency, and the TTFT and ITL users saw at that load. Bigger batches raise throughput and can lengthen each wait.
- Front
- What is goodput?
- Back
- Requests per second that meet the latency targets. 30 req/s with 90 percent on target gives 27 good req/s, more than 40 req/s with 60 percent on target (24).
- Front
- Cost per million tokens formula, and what moves it?
- Back
- GPU price per hour ÷ (tokens per second × 3600) × 10⁶. It falls as utilization rises: a quarter of the load gives four times the cost per token.
- Front
- How many FLOPs and bytes does one decode token need for P parameters?
- Back
- About 2P FLOPs (a multiply and an add per weight, attention aside) and P × bytes-per-weight bytes read from memory each step.
- Front
- Define arithmetic intensity and the ridge point.
- Back
- Intensity is FLOP per byte moved. The ridge is peak FLOP/s ÷ peak bandwidth. Below it a workload is memory-bound, above it compute-bound.
- Front
- What is decode intensity at batch B with b bytes per weight?
- Back
- About 2B ÷ b, so exactly B for BF16. It reaches the ridge at B* = ridge × b ÷ 2.
- Front
- Is prefill always compute-bound?
- Back
- No. Prefill intensity is about the prompt length n for BF16 weights. Compare n with the ridge: a 4,000-token prompt is compute-bound, a 30-token one is not.
- Front
- Which datasheet number do you use for the ridge, and what is the trap?
- Back
- The dense tensor-core figure. Listed numbers are often "with sparsity", about twice the dense figure. Take bandwidth and FLOPs from the datasheet of the exact part.
- Front
- How do you bound batch-1 decode speed?
- Back
- Step time ≥ weight bytes ÷ (bandwidth × number of GPUs). Example: 16 GB over 3.35 TB/s gives 4.8 ms, so at most about 209 tokens per second.
- Front
- What does the weights-only ceiling ignore?
- Back
- The KV-cache read (grows with context and batch), inter-GPU communication, quantization scale overhead, and kernels that reach only part of peak bandwidth.
- Front
- Name the four families of serving techniques.
- Back
- Do less work, move fewer bytes, use hardware better, run reliably. Each answers a roofline question: bytes cut decode time, batching raises intensity, caching skips prefill.