← ml-viz minivllm repo

Inference Playground

Why does an LLM server need continuous batching, a paged KV cache and CUDA graphs? Drag the sliders and watch it happen. Numbers tagged measured come from my own engine, minivllm, benchmarked on a Tesla T4. Anything tagged simulated is a model fitted to those measurements.

Static vs continuous batching simulated

Same 64 requests, same arrival times, same GPU model. Each row is a batch slot. Hatched time is a slot that finished its request but cannot take a new one.
time

Static batching

wait for a batch, run it until the longest reply ends

Continuous batching

a freed slot is refilled on the very next step
prefill decode, long reply decode, short reply slot idle, waiting on batch requests waiting in queue (bottom strip)

What I actually measured measured

Stage 4 of minivllm, the same mixed workload, 64 requests, all present at t=0 (closed loop). Goodput in tokens per second.
staticcontinuous
How well does the simulator match? (calibration check)
The simulator has four fitted constants (decode step time and prefill cost). Fitted on these runs, so this checks the fit, not an independent prediction. The ratio between the policies is the part to trust. Absolute levels drift at large batch sizes, where the real engine slows down more than the model does.