@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 433c0f8675
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 13, 04:30 UTC

[Model] Fix bailing_moe accuracy problem (#28277)

Signed-off-by: zhaozx-cn <zhaozx2116@163.com>

zhaozx-cn committed Nov 14, 2025 at 21:33 UTC 433c0f86751f20dbdfdeb1a711def99b7ae3df92
1 file changed +3 -2
vllm/model_executor/models/bailing_moe.py
+3 -2
@@ -39,7 +39,6 @@ from vllm.distributed import (
39 get_pp_group,
40 get_tensor_model_parallel_rank,
41 get_tensor_model_parallel_world_size,
42 - tensor_model_parallel_all_reduce,
42 )
43 from vllm.model_executor.layers.activation import SiluAndMul
44 from vllm.model_executor.layers.fused_moe import SharedFusedMoE
@@ -330,7 +329,9 @@ class BailingMoE(nn.Module):
329 final_hidden_states = final_hidden_states + shared_output
330
331 if self.tp_size > 1:
333 - final_hidden_states = tensor_model_parallel_all_reduce(final_hidden_states)
332 + final_hidden_states = self.experts.maybe_all_reduce_tensor_model_parallel(
333 + final_hidden_states
334 + )
335 return final_hidden_states.view(num_tokens, hidden_size)
336
337