Create qwen3_moe_config.py
Browse files- qwen3_moe_config.py +20 -0
qwen3_moe_config.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import PretrainedConfig
|
2 |
+
|
3 |
+
class Qwen3MoEConfig(PretrainedConfig):
|
4 |
+
model_type = "qwen3moe"
|
5 |
+
|
6 |
+
def __init__(
|
7 |
+
self,
|
8 |
+
router_model_path=None,
|
9 |
+
expert_model_paths=None,
|
10 |
+
labels=None,
|
11 |
+
torch_dtype="auto",
|
12 |
+
tokenizer_path=None,
|
13 |
+
**kwargs,
|
14 |
+
):
|
15 |
+
super().__init__(**kwargs)
|
16 |
+
self.router_model_path = router_model_path
|
17 |
+
self.expert_model_paths = expert_model_paths or {}
|
18 |
+
self.labels = labels or []
|
19 |
+
self.torch_dtype = torch_dtype
|
20 |
+
self.tokenizer_path = tokenizer_path
|