nuojohnchen commited on
Commit
9e9a188
·
verified ·
1 Parent(s): 6de0b52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -95,8 +95,8 @@ def load_model(model_path, progress=gr.Progress()):
95
  config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
96
  if 'MoE' in model_path:
97
  config_moe = config
98
- config_moe["auto_map"]["AutoConfig"] = "./configuration_upcycling_qwen2_moe.UpcyclingQwen2MoeConfig"
99
- config_moe["auto_map"]["AutoModelForCausalLM"] = "./modeling_upcycling_qwen2_moe.UpcyclingQwen2MoeForCausalLM"
100
  current_tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False,trust_remote_code=True)
101
 
102
  progress(0.5, desc="Loading model...")
 
95
  config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
96
  if 'MoE' in model_path:
97
  config_moe = config
98
+ config_moe.auto_map["AutoConfig"] = "./configuration_upcycling_qwen2_moe.UpcyclingQwen2MoeConfig"
99
+ config_moe.auto_map["AutoModelForCausalLM"] = "./modeling_upcycling_qwen2_moe.UpcyclingQwen2MoeForCausalLM"
100
  current_tokenizer = AutoTokenizer.from_pretrained(model_path, use_fast=False,trust_remote_code=True)
101
 
102
  progress(0.5, desc="Loading model...")