Dynamic Batching for Language Model Token Prediction

Given a 'mock language model' interface: Each time you input a batch of generated token prefixes, the model returns the next token (or tokens) for each sequence. Implement a batch sampling/decoding pr...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: