- 4,096sequences per step on the largest engine tier
- 524,288tokens per step on the same tier
- ~4,100sequences active when nothing was finishing
The first time the runtime ran the largest engine tier I built for the dense 7B model under full load, the token rate and the completion counter disagreed. The GPU was generating at full speed and finishing nothing.
What was happening
Continuous batching lets the engine admit a new sequence into any step that has room. With no limit on admissions, the runtime filled every slot, and each step then advanced four thousand sequences by one token each. Every sequence made progress, so the token rate was real, and every sequence made progress so slowly that none of them reached its end. The workload needed finished sequences, with their outputs written back, and a steady state of four thousand half-finished ones was worth nothing to it.
Each step moves every sequence one token. The token rate is real, and no sequence reaches its end.
The same work goes to fewer sequences, which finish, write back and free their slots for the next ones.
The latch
The fix is a high-water and low-water latch on active slots.
The two thresholds come from the provisioner with the engine, both or neither, so an engine cannot be provisioned with half a policy. A second defect was fixed in the same pass: finished slots are now reclaimed before every allocation, which ended a starvation in which allocation failures spiked while one to three slots stayed free.
Who enforces what
The batching contract is split between the two halves of the runtime. The token budget rule has a regression test, because an earlier version let a budget squeeze out sequences that were already mid-generation.
Behind the admission rule is a ladder of backpressure in the decode loop.
What this demonstrates
Choosing the right metric.
Tokens per second is what an inference runtime advertises, and under a batch-oriented workload it can be maximised while delivering nothing.
The latch trades a little peak rate for sequences that finish, and the runtime's two-card figures were measured with it in place.
The latch and the split of batching duties were my design; AI coding agents, a mix of frontier and open-source models, implemented them under my governance system.