Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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
|
99 |
-
config_moe
|
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...")
|