From 73f51a0391832a30891ad312c5a8127cc1fc9f4c Mon Sep 17 00:00:00 2001 From: Christina Date: Wed, 10 Dec 2025 13:41:45 -0600 Subject: [PATCH] fix(gguf): Make GGUFMoEMethod.apply() parameters optional The GGUFMoEMethod.apply() method had required positional parameters (top_k, renormalize) that were not being passed by the caller in FusedMoE.forward_impl(). The base class FusedMoEMethodBase.apply() only requires (layer, x, router_logits). These parameters were also not used in the method body - it calls layer.select_experts() without passing them. This change makes top_k and renormalize keyword arguments with defaults, matching how the caller invokes the method. Fixes GGUF MoE models (e.g., Qwen3-30B-A3B-Instruct-GGUF) failing with: TypeError: GGUFMoEMethod.apply() missing 2 required positional arguments: 'top_k' and 'renormalize' --- vllm/model_executor/layers/quantization/gguf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/model_executor/layers/quantization/gguf.py b/vllm/model_executor/layers/quantization/gguf.py index bcdfafb50fc5..a3c74e3b30d5 100644 --- a/vllm/model_executor/layers/quantization/gguf.py +++ b/vllm/model_executor/layers/quantization/gguf.py @@ -624,8 +624,8 @@ def apply( layer: FusedMoE, x: torch.Tensor, router_logits: torch.Tensor, - top_k: int, - renormalize: bool, + top_k: int = 0, + renormalize: bool = False, use_grouped_topk: bool = False, topk_group: int | None = None, num_expert_group: int | None = None,