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 15, 02:15 UTC
[Bugfix] Remove assertion of expert_map being None (#20714)
Signed-off-by: Ming Yang <yming@meta.com> Signed-off-by: Ming Yang <minos.future@gmail.com>
Ming Yang committed
Jul 10, 2025 at 12:55 UTC
3de2ed767f64be006586b4c97e1f6524a75b4748
1 file changed
+12
-3
vllm/model_executor/layers/fused_moe/pplx_prepare_finalize.py
+12
-3
@@ -6,11 +6,14 @@ import pplx_kernels as pplx
6
import torch
7
8
import vllm.model_executor.layers.fused_moe.modular_kernel as mk
9
+from vllm.logger import init_logger
10
from vllm.model_executor.layers.fused_moe.config import FusedMoEQuantConfig
11
from vllm.model_executor.layers.fused_moe.utils import (
12
_validate_scale_shape, moe_kernel_quantize_input)
13
from vllm.utils import cdiv, round_up
14
15
+logger = init_logger(__name__)
16
+
17
18
def pplx_hidden_dim_scale_bytes(
19
max_num_tokens: int,
@@ -101,9 +104,15 @@ class PplxPrepareAndFinalize(mk.FusedMoEPrepareAndFinalize):
104
hidden_dim = a1.size(-1) # K
105
106
assert topk_ids.size(0) == num_tokens
104
- assert expert_map is None, """with expert map, -1 id is used for
105
- non-local token; this causes error when casting ids to the
106
- topk_indices_dtype() uint32"""
107
+ # expert_map should be None because with expert map, -1 id is used for
108
+ # non-local token; this causes error when casting ids to the
109
+ # topk_indices_dtype() int32
110
+ #
111
+ if expert_map is not None:
112
+ logger.warn_once(
113
+ "The PPLX backend does not support expert mapping. "
114
+ "The provided `expert_map` will be ignored.")
115
+ expert_map = None #noqa: F841
116
117
# Is this always going to be a1.device?
118
device = a1.device