AFD Plugin Explained

Recipes reference

IntermediateReferenceabout 4 min read

Code version: afd-plugin @ 7452d52 · 2026-10-27 · vLLM @ ced6857

In one sentence

The recipe/ folder holds the launch scripts for AFD. This page lists every AFD serve process they start, generated from the scripts.

How to read this table#

Each recipe script runs one or more vllm serve processes. The table has one row per process that carries an "afd" block, so one row per attention or FFN process. The topology name links to Deployment topologies: how to place the roles, which explains each layout. The generator parses the shell text only; it never runs a script.

Run python3 tools/gen_recipes.py to refresh the table at the pinned commit.

Generated by tools/gen_recipes.py from the recipe/ shell scripts. One row per vllm serve call that carries an "afd" block. Do not edit between the markers.

24 AFD serve blocks across the recipe scripts.

RecipeHWConnectorModelTopologyRoleDPTPEPModeDBO dec/preA/F ranksAFD portHTTP portSource
2a2f_eager_dbo_dp1tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fattention12yeseager2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_eager_dbo_dp1tp2.sh:7
2a2f_eager_dbo_dp1tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fffn12yeseager2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_eager_dbo_dp1tp2.sh:31
2a2f_eager_dbo_dp2tp1.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fattention21yeseager2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_eager_dbo_dp2tp1.sh:7
2a2f_eager_dbo_dp2tp1.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fffn21yeseager2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_eager_dbo_dp2tp1.sh:31
2a2f_graph_dbo_dp1tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fattention12yesgraph (FULL_DECODE_ONLY)2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_graph_dbo_dp1tp2.sh:7
2a2f_graph_dbo_dp1tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fffn12yesgraph (FULL_DECODE_ONLY)2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_graph_dbo_dp1tp2.sh:34
2a2f_graph_dbo_dp2tp1.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fattention21yesgraph (FULL_DECODE_ONLY)2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_graph_dbo_dp2tp1.sh:7
2a2f_graph_dbo_dp2tp1.shgpuP2pNcclAFDConnectordeepseek_v2_lite2A2Fffn21yesgraph (FULL_DECODE_ONLY)2/122 / 2626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_graph_dbo_dp2tp1.sh:34
4a4f_eager_dbo_dp2tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite4A4Fattention22yeseager2/124 / 4626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/4a4f_eager_dbo_dp2tp2.sh:7
4a4f_eager_dbo_dp2tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite4A4Fffn22yeseager2/124 / 4626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/4a4f_eager_dbo_dp2tp2.sh:31
4a4f_graph_dbo_dp2tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite4A4Fattention22yesgraph (FULL_DECODE_ONLY)2/124 / 4626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/4a4f_graph_dbo_dp2tp2.sh:7
4a4f_graph_dbo_dp2tp2.shgpuP2pNcclAFDConnectordeepseek_v2_lite4A4Fffn22yesgraph (FULL_DECODE_ONLY)2/124 / 4626918305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/4a4f_graph_dbo_dp2tp2.sh:34
multipod_2a_2f_graph_dbo_dp1tp2.shgpuP2pNcclAFDConnectordeepseek_v2_litemultipod 2a 2fattention12yesgraph (FULL_DECODE_ONLY)2/122 / 2$AFD_CONNECTOR_PORT18305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/multipod_2a_2f_graph_dbo_dp1tp2.sh:16
multipod_2a_2f_graph_dbo_dp1tp2.shgpuP2pNcclAFDConnectordeepseek_v2_litemultipod 2a 2fffn12yesgraph (FULL_DECODE_ONLY)2/122 / 2$AFD_CONNECTOR_PORT18305recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/multipod_2a_2f_graph_dbo_dp1tp2.sh:45
2p1a1f_eager_dbo.shgpuP2pNcclAFDConnectordeepseek_v2_lite2P1A1Fattention11yeseager2/121 / 1626918303recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_disaggregation/2p1a1f_eager_dbo.sh:56
2p1a1f_eager_dbo.shgpuP2pNcclAFDConnectordeepseek_v2_lite2P1A1Fffn11yeseager2/121 / 1626918304recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_disaggregation/2p1a1f_eager_dbo.sh:86
2p1a1f_graph_dbo.shgpuP2pNcclAFDConnectordeepseek_v2_lite2P1A1Fattention11yesgraph (FULL_DECODE_ONLY)2/121 / 1626918303recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_disaggregation/2p1a1f_graph_dbo.sh:56
2p1a1f_graph_dbo.shgpuP2pNcclAFDConnectordeepseek_v2_lite2P1A1Fffn11yesgraph (FULL_DECODE_ONLY)2/121 / 1626918304recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_disaggregation/2p1a1f_graph_dbo.sh:89
multipod_2a_2a_2f_graph.shgpuP2pNcclAFDConnectorqwen3_5_122b_a10b_fp8multipod 2a 2a 2fattention41yesgraph (FULL_DECODE_ONLY)off4 / 2$AFD_CONNECTOR_PORT18305recipe/gpu/P2pNcclAFDConnector/qwen3_5_122b_a10b_fp8/prefill_decode_colocation/multipod_2a_2a_2f_graph.sh:32
multipod_2a_2a_2f_graph.shgpuP2pNcclAFDConnectorqwen3_5_122b_a10b_fp8multipod 2a 2a 2fffn21yesgraph (FULL_DECODE_ONLY)off4 / 2$AFD_CONNECTOR_PORT18305recipe/gpu/P2pNcclAFDConnector/qwen3_5_122b_a10b_fp8/prefill_decode_colocation/multipod_2a_2a_2f_graph.sh:69
attention_dp2tp8.shnpuCAMAsyncAFDConnectordeepseek_v3_216A16Fattention28yeseagerdefault/default16 / 16$AFD_PORT$API_PORTrecipe/npu/CAMAsyncAFDConnector/deepseek_v3_2/v0_26_accuracy/attention_dp2tp8.sh:55
ffn_ep16.shnpuCAMAsyncAFDConnectordeepseek_v3_216A16Fffn161yeseageroff16 / 16$AFD_PORT$FFN_PORTrecipe/npu/CAMAsyncAFDConnector/deepseek_v3_2/v0_26_accuracy/ffn_ep16.sh:55
afd_attention.shnpuCAMP2pAFDConnectordeepseek_v3_2afd_attentionattention$ATTENTION_RANKS1yesgraph (FULL_DECODE_ONLY)2/12$ATTENTION_RANKS / 16$AFD_PORT$SERVER_PORTrecipe/npu/CAMP2pAFDConnector/deepseek_v3_2/afd_attention.sh:105
afd_ffn.shnpuCAMP2pAFDConnectordeepseek_v3_2afd_ffnffn$FFN_RANKS1yesgraph (FULL_DECODE_ONLY)2/12$ATTENTION_RANKS / 16$AFD_PORT$SERVER_PORTrecipe/npu/CAMP2pAFDConnector/deepseek_v3_2/afd_ffn.sh:95

What the parser cannot read#

The generator reads the AFD serve processes. These parts of the recipes are not in the table, so they are listed here by hand, each with a citation.

DBO thresholds in the recipes#

Every DeepSeek-V2-Lite recipe turns on DBO with --dbo-decode-token-threshold 2 --dbo-prefill-token-threshold 12. The README calls these example values and says to tune them (recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/README.md:140-143). The vLLM defaults are higher, 32 and 512 (vllm:vllm/config/parallel.py:227, vllm:vllm/config/parallel.py:232). See Tuning: the knobs the repo exposes.

Running a recipe#

Run a colocation script from the repository root. It backgrounds the attention and FFN servers and writes attn.log and ffn.log (recipe/gpu/P2pNcclAFDConnector/README.md:30-43). Wait for Application startup complete in each log, then send traffic to the attention HTTP port. The tour Tour: Run a recipe walks one script line by line.

export MODEL_PATH=/path/model_weights/DeepSeek-V2-Lite
export VLLM_USE_V2_MODEL_RUNNER=1
bash recipe/gpu/P2pNcclAFDConnector/deepseek_v2_lite/prefill_decode_colocation/2a2f_graph_dbo_dp1tp2.sh

Refreshing this page#

python3 tools/gen_recipes.py          # rewrite the table
python3 tools/gen_recipes.py --check   # exit 1 if the table is out of date
python3 tools/gen_recipes.py --report  # print the extracted facts