Skip to content
Preptima

Inference, Cost & Latency interview questions

Token economics, streaming and time-to-first-token, batching and KV cache, quantisation trade-offs, and routing between models.

5 questions in Generative AI & Large Language Models.

medium1

hard4

hardConceptDesign

What is the KV cache, and why does it decide how many users one GPU can serve?

The KV cache stores the attention keys and values of every token a sequence has seen, so decoding need not recompute them. It grows with tokens per sequence and with concurrent sequences, and after the weights it fills GPU memory, so tokens in flight, not requests, set how many users one GPU serves.

4 minmid, senior, staff
hardDesignScenario

Do you use one large model, or a smaller model with retrieval? How do you decide?

Decide from the task. For grounded work over your own corpus, quality is set by what reaches the context, so retrieval dominates model size and a smaller model usually suffices. Keep the larger model for long multi-step reasoning, and treat routing as a second system to evaluate and monitor.

5 minmid, senior, staff