batching VS. continuous batching
batching是所有requests的output都生成完毕之后,才能开始处理下一个batch。一般要做input padding,要等待凑够batch才运行(也有超时bar)。
continuous batching是每完成1个request,就让1个新request加入到batch里。好处:可以让decode阶段的一个batch的token数目不减少,确保计算密度。
continuous batching VS. chunked prefill
VLLM里,前者是prefill优先。新到的prefill请求,打断所有decode请求。且prefill和decode不batching。
后者是decode优先。且prefill请