@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e5c78956c0
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

[Bugfix] Fix incorrect use of hidden_states for shared_experts due to do_naive_dispatch_combine (#28740)

Signed-off-by: Alexander Matveev <amatveev@redhat.com>

Alexander Matveev committed Nov 14, 2025 at 17:13 UTC e5c78956c0c576d8f7230c29550ff09ffff0c064
1 file changed +4 -2
vllm/model_executor/layers/fused_moe/layer.py
+4 -2
@@ -1749,14 +1749,16 @@ class FusedMoE(CustomOp):
1749
1750 with sp_ctx:
1751 if do_naive_dispatch_combine:
1752 - hidden_states, router_logits = get_ep_group().dispatch(
1752 + hidden_states_combined, router_logits = get_ep_group().dispatch(
1753 hidden_states, router_logits, self.is_sequence_parallel
1754 )
1755
1756 # Matrix multiply.
1757 final_hidden_states = self.quant_method.apply(
1758 layer=self,
1759 - x=hidden_states,
1759 + x=hidden_states_combined
1760 + if do_naive_dispatch_combine
1761 + else hidden_states,
1762 router_logits=router_logits,
1763 top_k=self.top_k,
1764 renormalize=self.renormalize,