Inference loop with continuous batching over a mock model

0
Remix

You get a model function that takes a batch of sequences and returns one next token for each. Write the serving loop: keep a fixed number of batch slots full, retire a sequence when it hits its token limit or a stop token, and immediately refill freed slots from the request queue.

xAITechnical phone screenMediumLast asked Dec 2025
No answer yet. Write the first one; the best answer gets endorsed.