Skip to content
nonconvexcard

LLM Ops & Inference Mathematics

Serving arithmetic: arithmetic intensity and the roofline, KV-cache growth, batching and queueing, and the acceptance algebra of speculative decoding.

3 topics11 problems (4% of the database)assumes LLMs

Level 2 — Advanced

Level 3 — Graduate

Problems (11)

Open in the browser
SolvedProblemTypeDifficultyTime
Count the FLOPs of a forward passNumericalFoundation15 min
Derive the attention crossover lengthProofBeginner15 min
KV cache sizing with MHA and GQANumericalBeginner30 min
Ridge point and the batch size needed to saturateNumericalBeginner15 min
Apply Little's law to a serving targetProofIntermediate30 min
How many users fit on one GPUNumericalIntermediate30 min
Single-stream decode latency floorsNumericalIntermediate30 min
Build a serving capacity calculator runCodingAdvanced3 hours
Choosing the draft lengthNumericalAdvanced30 min
Exactness of speculative sampling with a modified acceptance rule abyssProofAdvanced1 hour
The cost of waiting for the slowest sequenceProofAdvanced1 hour