Unverified Commit 1b1b47a9 authored by lambert0312's avatar lambert0312 Committed by GitHub
Browse files

Fix w8a8_int8 model shared experts fusion load weights error (#5120)

parent 3c9740d2
...@@ -1480,6 +1480,16 @@ class DeepseekV2ForCausalLM(nn.Module): ...@@ -1480,6 +1480,16 @@ class DeepseekV2ForCausalLM(nn.Module):
if self.n_share_experts_fusion is not None and self.n_share_experts_fusion > 0: if self.n_share_experts_fusion is not None and self.n_share_experts_fusion > 0:
weights_list = list(weights) weights_list = list(weights)
weights_dict = dict(weights_list) weights_dict = dict(weights_list)
if self.quant_config.get_name() == "w8a8_int8":
suffix_list = [
"down_proj.weight",
"down_proj.weight_scale",
"gate_proj.weight",
"gate_proj.weight_scale",
"up_proj.weight",
"up_proj.weight_scale",
]
else:
suffix_list = [ suffix_list = [
"down_proj.weight", "down_proj.weight",
"down_proj.weight_scale_inv", "down_proj.weight_scale_inv",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment