Prefill vs decode
Two very different workloads.
The first step has a name: prefill. Every step after: decode. Same model, same weights, very different work.
The arithmetic, once
A step with tokens needs roughly FLOPs for a model with parameters, and has to read the weights ( bytes in bf16) plus the cache no matter what is:
They cross at , the accelerator’s ratio of compute to bandwidth. For an H100 SXM that’s about tokens per step. Decode runs at per sequence.
Both are round numbers. The 1 GB input embedding table is only looked up, so a step streams about 15 GB of weights, and SGLang runs the output layer only at a prompt’s last position, so a 2,000-token prefill is closer to 29 TFLOP than 32. The two shrink together, so the balance point barely moves. The rates are the datasheet’s peaks; real kernels reach less of both.