Why one prefill fills the GPU
Because of the parallelized processing of all prompt tokens, a single prefill step can already saturate GPU utilization. [1]
What the default strategy does
Consequently, in the default chunked-prefill strategy of vLLM, each prefill chunk contains only prompt tokens of a single request. [2]
The next request in line has to wait until the previous prefill phase has been finished before its own prefill phase can start. [3]
Why parallel prefill is not a clean fix
A straightforward solution would be to process prefill chunks of different requests in parallel. [4]
Any additional prefill executed in parallel would likely prolong the prefill duration a bit and slow down any concurrent decode-requests even further. [5]
This approach fails, however, when the next request in line has a long prompt too. [6]
Sources
- The TNG Technology Consulting source says: Because of the parallelized processing of all prompt tokens, a single prefill step can already saturate GPU utilization. How Long Prompts Block Other Requests - Optimizing LLM Performance
- The TNG Technology Consulting source says: Consequently, in the default chunked-prefill strategy of vLLM, each prefill chunk contains only prompt tokens of a single request. How Long Prompts Block Other Requests - Optimizing LLM Performance
- The TNG Technology Consulting source says: The next request in line has to wait until the previous prefill phase has been finished before its own prefill phase can start. How Long Prompts Block Other Requests - Optimizing LLM Performance
- The TNG Technology Consulting source says: A straightforward solution would be to process prefill chunks of different requests in parallel. How Long Prompts Block Other Requests - Optimizing LLM Performance
- The TNG Technology Consulting source says: Any additional prefill executed in parallel would likely prolong the prefill duration a bit and slow down any concurrent decode-requests even further. How Long Prompts Block Other Requests - Optimizing LLM Performance
- The TNG Technology Consulting source says: This approach fails, however, when the next request in line has a long prompt too. How Long Prompts Block Other Requests - Optimizing LLM Performance