Three numbers to watch
Latency is how long one request takes. Throughput is how many tokens or requests the system handles over time. Cost combines infrastructure, model usage, and operational overhead.
Where performance goes
Prefill processes the input context; decode generates output tokens one step at a time. Long contexts increase memory pressure, while large batches improve utilization but can hurt tail latency. Measure both average and p95 latency.
Serving engines can improve scheduling, batching, and memory management. Quantization may reduce cost but must be tested for quality and hardware compatibility.
Optimize from traces and representative workloads, not from a single benchmark.