From 22e0370e6ed778a6fbe17e2518effc0b457f91e5 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Sun, 17 May 2026 18:06:44 +0000 Subject: [PATCH] Fix AttributeError: DeepseekV4MegaMoEExperts has no swiglu_limit Get swiglu_limit from vllm_config.model_config.hf_config instead of self (it was only set on the parent DeepseekV4MoE class). --- vllm/patches/deepseek_v4.py | 1 + 1 file changed, 1 insertion(+) diff --git a/vllm/patches/deepseek_v4.py b/vllm/patches/deepseek_v4.py index 466d8674..3a75f712 100644 --- a/vllm/patches/deepseek_v4.py +++ b/vllm/patches/deepseek_v4.py @@ -251,6 +251,7 @@ class DeepseekV4MegaMoEExperts(nn.Module): self.hidden_size = hidden_size self.intermediate_size = intermediate_size self.max_num_tokens = vllm_config.scheduler_config.max_num_batched_tokens + self.swiglu_limit = vllm_config.model_config.hf_config.swiglu_limit weight_attrs = {"weight_loader": self.weight_loader}