Unverified Commit c5b8b595 authored by Jee Jee Li's avatar Jee Jee Li Committed by GitHub
Browse files

[Misc] Fix PhiMoE expert mapping (#21085)


Signed-off-by: default avatarJee Jee Li <pandaleefree@gmail.com>
parent 4fcef49e
...@@ -533,14 +533,9 @@ class PhiMoEModel(nn.Module): ...@@ -533,14 +533,9 @@ class PhiMoEModel(nn.Module):
("qkv_proj", "v_proj", "v"), ("qkv_proj", "v_proj", "v"),
] ]
expert_params_mapping = FusedMoE.make_expert_params_mapping(
ckpt_gate_proj_name="w1",
ckpt_down_proj_name="w2",
ckpt_up_proj_name="w3",
num_experts=self.config.num_local_experts)
params_dict = dict(self.named_parameters()) params_dict = dict(self.named_parameters())
loaded_params: set[str] = set() loaded_params: set[str] = set()
expert_params_mapping = self.get_expert_mapping()
for name, loaded_weight in weights: for name, loaded_weight in weights:
if (self.quant_config is not None and if (self.quant_config is not None and
(scale_name := self.quant_config.get_cache_scale(name))): (scale_name := self.quant_config.get_cache_scale(name))):
......
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