vllm-project/vllm · error · ValueError

num_redundant_experts is set to {self.eplb_config.num_redund

Error message

num_redundant_experts is set to {self.eplb_config.num_redundant_experts} but EPLB is not enabled. Either enable EPLB or unset num_redundant_experts.

What it means

num_redundant_experts is an EPLB-only setting (spare experts used during rebalancing). When enable_eplb is False, ParallelConfig rejects any eplb_config whose num_redundant_experts != 0 to prevent silently ignored redundancy configuration.

Source

Thrown at vllm/config/parallel.py:517

            if not self.enable_expert_parallel:
                raise ValueError("enable_expert_parallel must be True to use EPLB.")
            # The EP group spans the TP x PCP x DP ranks. EPLB therefore needs
            # TP, PCP, or DP > 1.
            if (
                self.tensor_parallel_size
                * self.prefill_context_parallel_size
                * self.data_parallel_size
                <= 1
            ):
                raise ValueError(
                    "EPLB requires tensor, prefill-context, or data parallelism, "
                    f"but got TP={self.tensor_parallel_size}, "
                    f"PCP={self.prefill_context_parallel_size}, "
                    f"DP={self.data_parallel_size}."
                )
        else:
            if self.eplb_config.num_redundant_experts != 0:
                raise ValueError(
                    "num_redundant_experts is set to "
                    f"{self.eplb_config.num_redundant_experts} but EPLB is not "
                    "enabled. Either enable EPLB or unset "
                    "num_redundant_experts."
                )

        tp = self.tensor_parallel_size
        pcp = self.prefill_context_parallel_size
        dcp = self.decode_context_parallel_size
        if pcp > 1 and self.data_parallel_size > 1:
            raise ValueError("PCP does not support data parallelism yet.")
        if pcp == 1:
            # DCP reuses the TP ranks when PCP is disabled.
            if tp % dcp != 0:
                raise ValueError(f"tp_size={tp} must be divisible by dcp_size={dcp}.")
        elif dcp not in (1, pcp, tp * pcp):
            raise ValueError(
                "When PCP is enabled, DCP must be disabled, span the PCP "

View on GitHub (pinned to c794754062)

Solutions

  1. Add --enable-eplb if you actually want redundant experts.
  2. Or remove the eplb-config / set num_redundant_experts to 0 in the JSON when EPLB is off.

Example fix

# before
vllm serve model --eplb-config '{"num_redundant_experts": 8}'
# after
vllm serve model --enable-eplb --eplb-config '{"num_redundant_experts": 8}'
Defensive patterns

Strategy: validation

Validate before calling

def redundant_experts_valid(enable_eplb: bool, eplb_config) -> bool:
    return enable_eplb or eplb_config is None or eplb_config.num_redundant_experts == 0

Prevention

When it happens

Trigger: Passing an EPLB config JSON with num_redundant_experts > 0 (e.g. --eplb-config '{"num_redundant_experts": 8, ...}') without --enable-eplb.

Common situations: Sharing an eplb-config file across deployments where some do not enable EPLB; disabling EPLB temporarily for a/b comparison while keeping the config file in the command line.

Related errors


AI-assisted analysis of vllm-project/vllm@c794754062 (2026-08-14). Data as JSON: /api/errors/cdf938c120a4cab0. Report an issue: GitHub.