diff --git a/vllm/model_executor/layers/fused_moe/experts/fused_humming_moe.py b/vllm/model_executor/layers/fused_moe/experts/fused_humming_moe.py index 4cc1131733..45836c3874 100644 --- a/vllm/model_executor/layers/fused_moe/experts/fused_humming_moe.py +++ b/vllm/model_executor/layers/fused_moe/experts/fused_humming_moe.py @@ -662,12 +662,9 @@ class HummingIndexedExperts(HummingExpertsBase): topk_weights=topk_weights, topk_ids=topk_ids, expert_map=expert_map, - outputs=buffers["output"], + outputs=output, ) - # Note: output is already written to buffers["output"] - # which aliases workspace13/output - class HummingGroupedExperts(HummingExpertsBase): def finalize_weight_and_reduce_impl(self) -> mk.TopKWeightAndReduce: @@ -777,16 +774,13 @@ class HummingGroupedExperts(HummingExpertsBase): ) moe_unpermute( - out=buffers["output"], + out=output, permuted_hidden_states=buffers["down_output"].view(*topk_ids.shape, -1), topk_weights=topk_weights, inv_permuted_idx=inv_perm, expert_first_token_offset=expert_first_token_offset, ) - # Note: output is already written to buffers["output"] - # which aliases workspace13/output - class BatchedHummingGroupedExperts(HummingExpertsBase): def finalize_weight_and_reduce_impl(self) -> mk.TopKWeightAndReduce: @@ -880,13 +874,10 @@ class BatchedHummingGroupedExperts(HummingExpertsBase): layer=self.layer, inputs=inputs, input_scale=input_scale, - outputs=buffers["down_output"].view(-1, hidden_states.size(-1)), + outputs=output.view(-1, hidden_states.size(-1)), valid_shape_m=valid_shape_m, expert_layout=expert_num_tokens, compute_config=self.compute_config_str, tuning_config=self.w2_tuning_config_str, sublayer_name="w2", ) - - # Note: output is already written to buffers["down_output"] - # which aliases workspace13/output