← Lab

LLM Inference Visualizer

Tune model size, GPU, batch size and context length to see time to first token, tokens per second, KV cache size and GPU memory change.

Loading demo…

About this demo

Generating text with a large language model has two phases. Prefill processes the whole prompt in parallel and is limited by compute. Decode produces one token at a time and is limited by memory bandwidth, because every step reads all of the model weights plus the KV cache.

Move the controls to see time to first token, per-token latency, throughput and GPU memory respond. Larger batches raise throughput because the weight reads are shared across requests, until compute or the KV cache becomes the limit.

This is a simplified roofline model with idealized multi-GPU scaling. Real systems differ because of kernel efficiency, communication overhead, paged attention and scheduling.