JuncaiL commited on
Commit
3240d88
1 Parent(s): 0b1dfd4

fix state_dict loading in MoE model

Browse files
Files changed (2) hide show
  1. config.json +1 -1
  2. modeling_llama_moe_hf.py +0 -10
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "./LLaMA_MoE/",
3
  "add_weight_norm": false,
4
  "architectures": [
5
  "LlamaMoEForCausalLM"
 
1
  {
2
+ "_name_or_path": "JuncaiL/llama-265m",
3
  "add_weight_norm": false,
4
  "architectures": [
5
  "LlamaMoEForCausalLM"
modeling_llama_moe_hf.py CHANGED
@@ -1669,13 +1669,3 @@ class LlamaMoEForCausalLM(LlamaMoEPreTrainedModel):
1669
 
1670
  def reset_experts(self):
1671
  self.model.reset_experts()
1672
-
1673
- @classmethod
1674
- def from_pretrained(cls, *model_args, **kwargs):
1675
- config = kwargs.pop("config", None)
1676
- model = cls(config)
1677
- state_dict = kwargs.pop("moe_state_dict", None)
1678
- if state_dict is not None:
1679
- model.load_state_dict(state_dict)
1680
- return model
1681
-
 
1669
 
1670
  def reset_experts(self):
1671
  self.model.reset_experts()