Thishyaketh commited on
Commit
05499f8
·
verified ·
1 Parent(s): a9c0271

Upload configuration_ngen4ow_10t.py

Browse files
Files changed (1) hide show
  1. configuration_ngen4ow_10t.py +36 -0
configuration_ngen4ow_10t.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import PretrainedConfig
2
+
3
+
4
+ class NGen4OW10TConfig(PretrainedConfig):
5
+ model_type = "ngen4ow_10t"
6
+
7
+ def __init__(
8
+ self,
9
+ base_model_name_or_path="moonshotai/Kimi-K2.6",
10
+ base_config=None,
11
+ num_model_experts=10,
12
+ active_model_experts=1,
13
+ logical_total_params="10T",
14
+ active_params="32B",
15
+ route_strategy="hash",
16
+ default_expert=0,
17
+ expert_weight_prefix="experts",
18
+ **kwargs,
19
+ ):
20
+ super().__init__(**kwargs)
21
+ self.base_model_name_or_path = base_model_name_or_path
22
+ self.base_config = base_config or {}
23
+ self.num_model_experts = num_model_experts
24
+ self.active_model_experts = active_model_experts
25
+ self.logical_total_params = logical_total_params
26
+ self.active_params = active_params
27
+ self.route_strategy = route_strategy
28
+ self.default_expert = default_expert
29
+ self.expert_weight_prefix = expert_weight_prefix
30
+ self.architectures = ["NGen4OW10TForCausalLM"]
31
+ self.auto_map = {
32
+ "AutoConfig": "configuration_ngen4ow_10t.NGen4OW10TConfig",
33
+ "AutoModel": "modeling_ngen4ow_10t.NGen4OW10TModel",
34
+ "AutoModelForCausalLM": "modeling_ngen4ow_10t.NGen4OW10TForCausalLM",
35
+ }
36
+