What is Prefill-decode Disaggregation?
mainPrefill-decode (P-D) disaggregation is an experimental technique where the prefill phase (initial prompt processing) and the decode phase (token-by-token generation) are computed on separate instances.
How it works:
- Prefill Phase: Requests are dispatched to dedicated prefill instances.
- Migration: Once the prefill phase is complete, the system migrates the generated Key-Value (KV) cache from the prefill instance to a decode instance.
- Decode Phase: The decode instance continues the computation.
Benefits:
- Reduced Interference: Separates the two phases to optimize resource utilization.
- Engine Agnostic: Inference engines (like vLLM) do not need to be aware of the P-D distinction; Llumnix handles the scheduling and migration logic.
- Native Integration: Leverages Llumnix's built-in KV cache transfer and decoupled API server mechanisms.