{"record":{"id":"2ac3c8a5484a2b9b","repo":"vllm-project/vllm","slug":"eplb-requires-tensor-prefill-context-or-data-par","errorCode":null,"errorMessage":"EPLB requires tensor, prefill-context, or data parallelism, but got TP={self.tensor_parallel_size}, PCP={self.prefill_context_parallel_size}, DP={self.data_parallel_size}.","messagePattern":"EPLB requires tensor, prefill-context, or data parallelism, but got TP=(.+?), PCP=(.+?), DP=(.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/parallel.py","lineNumber":509,"sourceCode":"            )\n\n        if self.enable_eplb:\n            if not current_platform.is_cuda_alike():\n                raise ValueError(\n                    \"Expert parallelism load balancing is only supported on \"\n                    \"CUDA devices or ROCm devices now.\"\n                )\n            if not self.enable_expert_parallel:\n                raise ValueError(\"enable_expert_parallel must be True to use EPLB.\")\n            # The EP group spans the TP x PCP x DP ranks. EPLB therefore needs\n            # TP, PCP, or DP > 1.\n            if (\n                self.tensor_parallel_size\n                * self.prefill_context_parallel_size\n                * self.data_parallel_size\n                <= 1\n            ):\n                raise ValueError(\n                    \"EPLB requires tensor, prefill-context, or data parallelism, \"\n                    f\"but got TP={self.tensor_parallel_size}, \"\n                    f\"PCP={self.prefill_context_parallel_size}, \"\n                    f\"DP={self.data_parallel_size}.\"\n                )\n        else:\n            if self.eplb_config.num_redundant_experts != 0:\n                raise ValueError(\n                    \"num_redundant_experts is set to \"\n                    f\"{self.eplb_config.num_redundant_experts} but EPLB is not \"\n                    \"enabled. Either enable EPLB or unset \"\n                    \"num_redundant_experts.\"\n                )\n\n        tp = self.tensor_parallel_size\n        pcp = self.prefill_context_parallel_size\n        dcp = self.decode_context_parallel_size\n        if pcp > 1 and self.data_parallel_size > 1:","sourceCodeStart":491,"sourceCodeEnd":527,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/parallel.py#L491-L527","documentation":"The EP group for EPLB spans TP x PCP x DP ranks, so at least one of those parallel sizes must exceed 1. ParallelConfig computes the product and raises when it is <= 1, i.e. a fully single-rank config asked for EPLB.","triggerScenarios":"Single-GPU run (TP=1, PCP=1, DP=1) with --enable-expert-parallel --enable-eplb; any config where tensor_parallel_size * prefill_context_parallel_size * data_parallel_size == 1.","commonSituations":"Testing EPLB on one GPU before scaling out; shrinking a cluster launch to a single rank for debugging while keeping EPLB flags.","solutions":["Scale out with at least one of --tensor-parallel-size, --data-parallel-size (with expert parallel), or prefill context parallel > 1.","For local smoke tests, drop --enable-eplb and only re-enable it on multi-rank deployments."],"exampleFix":"# before\nvllm serve Qwen3-MoE --enable-expert-parallel --enable-eplb\n# after\nvllm serve Qwen3-MoE --tensor-parallel-size 2 --enable-expert-parallel --enable-eplb","handlingStrategy":"validation","validationCode":"def eplb_parallelism_valid(tp: int, pcp: int, dp: int) -> bool:\n    return tp * pcp * dp > 1\n\nassert eplb_parallelism_valid(2, 1, 1)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never enable EPLB on single-rank smoke tests; use a dedicated multi-GPU test config.","When shrinking parallelism for debugging, remove the EPLB flags in the same edit."],"tags":["eplb","expert-parallel","moe","parallelism","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}