Skip to content

Commit 69c76b7

Browse files
zhaozx-cndevpatelio
authored andcommitted
[Model] Fix bailing_moe accuracy problem (vllm-project#28277)
Signed-off-by: zhaozx-cn <[email protected]>
1 parent e045543 commit 69c76b7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

vllm/model_executor/models/bailing_moe.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
get_pp_group,
4040
get_tensor_model_parallel_rank,
4141
get_tensor_model_parallel_world_size,
42-
tensor_model_parallel_all_reduce,
4342
)
4443
from vllm.model_executor.layers.activation import SiluAndMul
4544
from vllm.model_executor.layers.fused_moe import SharedFusedMoE
@@ -330,7 +329,9 @@ def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
330329
final_hidden_states = final_hidden_states + shared_output
331330

332331
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+
)
334335
return final_hidden_states.view(num_tokens, hidden_size)
335336

336337

0 commit comments

Comments
 (0)