{"record":{"id":"42e377012128a0d6","repo":"vllm-project/vllm","slug":"enable-expert-parallel-must-be-true-to-use-eplb","errorCode":null,"errorMessage":"enable_expert_parallel must be True to use EPLB.","messagePattern":"enable_expert_parallel must be True to use EPLB\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/config/parallel.py","lineNumber":500,"sourceCode":"            raise ValueError(\n                \"data_parallel_external_lb can only be set when data_parallel_size > 1\"\n            )\n\n        if not self.numa_bind and (\n            self.numa_bind_nodes is not None or self.numa_bind_cpus is not None\n        ):\n            raise ValueError(\n                \"numa_bind_nodes and numa_bind_cpus require numa_bind=True.\"\n            )\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 \"","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/config/parallel.py#L482-L518","documentation":"EPLB rebalances experts across the expert-parallel (EP) group, so it presupposes expert parallelism. ParallelConfig raises when enable_eplb=True while enable_expert_parallel=False, since there is no EP group to balance over.","triggerScenarios":"Launching a MoE model with --enable-eplb but without --enable-expert-parallel.","commonSituations":"Assuming EPLB turns on expert parallelism implicitly; enabling EPLB for its redundant-expert feature while forgetting the base EP flag in a long CLI invocation.","solutions":["Add --enable-expert-parallel together with --enable-eplb.","If expert parallelism is not wanted, remove --enable-eplb and any eplb_config."],"exampleFix":"# before\nvllm serve Mixtral-8x7B --enable-eplb\n# after\nvllm serve Mixtral-8x7B --enable-expert-parallel --enable-eplb","handlingStrategy":"validation","validationCode":"def eplb_flags_valid(enable_eplb: bool, enable_expert_parallel: bool) -> bool:\n    return not enable_eplb or enable_expert_parallel\n\nassert eplb_flags_valid(True, True)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat --enable-expert-parallel as a prerequisite token: any script containing --enable-eplb must contain it too.","Add a pre-launch grep assertion over the assembled arg list."],"tags":["eplb","expert-parallel","moe","configuration"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}