← Questions
Inference loop with continuous batching over a mock model
0
I was asked this
No reports yet. Sign in to say where you were asked it.
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.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
