All jobs / AI engineer / Open-Source & Local Models

AI engineer interview question · 3–5 years

A self-hosted model loads fine on the GPU and answers short prompts. With long documents, or several users at once, it runs out of memory.

A self-hosted model runs out of GPU memory only on long prompts or with several users. Why, and how do you plan capacity properly?

The strongest answer

Weights are only part of it: the KV cache grows with context length and with concurrent sequences. I budget weights plus cache for the longest context and the concurrency I must serve, and cap both

Why it works

Exactly — the model “fitting” is only the start. Serving memory is the weights plus per-token cache for everything in flight, and limits on context and concurrency keep you inside it.

What a good answer covers

Answers that fall short

Who gets asked this

More Open-Source & Local Models questions