Skip to content
inference.academy

glossary/scale/pipeline-bubble

Pipeline bubble

also bubble, pipeline stall

The time pipeline stages sit idle because the first micro-batch has not reached them yet or the last has already left. With p stages and m micro-batches in flight the bubble is about (p-1)/(m+p-1) of a batch, GPipe's formula, which is why a pipeline needs many more micro-batches than stages. Continuous batching hides it during decode by never letting the queue run dry, and chunked prefill hides it by feeding stages long chunks; what a pipeline cannot hide is that each stage reads its weights once per micro-batch, so its per-token latency stays that of the whole model.


(p-1)/(m+p-1)

Share of a batch spent idle with p stages and m micro-batches; GPipe found it negligible once m is at least 4p.


See it happen


Related