@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 3795d7acf4
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 4, 11:15 UTC

[ROCm][Bugfix][GPTOSS]: fix input_ids and expert_map args for quark w4a8 gptoss (#41165)

Signed-off-by: Rohan138 <rohanpotdar138@gmail.com>

Rohan Potdar committed Apr 29, 2026 at 18:39 UTC 3795d7acf431980e62e738493f437ae2a51549da
1 file changed +5 -5
vllm/model_executor/layers/quantization/quark/quark_moe.py
+5 -5
@@ -1573,14 +1573,14 @@ class QuarkOCP_MX_MoEMethod_OSS(QuarkOCP_MX_MoEMethod):
1573
1574 def apply_monolithic(
1575 self,
1576 - layer: torch.nn.Module,
1576 + layer: FusedMoE,
1577 x: torch.Tensor,
1578 router_logits: torch.Tensor,
1579 - expert_map: torch.Tensor | None = None,
1580 - ) -> torch.Tensor | tuple[torch.Tensor, torch.Tensor]:
1579 + input_ids: torch.Tensor | None = None,
1580 + ) -> torch.Tensor:
1581 if layer.enable_eplb:
1582 raise NotImplementedError(
1583 - "EPLB not supported for `QuarkW4MXFp4MoEMethod_OSS` yet."
1583 + f"EPLB not supported for {self.__class__.__name__} yet."
1584 )
1585
1586 from vllm.model_executor.layers.fused_moe.experts.gpt_oss_triton_kernels_moe import ( # noqa: E501
@@ -1597,7 +1597,7 @@ class QuarkOCP_MX_MoEMethod_OSS(QuarkOCP_MX_MoEMethod):
1597 topk=layer.top_k,
1598 renormalize=layer.renormalize,
1599 global_num_experts=layer.global_num_experts,
1600 - expert_map=expert_map,
1600 + expert_map=layer.expert_map,
1601 quant_config=self.moe_quant_config,
1602 apply_router_weight_on_input=layer.apply_router_weight_on_input,
1603 unpadded_N_w1=self.moe.intermediate_size_per_partition_unpadded * 2,