@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 9d6235ca9a
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 11, 20:00 UTC

[moe] Allow disabling DP chunking (#29936)

Signed-off-by: Ming Yang <minos.future@gmail.com>

Ming Yang committed Dec 8, 2025 at 16:29 UTC 9d6235ca9a36e76911045999ed72e3c8aad66b8a
2 files changed +5 -1
vllm/envs.py
+4
@@ -144,6 +144,7 @@ if TYPE_CHECKING:
144 VLLM_DP_MASTER_IP: str = ""
145 VLLM_DP_MASTER_PORT: int = 0
146 VLLM_MOE_DP_CHUNK_SIZE: int = 256
147 + VLLM_ENABLE_MOE_DP_CHUNK: bool = True
148 VLLM_RANDOMIZE_DP_DUMMY_INPUTS: bool = False
149 VLLM_RAY_DP_PACK_STRATEGY: Literal["strict", "fill", "span"] = "strict"
150 VLLM_MARLIN_USE_ATOMIC_ADD: bool = False
@@ -1101,6 +1102,9 @@ environment_variables: dict[str, Callable[[], Any]] = {
1102 # rank. All DP ranks process the activations in VLLM_MOE_DP_CHUNK_SIZE
1103 # units.
1104 "VLLM_MOE_DP_CHUNK_SIZE": lambda: int(os.getenv("VLLM_MOE_DP_CHUNK_SIZE", "256")),
1105 + "VLLM_ENABLE_MOE_DP_CHUNK": lambda: bool(
1106 + int(os.getenv("VLLM_ENABLE_MOE_DP_CHUNK", "1"))
1107 + ),
1108 # Randomize inputs during dummy runs when using Data Parallel
1109 "VLLM_RANDOMIZE_DP_DUMMY_INPUTS": lambda: os.environ.get(
1110 "VLLM_RANDOMIZE_DP_DUMMY_INPUTS", "0"
vllm/model_executor/layers/fused_moe/layer.py
+1 -1
@@ -753,7 +753,7 @@ class FusedMoE(CustomOp):
753 self.moe_parallel_config.use_pplx_kernels
754 or self.moe_parallel_config.use_deepep_ll_kernels
755 or (self.dp_size > 1 and self.use_flashinfer_cutlass_kernels)
756 - )
756 + ) and envs.VLLM_ENABLE_MOE_DP_CHUNK
757
758 @property
759 def is_internal_router(self) -> bool: