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 13, 07:00 UTC
Fix `get_num_experts` when config sets it explicitly to `None` (#28652)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: bruceszchen <bruceszchen@tencent.com>
Harry Mellor committed
Nov 13, 2025 at 16:02 UTC
b230286fbc0b6d192e176ead55000471fd4f1080
1 file changed
+2
-1
vllm/config/model.py
+2
-1
@@ -1342,7 +1342,8 @@ class ModelConfig:
1342
# Ernie VL's remote code uses list[int]...
1343
# The values are always the same so we just take the first one.
1344
return num_experts[0]
1345
- return num_experts
1345
+ # Coerce to 0 if explicitly set to None
1346
+ return num_experts or 0
1347
1348
def get_layers_start_end_indices(
1349
self, parallel_config: ParallelConfig