# Rozdzielenie fazy prefill i decode

EN: **Disaggregated prefill and decode** · id `disaggregation` · aliases: disaggregated serving, prefill-decode disaggregation, PD disaggregation, rozdzielony prefill i decode, phase splitting

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Inferencja i infrastruktura](https://aiatlasgraph.com/t/systems.md) › [Serwowanie i dekodowanie](https://aiatlasgraph.com/t/serving.md) › Rozdzielenie fazy prefill i decode

## Description

- PL: Przetwarzanie promptu (prefill, ograniczony obliczeniami) i generowanie tokenów (decode, ograniczone pamięcią) na osobnych pulach GPU z przesyłaniem KV cache między nimi, by stroić czas do pierwszego tokenu i czas na token niezależnie.
- EN: Running prompt processing (prefill, compute-bound) and token generation (decode, memory-bound) on separate GPU pools, transferring the KV cache between them, so TTFT and per-token latency can be tuned independently.

## In one sentence

- PL: To przetwarzanie pytania i dopisywanie odpowiedzi na osobnych grupach urządzeń.
- EN: This processes prompts and generates responses on separate device groups.

## Problem it solves

- PL: Długie nowe pytania konkurują o sprzęt z rozmowami, które właśnie czekają na kolejne słowa odpowiedzi.
- EN: Long new prompts compete for hardware with conversations waiting for the next response elements.

## What it does

- PL: Pierwsza grupa przygotowuje zapis wejścia, przekazuje go drugiej, a każdą fazę można osobno dopasować do ruchu i zasobów.
- EN: One group prepares the input representation and passes it to another, letting each phase be tuned separately to traffic and resources.

## Everyday example

- PL: Serwer kieruje czytanie długich dokumentów do jednej puli urządzeń, a bieżące generowanie odpowiedzi do drugiej.
- EN: A server sends long-document processing to one device pool and ongoing response generation to another.

## This concerns you if you…

- PL: ruch miesza długie pytania i trwające odpowiedzi
- PL: chcesz osobno skalować fazy obsługi modelu
- EN: serve both long prompts and ongoing responses
- EN: want to scale serving phases separately

## Keywords

DistServe · Splitwise · prefill-decode separation · KV cache transfer · KV-aware routing · goodput optimization · independent scaling

## How it works

- PL: Prefill i generowanie kolejnych tokenów kieruje się do osobnych pul urządzeń z niezależnym harmonogramem. Stan uwagi przenosi się między fazami, pozwalając dobrać zasoby i równoległość osobno do pierwszej odpowiedzi oraz dalszego strumienia.
- EN: Prefill and subsequent token generation are routed to separate device pools with independent scheduling. Attention state transfers between phases, allowing separate resource and parallelism choices for first responses and ongoing streams.

## Limits

- PL: Transfer stanu dodaje opóźnienie i obciążenie sieci. Zysk zależy od ruchu i topologii; rozdział może nie opłacać się przy małych zadaniach, a pule wymagają równoważenia.
- EN: State transfer adds latency and network load. Benefits depend on traffic and topology; separation may not pay for small tasks, and pools require balancing.

## Key terms

- PL: **przekazanie KV**: Transfer stanu uwagi pomiędzy wykonawcami różnych faz.
- PL: **niezależne skalowanie**: Dobór liczby zasobów osobno dla etapów o różnych wymaganiach.
- EN: **KV handoff**: Transferring attention state between workers handling different phases.
- EN: **independent scaling**: Allocating resource counts separately to stages with different demands.

## Know first

- [Mechanizm self-attention (zapytania, klucze, wartości) (Self-attention (queries, keys, values))](https://aiatlasgraph.com/t/selfattention.md)
- [Połączenia między układami i sieć klastra (Accelerator interconnects and cluster networking)](https://aiatlasgraph.com/t/interconnects.md)

## Examples

- PL: osobne pule prefill i decode · transfer KV cache · routing świadomy KV cache · optymalizacja pod goodput
- EN: separate prefill and decode pools · KV-cache transfer · KV-aware routing · goodput optimisation

## Related topics

Untyped, symmetric "see also" links.

- [Metryki wydajności inferencji LLM (TTFT, TPOT, przepustowość) (Inference performance metrics (TTFT, TPOT, throughput, goodput))](https://aiatlasgraph.com/t/inferencemetrics.md)
- [Zarządzanie KV cache (KV cache management)](https://aiatlasgraph.com/t/kvcache.md)

## Sources

- [DistServe: Disaggregating Prefill and Decoding for Goodput-optimized Large Language Model Serving](<https://arxiv.org/abs/2401.09670>) `distserve-2024` · by Yinmin Zhong, Shengyu Liu, Junda Chen, Jianbo Hu, Yibo Zhu, Xuanzhe Liu, Xin Jin, Hao Zhang
- [Splitwise: Efficient Generative LLM Inference Using Phase Splitting](<https://arxiv.org/abs/2311.18677>) `splitwise-2023` · by Pratyush Patel, Esha Choukse, Chaojie Zhang, Aashaka Shah, Íñigo Goiri, Saeed Maleki, Ricardo Bianchini
- [Disaggregated Prefilling (experimental) — vLLM docs](<https://docs.vllm.ai/en/latest/features/disagg_prefill.html>) `vllm-disagg-prefill` · by Projekt vLLM · sponsored
- [Mastering LLM Techniques: Inference Optimization](<https://developer.nvidia.com/blog/mastering-llm-techniques-inference-optimization/>) `nvidia-llm-inference-opt-2023` · by Shashank Verma, Neal Vaidya (NVIDIA Technical Blog) · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/disaggregation · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
