Fix model loading for DeepSeek-V3.2-AWQ (#16907)

Co-authored-by: Guangda Liu <bingps@users.noreply.github.com>
This commit is contained in:
Guangda Liu
2026-02-15 09:39:53 +08:00
committed by GitHub
parent 8b2020584c
commit 190fa8246f

View File

@@ -245,10 +245,14 @@ class DeepseekV2MLP(nn.Module):
tp_rank=tp_rank,
tp_size=tp_size,
)
if not hasattr(self.gate_up_proj, "weight"):
self.gate_up_proj.weight = getattr(self.gate_up_proj, "weight_packed")
if not hasattr(self.down_proj, "weight"):
self.down_proj.weight = getattr(self.down_proj, "weight_packed")
if not hasattr(self.gate_up_proj, "weight") and hasattr(
self.gate_up_proj, "weight_packed"
):
self.gate_up_proj.weight = self.gate_up_proj.weight_packed
if not hasattr(self.down_proj, "weight") and hasattr(
self.down_proj, "weight_packed"
):
self.down_proj.weight = self.down_proj.weight_packed
if hidden_act != "silu":
raise ValueError(
f"Unsupported activation: {hidden_act}. "