Model and Inference EngineeringEnd-to-end serving and modalitiesPrincipal
How should video inputs change capacity planning and admission for a multimodal model service?
By Amit Kumar2 min readWorked answer includedReviewed 26 Sept 2026
The question
Interview question
A multimodal assistant receives the same number of requests per second, but its p99 first-token latency doubles after users attach more video. Average text prompt length is unchanged. Trace the additional work, design an admission budget, and explain when reducing frames would invalidate the answer. Product wants to retain support for long clips.
Draft your approach first
Take a few minutes before you read the answer. Name the constraint that matters most, the failure you are designing for and how you would know it worked.
Reveal the worked answerWorked answer
A video request contains work that a text-token counter cannot see. The service may fetch and decode compressed video, choose frames, resize or crop them, run a vision encoder, and pass visual representations to the language model. The vision encoder converts image content into numerical features the model can consume. Its temporary activations and preprocessing buffers are separate from the language model’s key-value cache, which retains attention state during generation.
For a hypothetical 20-second clip, two sampled frames per second produce 40 frames, while 16 frames per second produce 320. That is eight times the frame count at the same clip duration and text length, before accounting for resolution or batching. It is not automatically eight times the wall time because processor and encoder behavior differ. vLLM’s multimodal input documentation and processor benchmark expose concrete model-specific paths. Measure the selected model rather than assume a universal tokens-per-frame formula.
Trace one request from upload to first token. Record bytes, frames received and selected, resolutions, CPU decode time, encoder queue and compute, visual token or embedding count, language prefill, scheduling wait, and KV occupancy. Break p99 down by modality and tenant. If the model server reports only text tokens, it can look healthy while a preprocessing pool is saturated or vision embeddings have made prefill larger. An average across text and video is especially misleading when a small expensive slice owns the tail.
Admission should have budgets for bytes, frames, resolution or derived vision work, total model context, deadline, and concurrent encoder occupancy. Apply cheap bounds before downloading or decoding unbounded media. The scheduler needs a cost estimate refined after preprocessing, then a way to reject or queue work without occupying scarce GPU memory while it waits. Separate interactive requests from long video analysis if their latency contracts differ. Keep image fetch and video decoding inside the authorized data and network boundary too.
Product can keep long clips, but it has to choose a representation. Sample frames or segments guided by the task, then evaluate whether the summary still catches short, decisive events. A violent scene, a one-frame error code, and a speaker change fail differently under uniform pruning. For tasks requiring frame-accurate evidence, process windows asynchronously with timestamps and cite the relevant window. If someone says “just reduce to one frame per second,” show the recall curve by event duration and the actual latency saved. A serving optimization that drops the only evidence is a product regression.
Related questions
Keep practising model and inference engineering
Follow another question in this area, or search the complete library.
Get my essays on AI engineering and distributed systems by email. Subscribe to ArchCrux