vLLM (Kwon et al., 2023) stores the key-value cache in fixed-size blocks, like virtual memory pages, instead of one big contiguous buffer per request. A sequence claims as many blocks as its tokens need.
Implement vllm_num_blocks(seq_len, block_size), the number of blocks a sequence occupies.
Use integer ceiling division by the block size.
No results yet
Run your code to check it against the examples, or submit to run every test.