Dynamic Batch Inference
Asked at xAI · LLMs & Prompt Engineering · Difficulty: Medium · Last asked Dec 28, 2025
An inference service receives requests one at a time, but a model runs far more efficiently on a batch. Build the scheduling core of a dynamic batcher: it collects incoming requests and releases a batch to the model when the batch is full or when the oldest request has waited long enough, then hands each output back to the request it belongs to.
Loading the problem…
More xAI interview questions
- Async Comparator for Answer Ranking
- Design ChatGPT: A Conversational LLM Serving Platform
- Game of Life
- Distributed Matrix Multiplication — DP and FSDP
- Tweet Insight Pipeline with Rate-Limited LLM Classification
- Distributed Matrix Multiplication with Data Parallel and FSDP Simulation