Home / Blog / Prefill vs Decode

Prefill vs Decode: same engine, two phases

Prefill and Decode charts are two phases of one DeepInfer engine — not two products. Machine-level PD disaggregation is production serving glue and is not fully open-sourced.

Same engine, two phases

PhaseFocusREADME sweep topology
PrefillInput throughput vs latency4× SM100 · one scale-up domain
DecodeOutput throughput vs per-user speed64× SM100 · one scale-up domain
Prefill Pareto
Official prefill Pareto (DeepInfer doc/images)
Decode Pareto
Official decode Pareto (DeepInfer doc/images)

OSS vs production gaps

LayerOSS DeepInferProduction system (Q&A)
Engine phases P/DSame binary / offline pathSame conceptual stages
PD across machines + LBNot includedDisaggregated E/P/D + balancers
Long-retention KV (3FS)Not includedDedicated storage cluster
Wide-EP decodeEP/DP APIs in offline examplesEP64–128 typical

Parallelism ranges (Q&A — with caveats)

Caveat. Ranges below describe the production deployment discussed in inference_deployment_qa.md. They are planning context, not “defaults after ./build.sh”.
StageParallelism (production Q&A)Guidance
PrefillEP2–8 / DP2–8Smallest EP/DP HBM allows
DecodeEP64–128 / DP64–128 (Wide-EP)Largest EP/DP available GPUs allow
VEOften 1 GPU / instanceCheaper GPUs recommended
TP / CPNot used for now (Q&A)OSS examples still expose --cp for offline
Wide-EP decode Pareto
Wide-EP decode chart from official doc/images — production/benchmark context

Three layers beside the engine

LayerJobInfers?
DeepInferRun V4.1-Flash offlineYes
deepseek-recipeProtocols / prompts / tokenizerNo
DeepSeek HarnessAgent runtimeN/A · dshbase.com