Fix model loading for DeepSeek-V3.2-AWQ (#16907)
Co-authored-by: Guangda Liu <bingps@users.noreply.github.com>
This commit is contained in:
@@ -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}. "
|
||||
|
||||
Reference in New Issue
Block a user