HectorHe commited on
Commit
dd1f5f2
·
verified ·
1 Parent(s): 4e40331

Training in progress, step 215

Browse files
chat_template.jinja ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{{ bos_token }}{% for message in messages %}{% if message['role'] == 'user' %}{{ 'User: ' + message['content'] + '
2
+
3
+ ' }}{% elif message['role'] == 'assistant' %}{{ 'Assistant: ' + message['content'] + eos_token }}{% elif message['role'] == 'system' %}{{ message['content'] + '
4
+
5
+ ' }}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ 'Assistant:' }}{% endif %}
config.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "DeepseekV2ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "auto_map": {
8
+ "AutoConfig": "configuration_deepseek.DeepseekV2Config",
9
+ "AutoModel": "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct--modeling_deepseek.DeepseekV2Model",
10
+ "AutoModelForCausalLM": "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct--modeling_deepseek.DeepseekV2ForCausalLM"
11
+ },
12
+ "aux_loss_alpha": 0.001,
13
+ "bos_token_id": 100000,
14
+ "eos_token_id": 100001,
15
+ "ep_size": 1,
16
+ "first_k_dense_replace": 1,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 2048,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 10944,
21
+ "kv_lora_rank": 512,
22
+ "max_position_embeddings": 163840,
23
+ "model_type": "deepseek_v2",
24
+ "moe_intermediate_size": 1408,
25
+ "moe_layer_freq": 1,
26
+ "n_group": 1,
27
+ "n_routed_experts": 64,
28
+ "n_shared_experts": 2,
29
+ "norm_topk_prob": false,
30
+ "num_attention_heads": 16,
31
+ "num_experts_per_tok": 6,
32
+ "num_hidden_layers": 27,
33
+ "num_key_value_heads": 16,
34
+ "pretraining_tp": 1,
35
+ "q_lora_rank": null,
36
+ "qk_nope_head_dim": 128,
37
+ "qk_rope_head_dim": 64,
38
+ "rms_norm_eps": 1e-06,
39
+ "rope_scaling": {
40
+ "beta_fast": 32,
41
+ "beta_slow": 1,
42
+ "factor": 40,
43
+ "mscale": 0.707,
44
+ "mscale_all_dim": 0.707,
45
+ "original_max_position_embeddings": 4096,
46
+ "type": "yarn"
47
+ },
48
+ "rope_theta": 10000,
49
+ "routed_scaling_factor": 1.0,
50
+ "scoring_func": "softmax",
51
+ "seq_aux": true,
52
+ "tie_word_embeddings": false,
53
+ "topk_group": 1,
54
+ "topk_method": "greedy",
55
+ "torch_dtype": "bfloat16",
56
+ "transformers_version": "4.52.1",
57
+ "use_cache": false,
58
+ "v_head_dim": 128,
59
+ "vocab_size": 102400
60
+ }
model-00001-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ede7b9a1baa04dcfb3d95fc819e555e9b704d0a2f8bdfe50a5354c1d91ba3e48
3
+ size 4994763632
model-00002-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcde095f0aa079b334de9cc12f35f36e03c7b40f03e62e9509892d3ee3e92867
3
+ size 4995044944
model-00003-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:276736686f8a0b07046b9a0e02ba779fad9eb46330f3af44399fabcb372c52be
3
+ size 4996085000
model-00004-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b916ed24d1fdd164a9f5c9da023ee3cbf7dd9148e75db8199aad589d642b08fa
3
+ size 4996085224
model-00005-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dcb0643b310fc40b388050f89efc6dfba98e0e6dcd401546c42830faa67add75
3
+ size 4996085224
model-00006-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7325ce0e000a6bc5b1373edfc6cde78ddec02ea3318bac3d082db778662edac
3
+ size 4995045792
model-00007-of-00007.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8a8ebe2dba57567865dacc6a205d43b71a31e5ece1cc5071ff0057a5e29b1c55
3
+ size 1440515736
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
special_tokens_map.json ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|begin▁of▁sentence|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|end▁of▁sentence|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|end▁of▁sentence|>"
17
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,163 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "100000": {
7
+ "content": "<|begin▁of▁sentence|>",
8
+ "lstrip": false,
9
+ "normalized": true,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "100001": {
15
+ "content": "<|end▁of▁sentence|>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "100002": {
23
+ "content": "<|fim▁hole|>",
24
+ "lstrip": false,
25
+ "normalized": true,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": false
29
+ },
30
+ "100003": {
31
+ "content": "<|fim▁begin|>",
32
+ "lstrip": false,
33
+ "normalized": true,
34
+ "rstrip": false,
35
+ "single_word": false,
36
+ "special": false
37
+ },
38
+ "100004": {
39
+ "content": "<|fim▁end|>",
40
+ "lstrip": false,
41
+ "normalized": true,
42
+ "rstrip": false,
43
+ "single_word": false,
44
+ "special": false
45
+ },
46
+ "100005": {
47
+ "content": "<|completion|>",
48
+ "lstrip": false,
49
+ "normalized": true,
50
+ "rstrip": false,
51
+ "single_word": false,
52
+ "special": false
53
+ },
54
+ "100006": {
55
+ "content": "<|User|>",
56
+ "lstrip": false,
57
+ "normalized": true,
58
+ "rstrip": false,
59
+ "single_word": false,
60
+ "special": false
61
+ },
62
+ "100007": {
63
+ "content": "<|Assistant|>",
64
+ "lstrip": false,
65
+ "normalized": true,
66
+ "rstrip": false,
67
+ "single_word": false,
68
+ "special": false
69
+ },
70
+ "100008": {
71
+ "content": "<|EOT|>",
72
+ "lstrip": false,
73
+ "normalized": true,
74
+ "rstrip": false,
75
+ "single_word": false,
76
+ "special": true
77
+ },
78
+ "100009": {
79
+ "content": "<|tool▁calls▁begin|>",
80
+ "lstrip": false,
81
+ "normalized": true,
82
+ "rstrip": false,
83
+ "single_word": false,
84
+ "special": false
85
+ },
86
+ "100010": {
87
+ "content": "<|tool▁calls▁end|>",
88
+ "lstrip": false,
89
+ "normalized": true,
90
+ "rstrip": false,
91
+ "single_word": false,
92
+ "special": false
93
+ },
94
+ "100011": {
95
+ "content": "<|tool▁call▁begin|>",
96
+ "lstrip": false,
97
+ "normalized": true,
98
+ "rstrip": false,
99
+ "single_word": false,
100
+ "special": false
101
+ },
102
+ "100012": {
103
+ "content": "<|tool▁call▁end|>",
104
+ "lstrip": false,
105
+ "normalized": true,
106
+ "rstrip": false,
107
+ "single_word": false,
108
+ "special": false
109
+ },
110
+ "100013": {
111
+ "content": "<|tool▁outputs▁begin|>",
112
+ "lstrip": false,
113
+ "normalized": true,
114
+ "rstrip": false,
115
+ "single_word": false,
116
+ "special": false
117
+ },
118
+ "100014": {
119
+ "content": "<|tool▁outputs▁end|>",
120
+ "lstrip": false,
121
+ "normalized": true,
122
+ "rstrip": false,
123
+ "single_word": false,
124
+ "special": false
125
+ },
126
+ "100015": {
127
+ "content": "<|tool▁output▁begin|>",
128
+ "lstrip": false,
129
+ "normalized": true,
130
+ "rstrip": false,
131
+ "single_word": false,
132
+ "special": false
133
+ },
134
+ "100016": {
135
+ "content": "<|tool▁output▁end|>",
136
+ "lstrip": false,
137
+ "normalized": true,
138
+ "rstrip": false,
139
+ "single_word": false,
140
+ "special": false
141
+ },
142
+ "100017": {
143
+ "content": "<|tool▁sep|>",
144
+ "lstrip": false,
145
+ "normalized": true,
146
+ "rstrip": false,
147
+ "single_word": false,
148
+ "special": false
149
+ }
150
+ },
151
+ "bos_token": "<|begin▁of▁sentence|>",
152
+ "clean_up_tokenization_spaces": false,
153
+ "eos_token": "<|end▁of▁sentence|>",
154
+ "extra_special_tokens": {},
155
+ "fast_tokenizer": true,
156
+ "legacy": true,
157
+ "model_max_length": 16384,
158
+ "pad_token": "<|end▁of▁sentence|>",
159
+ "sp_model_kwargs": {},
160
+ "tokenizer_class": "LlamaTokenizerFast",
161
+ "unk_token": null,
162
+ "use_default_system_prompt": false
163
+ }
top_32_experts_HectorHe_math7k.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"model.layers.1.mlp": [61, 51, 44, 14, 45, 22, 8, 43, 57, 0, 4, 7, 13, 19, 31, 18, 37, 40, 5, 52, 27, 59, 48, 2, 9, 42, 41, 54, 21, 24, 10, 56], "model.layers.2.mlp": [27, 25, 18, 3, 23, 13, 17, 45, 7, 15, 46, 24, 63, 62, 5, 8, 56, 16, 0, 61, 26, 9, 58, 49, 14, 52, 42, 20, 38, 59, 47, 31], "model.layers.3.mlp": [54, 25, 57, 28, 41, 23, 26, 4, 2, 12, 33, 22, 24, 43, 50, 21, 55, 6, 0, 16, 62, 20, 30, 5, 47, 53, 51, 60, 48, 8, 59, 7], "model.layers.4.mlp": [11, 37, 21, 49, 33, 14, 47, 29, 32, 17, 0, 5, 31, 34, 7, 8, 30, 22, 61, 44, 57, 27, 55, 62, 38, 20, 54, 39, 52, 18, 43, 36], "model.layers.5.mlp": [54, 47, 20, 35, 9, 52, 14, 59, 45, 51, 33, 61, 42, 34, 29, 27, 40, 60, 12, 24, 43, 16, 36, 58, 22, 18, 38, 8, 13, 62, 57, 56], "model.layers.6.mlp": [22, 13, 1, 42, 45, 47, 28, 27, 8, 38, 61, 54, 36, 40, 7, 25, 14, 52, 49, 16, 21, 44, 51, 56, 3, 18, 15, 20, 0, 46, 37, 12], "model.layers.7.mlp": [58, 18, 43, 24, 44, 62, 2, 14, 53, 63, 51, 60, 35, 45, 42, 40, 23, 36, 30, 7, 22, 8, 26, 21, 46, 39, 50, 52, 0, 33, 6, 5], "model.layers.8.mlp": [47, 39, 30, 54, 56, 58, 17, 37, 36, 7, 24, 22, 19, 5, 45, 62, 42, 51, 29, 44, 21, 1, 10, 20, 33, 6, 34, 3, 46, 31, 9, 60], "model.layers.9.mlp": [12, 13, 31, 22, 32, 24, 56, 28, 37, 57, 11, 21, 30, 51, 36, 34, 54, 60, 35, 58, 39, 48, 46, 63, 6, 1, 42, 3, 15, 41, 45, 4], "model.layers.10.mlp": [47, 19, 42, 2, 13, 22, 43, 21, 28, 33, 38, 31, 62, 15, 60, 4, 53, 14, 55, 26, 16, 29, 41, 52, 11, 24, 3, 57, 58, 59, 27, 40], "model.layers.11.mlp": [29, 11, 17, 59, 10, 22, 14, 3, 40, 33, 30, 8, 37, 6, 35, 44, 13, 50, 57, 61, 52, 36, 41, 12, 43, 27, 21, 60, 0, 23, 31, 56], "model.layers.12.mlp": [5, 56, 59, 3, 4, 6, 26, 40, 49, 53, 52, 13, 51, 16, 25, 63, 11, 18, 22, 33, 29, 37, 50, 31, 43, 7, 38, 20, 34, 17, 48, 27], "model.layers.13.mlp": [10, 58, 42, 47, 14, 17, 4, 39, 51, 52, 8, 0, 22, 50, 62, 63, 61, 6, 40, 60, 21, 35, 33, 29, 7, 32, 38, 26, 31, 25, 16, 1], "model.layers.14.mlp": [7, 27, 51, 31, 18, 61, 40, 16, 6, 54, 29, 49, 39, 25, 37, 8, 10, 52, 47, 42, 41, 15, 32, 45, 30, 55, 50, 2, 4, 28, 63, 56], "model.layers.15.mlp": [24, 55, 5, 17, 41, 14, 3, 59, 56, 27, 51, 21, 12, 46, 49, 31, 25, 10, 43, 45, 62, 47, 60, 52, 53, 37, 19, 63, 2, 8, 58, 13], "model.layers.16.mlp": [33, 61, 63, 49, 19, 9, 51, 21, 56, 8, 11, 58, 23, 1, 27, 17, 42, 15, 25, 57, 60, 6, 7, 52, 41, 46, 30, 3, 45, 35, 36, 38], "model.layers.17.mlp": [0, 43, 26, 27, 32, 29, 63, 25, 39, 14, 47, 35, 48, 8, 58, 52, 55, 34, 13, 33, 9, 40, 30, 51, 16, 37, 56, 31, 3, 42, 50, 60], "model.layers.18.mlp": [5, 56, 42, 36, 2, 1, 38, 62, 47, 45, 12, 20, 46, 52, 11, 32, 22, 57, 51, 19, 3, 7, 34, 49, 4, 53, 18, 55, 13, 16, 41, 54], "model.layers.19.mlp": [23, 2, 24, 40, 36, 0, 51, 59, 44, 7, 45, 21, 31, 47, 53, 57, 20, 49, 3, 14, 30, 56, 48, 52, 9, 19, 39, 8, 55, 33, 37, 34], "model.layers.20.mlp": [56, 1, 48, 38, 20, 58, 5, 46, 19, 3, 26, 6, 59, 42, 52, 53, 24, 22, 21, 36, 45, 11, 23, 41, 17, 25, 62, 44, 57, 43, 28, 35], "model.layers.21.mlp": [5, 15, 13, 10, 19, 28, 40, 31, 46, 57, 43, 20, 30, 29, 22, 62, 9, 58, 23, 24, 14, 47, 50, 27, 41, 38, 32, 61, 33, 63, 51, 1], "model.layers.22.mlp": [32, 58, 3, 31, 45, 14, 8, 26, 10, 4, 12, 30, 16, 2, 40, 60, 59, 38, 28, 42, 21, 25, 56, 39, 18, 51, 47, 36, 46, 24, 48, 0], "model.layers.23.mlp": [20, 0, 45, 58, 33, 42, 19, 26, 59, 35, 18, 6, 40, 36, 48, 29, 61, 17, 43, 39, 14, 41, 27, 8, 23, 56, 62, 28, 38, 57, 22, 2], "model.layers.24.mlp": [62, 10, 42, 7, 47, 63, 30, 20, 6, 5, 9, 21, 13, 56, 51, 55, 49, 14, 58, 39, 33, 23, 37, 61, 28, 1, 60, 12, 35, 50, 27, 29], "model.layers.25.mlp": [45, 48, 39, 11, 46, 38, 51, 16, 58, 15, 50, 1, 35, 14, 20, 40, 12, 0, 5, 47, 25, 18, 10, 27, 29, 60, 17, 24, 61, 31, 4, 63], "model.layers.26.mlp": [49, 6, 46, 13, 57, 11, 41, 35, 60, 20, 25, 32, 63, 27, 4, 52, 14, 2, 19, 16, 36, 45, 53, 56, 15, 38, 1, 30, 43, 50, 8, 58]}
training.log ADDED
@@ -0,0 +1,1010 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2025-08-18 17:38:04 - INFO - __main__ - Model parameters ModelConfig(model_name_or_path='/home/ubuntu/efs/hector/data/DeepSeek-Coder-V2-Lite-Instruct/sft/math7k/checkpoint-645', model_revision='main', torch_dtype='bfloat16', trust_remote_code=True, attn_implementation='flash_attention_2', use_peft=False, lora_r=16, lora_alpha=32, lora_dropout=0.05, lora_target_modules=None, lora_modules_to_save=None, lora_task_type='CAUSAL_LM', use_rslora=False, use_dora=False, load_in_8bit=False, load_in_4bit=False, bnb_4bit_quant_type='nf4', use_bnb_nested_quant=False)
2
+ 2025-08-18 17:38:04 - INFO - __main__ - Script parameters ScriptArguments(dataset_name='HectorHe/math7k', dataset_config=None, dataset_train_split='train', dataset_test_split='test', gradient_checkpointing_use_reentrant=False, ignore_bias_buffers=False)
3
+ 2025-08-18 17:38:04 - INFO - __main__ - Training parameters EfficientDistillationConfig(
4
+ _n_gpu=1,
5
+ accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False},
6
+ adafactor=False,
7
+ adam_beta1=0.9,
8
+ adam_beta2=0.999,
9
+ adam_epsilon=1e-08,
10
+ alpha=0.45,
11
+ auto_find_batch_size=False,
12
+ average_tokens_across_devices=False,
13
+ batch_eval_metrics=False,
14
+ benchmarks=[],
15
+ bf16=True,
16
+ bf16_full_eval=False,
17
+ callbacks=[],
18
+ ce_loss_scale=1.0,
19
+ chars_per_token=<CHARS_PER_TOKEN>,
20
+ chat_template=None,
21
+ completion_only_loss=None,
22
+ data_seed=None,
23
+ dataloader_drop_last=False,
24
+ dataloader_num_workers=0,
25
+ dataloader_persistent_workers=False,
26
+ dataloader_pin_memory=True,
27
+ dataloader_prefetch_factor=None,
28
+ dataset_batch_size=None,
29
+ dataset_kwargs=None,
30
+ dataset_num_proc=None,
31
+ dataset_text_field=text,
32
+ ddp_backend=None,
33
+ ddp_broadcast_buffers=None,
34
+ ddp_bucket_cap_mb=None,
35
+ ddp_find_unused_parameters=None,
36
+ ddp_timeout=1800000000,
37
+ debug=[],
38
+ deepspeed=None,
39
+ delta=0.05,
40
+ disable_dropout=True,
41
+ disable_tqdm=False,
42
+ do_eval=True,
43
+ do_predict=False,
44
+ do_train=False,
45
+ enhance_type=subset_expert_moe,
46
+ eos_token=<EOS_TOKEN>,
47
+ eval_accumulation_steps=None,
48
+ eval_delay=0,
49
+ eval_do_concat_batches=True,
50
+ eval_on_start=False,
51
+ eval_packing=None,
52
+ eval_steps=None,
53
+ eval_strategy=IntervalStrategy.NO,
54
+ eval_use_gather_object=False,
55
+ expert_num=32,
56
+ fp16=False,
57
+ fp16_backend=auto,
58
+ fp16_full_eval=False,
59
+ fp16_opt_level=O1,
60
+ fsdp=[],
61
+ fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False},
62
+ fsdp_min_num_params=0,
63
+ fsdp_transformer_layer_cls_to_wrap=None,
64
+ full_determinism=False,
65
+ gradient_accumulation_steps=1,
66
+ gradient_checkpointing=True,
67
+ gradient_checkpointing_kwargs={'use_reentrant': False},
68
+ greater_is_better=None,
69
+ group_by_length=False,
70
+ half_precision_backend=auto,
71
+ hub_always_push=False,
72
+ hub_model_id=Deepseek-V2-13B-Math7K-Expert-Enhance-Subset-Expert-MoE-32-experts,
73
+ hub_model_revision=main,
74
+ hub_private_repo=None,
75
+ hub_strategy=HubStrategy.EVERY_SAVE,
76
+ hub_token=<HUB_TOKEN>,
77
+ ignore_data_skip=False,
78
+ include_for_metrics=[],
79
+ include_inputs_for_metrics=False,
80
+ include_num_input_tokens_seen=False,
81
+ include_tokens_per_second=False,
82
+ jit_mode_eval=False,
83
+ kl_loss_scale=1.0,
84
+ label_names=None,
85
+ label_smoothing_factor=0.0,
86
+ learning_rate=5e-06,
87
+ length_column_name=length,
88
+ lmbda=0.0,
89
+ load_best_model_at_end=False,
90
+ local_rank=0,
91
+ log_level=info,
92
+ log_level_replica=warning,
93
+ log_on_each_node=True,
94
+ logging_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/runs/Aug18_17-38-04_ip-172-31-35-162,
95
+ logging_first_step=False,
96
+ logging_nan_inf_filter=True,
97
+ logging_steps=1,
98
+ logging_strategy=IntervalStrategy.STEPS,
99
+ loss_type=mixture,
100
+ lr_scheduler_kwargs={'min_lr_rate': 0.1},
101
+ lr_scheduler_type=SchedulerType.COSINE_WITH_MIN_LR,
102
+ max_grad_norm=1.0,
103
+ max_length=4096,
104
+ max_new_tokens=512,
105
+ max_seq_length=None,
106
+ max_steps=-1,
107
+ metric_for_best_model=None,
108
+ model_init_kwargs=None,
109
+ mp_parameters=,
110
+ neftune_noise_alpha=None,
111
+ no_cuda=False,
112
+ num_of_sequences=None,
113
+ num_train_epochs=1,
114
+ optim=OptimizerNames.ADAMW_TORCH,
115
+ optim_args=None,
116
+ optim_target_modules=None,
117
+ output_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
118
+ overwrite_hub_revision=False,
119
+ overwrite_output_dir=True,
120
+ packing=False,
121
+ pad_to_multiple_of=None,
122
+ pad_token=<PAD_TOKEN>,
123
+ padding_free=False,
124
+ past_index=-1,
125
+ per_device_eval_batch_size=16,
126
+ per_device_train_batch_size=4,
127
+ prediction_loss_only=False,
128
+ push_to_hub=True,
129
+ push_to_hub_model_id=None,
130
+ push_to_hub_organization=None,
131
+ push_to_hub_revision=False,
132
+ push_to_hub_token=<PUSH_TO_HUB_TOKEN>,
133
+ ray_scope=last,
134
+ reduction=batchmean,
135
+ remove_unused_columns=True,
136
+ report_to=['wandb'],
137
+ restore_callback_states_from_checkpoint=False,
138
+ resume_from_checkpoint=None,
139
+ run_name=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
140
+ save_on_each_node=False,
141
+ save_only_model=False,
142
+ save_safetensors=True,
143
+ save_steps=500,
144
+ save_strategy=SaveStrategy.STEPS,
145
+ save_total_limit=1,
146
+ seed=1234,
147
+ skip_memory_metrics=True,
148
+ system_prompt=None,
149
+ teacher_model_init_kwargs=None,
150
+ teacher_model_name_or_path=None,
151
+ temperature=0.9,
152
+ tf32=None,
153
+ torch_compile=False,
154
+ torch_compile_backend=None,
155
+ torch_compile_mode=None,
156
+ torch_empty_cache_steps=None,
157
+ torchdynamo=None,
158
+ tpu_metrics_debug=False,
159
+ tpu_num_cores=None,
160
+ use_cpu=False,
161
+ use_ipex=False,
162
+ use_legacy_prediction_loop=False,
163
+ use_liger=False,
164
+ use_liger_kernel=False,
165
+ use_mps_device=False,
166
+ wandb_entity=None,
167
+ wandb_project=None,
168
+ warmup_ratio=0.1,
169
+ warmup_steps=0,
170
+ weight_decay=0.0,
171
+ )
172
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
173
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
174
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
175
+ 2025-08-18 17:38:05 - INFO - __main__ - *** Initializing model kwargs ***
176
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
177
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
178
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
179
+ 2025-08-18 17:38:05 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
180
+ 2025-08-18 17:38:06 - ERROR - __main__ - Top k experts file not found at data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json. Run part 1 first.
181
+ 2025-08-18 17:38:57 - INFO - __main__ - Model parameters ModelConfig(model_name_or_path='/home/ubuntu/efs/hector/data/DeepSeek-Coder-V2-Lite-Instruct/sft/math7k/checkpoint-645', model_revision='main', torch_dtype='bfloat16', trust_remote_code=True, attn_implementation='flash_attention_2', use_peft=False, lora_r=16, lora_alpha=32, lora_dropout=0.05, lora_target_modules=None, lora_modules_to_save=None, lora_task_type='CAUSAL_LM', use_rslora=False, use_dora=False, load_in_8bit=False, load_in_4bit=False, bnb_4bit_quant_type='nf4', use_bnb_nested_quant=False)
182
+ 2025-08-18 17:38:57 - INFO - __main__ - Script parameters ScriptArguments(dataset_name='HectorHe/math7k', dataset_config=None, dataset_train_split='train', dataset_test_split='test', gradient_checkpointing_use_reentrant=False, ignore_bias_buffers=False)
183
+ 2025-08-18 17:38:57 - INFO - __main__ - Training parameters EfficientDistillationConfig(
184
+ _n_gpu=1,
185
+ accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False},
186
+ adafactor=False,
187
+ adam_beta1=0.9,
188
+ adam_beta2=0.999,
189
+ adam_epsilon=1e-08,
190
+ alpha=0.45,
191
+ auto_find_batch_size=False,
192
+ average_tokens_across_devices=False,
193
+ batch_eval_metrics=False,
194
+ benchmarks=[],
195
+ bf16=True,
196
+ bf16_full_eval=False,
197
+ callbacks=[],
198
+ ce_loss_scale=1.0,
199
+ chars_per_token=<CHARS_PER_TOKEN>,
200
+ chat_template=None,
201
+ completion_only_loss=None,
202
+ data_seed=None,
203
+ dataloader_drop_last=False,
204
+ dataloader_num_workers=0,
205
+ dataloader_persistent_workers=False,
206
+ dataloader_pin_memory=True,
207
+ dataloader_prefetch_factor=None,
208
+ dataset_batch_size=None,
209
+ dataset_kwargs=None,
210
+ dataset_num_proc=None,
211
+ dataset_text_field=text,
212
+ ddp_backend=None,
213
+ ddp_broadcast_buffers=None,
214
+ ddp_bucket_cap_mb=None,
215
+ ddp_find_unused_parameters=None,
216
+ ddp_timeout=1800000000,
217
+ debug=[],
218
+ deepspeed=None,
219
+ delta=0.05,
220
+ disable_dropout=True,
221
+ disable_tqdm=False,
222
+ do_eval=True,
223
+ do_predict=False,
224
+ do_train=False,
225
+ enhance_type=subset_expert_moe,
226
+ eos_token=<EOS_TOKEN>,
227
+ eval_accumulation_steps=None,
228
+ eval_delay=0,
229
+ eval_do_concat_batches=True,
230
+ eval_on_start=False,
231
+ eval_packing=None,
232
+ eval_steps=None,
233
+ eval_strategy=IntervalStrategy.NO,
234
+ eval_use_gather_object=False,
235
+ expert_num=32,
236
+ fp16=False,
237
+ fp16_backend=auto,
238
+ fp16_full_eval=False,
239
+ fp16_opt_level=O1,
240
+ fsdp=[],
241
+ fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False},
242
+ fsdp_min_num_params=0,
243
+ fsdp_transformer_layer_cls_to_wrap=None,
244
+ full_determinism=False,
245
+ gradient_accumulation_steps=1,
246
+ gradient_checkpointing=True,
247
+ gradient_checkpointing_kwargs={'use_reentrant': False},
248
+ greater_is_better=None,
249
+ group_by_length=False,
250
+ half_precision_backend=auto,
251
+ hub_always_push=False,
252
+ hub_model_id=Deepseek-V2-13B-Math7K-Expert-Enhance-Subset-Expert-MoE-32-experts,
253
+ hub_model_revision=main,
254
+ hub_private_repo=None,
255
+ hub_strategy=HubStrategy.EVERY_SAVE,
256
+ hub_token=<HUB_TOKEN>,
257
+ ignore_data_skip=False,
258
+ include_for_metrics=[],
259
+ include_inputs_for_metrics=False,
260
+ include_num_input_tokens_seen=False,
261
+ include_tokens_per_second=False,
262
+ jit_mode_eval=False,
263
+ kl_loss_scale=1.0,
264
+ label_names=None,
265
+ label_smoothing_factor=0.0,
266
+ learning_rate=5e-06,
267
+ length_column_name=length,
268
+ lmbda=0.0,
269
+ load_best_model_at_end=False,
270
+ local_rank=0,
271
+ log_level=info,
272
+ log_level_replica=warning,
273
+ log_on_each_node=True,
274
+ logging_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/runs/Aug18_17-38-57_ip-172-31-35-162,
275
+ logging_first_step=False,
276
+ logging_nan_inf_filter=True,
277
+ logging_steps=1,
278
+ logging_strategy=IntervalStrategy.STEPS,
279
+ loss_type=mixture,
280
+ lr_scheduler_kwargs={'min_lr_rate': 0.1},
281
+ lr_scheduler_type=SchedulerType.COSINE_WITH_MIN_LR,
282
+ max_grad_norm=1.0,
283
+ max_length=4096,
284
+ max_new_tokens=512,
285
+ max_seq_length=None,
286
+ max_steps=-1,
287
+ metric_for_best_model=None,
288
+ model_init_kwargs=None,
289
+ mp_parameters=,
290
+ neftune_noise_alpha=None,
291
+ no_cuda=False,
292
+ num_of_sequences=None,
293
+ num_train_epochs=1,
294
+ optim=OptimizerNames.ADAMW_TORCH,
295
+ optim_args=None,
296
+ optim_target_modules=None,
297
+ output_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
298
+ overwrite_hub_revision=False,
299
+ overwrite_output_dir=True,
300
+ packing=False,
301
+ pad_to_multiple_of=None,
302
+ pad_token=<PAD_TOKEN>,
303
+ padding_free=False,
304
+ past_index=-1,
305
+ per_device_eval_batch_size=16,
306
+ per_device_train_batch_size=4,
307
+ prediction_loss_only=False,
308
+ push_to_hub=True,
309
+ push_to_hub_model_id=None,
310
+ push_to_hub_organization=None,
311
+ push_to_hub_revision=False,
312
+ push_to_hub_token=<PUSH_TO_HUB_TOKEN>,
313
+ ray_scope=last,
314
+ reduction=batchmean,
315
+ remove_unused_columns=True,
316
+ report_to=['wandb'],
317
+ restore_callback_states_from_checkpoint=False,
318
+ resume_from_checkpoint=None,
319
+ run_name=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
320
+ save_on_each_node=False,
321
+ save_only_model=False,
322
+ save_safetensors=True,
323
+ save_steps=500,
324
+ save_strategy=SaveStrategy.STEPS,
325
+ save_total_limit=1,
326
+ seed=1234,
327
+ skip_memory_metrics=True,
328
+ system_prompt=None,
329
+ teacher_model_init_kwargs=None,
330
+ teacher_model_name_or_path=None,
331
+ temperature=0.9,
332
+ tf32=None,
333
+ torch_compile=False,
334
+ torch_compile_backend=None,
335
+ torch_compile_mode=None,
336
+ torch_empty_cache_steps=None,
337
+ torchdynamo=None,
338
+ tpu_metrics_debug=False,
339
+ tpu_num_cores=None,
340
+ use_cpu=False,
341
+ use_ipex=False,
342
+ use_legacy_prediction_loop=False,
343
+ use_liger=False,
344
+ use_liger_kernel=False,
345
+ use_mps_device=False,
346
+ wandb_entity=None,
347
+ wandb_project=None,
348
+ warmup_ratio=0.1,
349
+ warmup_steps=0,
350
+ weight_decay=0.0,
351
+ )
352
+ 2025-08-18 17:38:58 - INFO - __main__ - *** Initializing model kwargs ***
353
+ 2025-08-18 17:38:58 - INFO - __main__ - Loaded top k experts from data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json: {'model.layers.1.mlp': [61, 51, 44, 14, 45, 22, 8, 43, 57, 0, 4, 7, 13, 19, 31, 18, 37, 40, 5, 52, 27, 59, 48, 2, 9, 42, 41, 54, 21, 24, 10, 56], 'model.layers.2.mlp': [27, 25, 18, 3, 23, 13, 17, 45, 7, 15, 46, 24, 63, 62, 5, 8, 56, 16, 0, 61, 26, 9, 58, 49, 14, 52, 42, 20, 38, 59, 47, 31], 'model.layers.3.mlp': [54, 25, 57, 28, 41, 23, 26, 4, 2, 12, 33, 22, 24, 43, 50, 21, 55, 6, 0, 16, 62, 20, 30, 5, 47, 53, 51, 60, 48, 8, 59, 7], 'model.layers.4.mlp': [11, 37, 21, 49, 33, 14, 47, 29, 32, 17, 0, 5, 31, 34, 7, 8, 30, 22, 61, 44, 57, 27, 55, 62, 38, 20, 54, 39, 52, 18, 43, 36], 'model.layers.5.mlp': [54, 47, 20, 35, 9, 52, 14, 59, 45, 51, 33, 61, 42, 34, 29, 27, 40, 60, 12, 24, 43, 16, 36, 58, 22, 18, 38, 8, 13, 62, 57, 56], 'model.layers.6.mlp': [22, 13, 1, 42, 45, 47, 28, 27, 8, 38, 61, 54, 36, 40, 7, 25, 14, 52, 49, 16, 21, 44, 51, 56, 3, 18, 15, 20, 0, 46, 37, 12], 'model.layers.7.mlp': [58, 18, 43, 24, 44, 62, 2, 14, 53, 63, 51, 60, 35, 45, 42, 40, 23, 36, 30, 7, 22, 8, 26, 21, 46, 39, 50, 52, 0, 33, 6, 5], 'model.layers.8.mlp': [47, 39, 30, 54, 56, 58, 17, 37, 36, 7, 24, 22, 19, 5, 45, 62, 42, 51, 29, 44, 21, 1, 10, 20, 33, 6, 34, 3, 46, 31, 9, 60], 'model.layers.9.mlp': [12, 13, 31, 22, 32, 24, 56, 28, 37, 57, 11, 21, 30, 51, 36, 34, 54, 60, 35, 58, 39, 48, 46, 63, 6, 1, 42, 3, 15, 41, 45, 4], 'model.layers.10.mlp': [47, 19, 42, 2, 13, 22, 43, 21, 28, 33, 38, 31, 62, 15, 60, 4, 53, 14, 55, 26, 16, 29, 41, 52, 11, 24, 3, 57, 58, 59, 27, 40], 'model.layers.11.mlp': [29, 11, 17, 59, 10, 22, 14, 3, 40, 33, 30, 8, 37, 6, 35, 44, 13, 50, 57, 61, 52, 36, 41, 12, 43, 27, 21, 60, 0, 23, 31, 56], 'model.layers.12.mlp': [5, 56, 59, 3, 4, 6, 26, 40, 49, 53, 52, 13, 51, 16, 25, 63, 11, 18, 22, 33, 29, 37, 50, 31, 43, 7, 38, 20, 34, 17, 48, 27], 'model.layers.13.mlp': [10, 58, 42, 47, 14, 17, 4, 39, 51, 52, 8, 0, 22, 50, 62, 63, 61, 6, 40, 60, 21, 35, 33, 29, 7, 32, 38, 26, 31, 25, 16, 1], 'model.layers.14.mlp': [7, 27, 51, 31, 18, 61, 40, 16, 6, 54, 29, 49, 39, 25, 37, 8, 10, 52, 47, 42, 41, 15, 32, 45, 30, 55, 50, 2, 4, 28, 63, 56], 'model.layers.15.mlp': [24, 55, 5, 17, 41, 14, 3, 59, 56, 27, 51, 21, 12, 46, 49, 31, 25, 10, 43, 45, 62, 47, 60, 52, 53, 37, 19, 63, 2, 8, 58, 13], 'model.layers.16.mlp': [33, 61, 63, 49, 19, 9, 51, 21, 56, 8, 11, 58, 23, 1, 27, 17, 42, 15, 25, 57, 60, 6, 7, 52, 41, 46, 30, 3, 45, 35, 36, 38], 'model.layers.17.mlp': [0, 43, 26, 27, 32, 29, 63, 25, 39, 14, 47, 35, 48, 8, 58, 52, 55, 34, 13, 33, 9, 40, 30, 51, 16, 37, 56, 31, 3, 42, 50, 60], 'model.layers.18.mlp': [5, 56, 42, 36, 2, 1, 38, 62, 47, 45, 12, 20, 46, 52, 11, 32, 22, 57, 51, 19, 3, 7, 34, 49, 4, 53, 18, 55, 13, 16, 41, 54], 'model.layers.19.mlp': [23, 2, 24, 40, 36, 0, 51, 59, 44, 7, 45, 21, 31, 47, 53, 57, 20, 49, 3, 14, 30, 56, 48, 52, 9, 19, 39, 8, 55, 33, 37, 34], 'model.layers.20.mlp': [56, 1, 48, 38, 20, 58, 5, 46, 19, 3, 26, 6, 59, 42, 52, 53, 24, 22, 21, 36, 45, 11, 23, 41, 17, 25, 62, 44, 57, 43, 28, 35], 'model.layers.21.mlp': [5, 15, 13, 10, 19, 28, 40, 31, 46, 57, 43, 20, 30, 29, 22, 62, 9, 58, 23, 24, 14, 47, 50, 27, 41, 38, 32, 61, 33, 63, 51, 1], 'model.layers.22.mlp': [32, 58, 3, 31, 45, 14, 8, 26, 10, 4, 12, 30, 16, 2, 40, 60, 59, 38, 28, 42, 21, 25, 56, 39, 18, 51, 47, 36, 46, 24, 48, 0], 'model.layers.23.mlp': [20, 0, 45, 58, 33, 42, 19, 26, 59, 35, 18, 6, 40, 36, 48, 29, 61, 17, 43, 39, 14, 41, 27, 8, 23, 56, 62, 28, 38, 57, 22, 2], 'model.layers.24.mlp': [62, 10, 42, 7, 47, 63, 30, 20, 6, 5, 9, 21, 13, 56, 51, 55, 49, 14, 58, 39, 33, 23, 37, 61, 28, 1, 60, 12, 35, 50, 27, 29], 'model.layers.25.mlp': [45, 48, 39, 11, 46, 38, 51, 16, 58, 15, 50, 1, 35, 14, 20, 40, 12, 0, 5, 47, 25, 18, 10, 27, 29, 60, 17, 24, 61, 31, 4, 63], 'model.layers.26.mlp': [49, 6, 46, 13, 57, 11, 41, 35, 60, 20, 25, 32, 63, 27, 4, 52, 14, 2, 19, 16, 36, 45, 53, 56, 15, 38, 1, 30, 43, 50, 8, 58]}
354
+ 2025-08-18 17:38:58 - INFO - __main__ - Model memory before loading model:Memory allocated: 0.0
355
+ Memory reserved: 0.0
356
+ 2025-08-18 17:40:57 - INFO - __main__ - Model parameters ModelConfig(model_name_or_path='/home/ubuntu/efs/hector/data/DeepSeek-Coder-V2-Lite-Instruct/sft/math7k/checkpoint-645', model_revision='main', torch_dtype='bfloat16', trust_remote_code=True, attn_implementation='flash_attention_2', use_peft=False, lora_r=16, lora_alpha=32, lora_dropout=0.05, lora_target_modules=None, lora_modules_to_save=None, lora_task_type='CAUSAL_LM', use_rslora=False, use_dora=False, load_in_8bit=False, load_in_4bit=False, bnb_4bit_quant_type='nf4', use_bnb_nested_quant=False)
357
+ 2025-08-18 17:40:57 - INFO - __main__ - Script parameters ScriptArguments(dataset_name='HectorHe/math7k', dataset_config=None, dataset_train_split='train', dataset_test_split='test', gradient_checkpointing_use_reentrant=False, ignore_bias_buffers=False)
358
+ 2025-08-18 17:40:57 - INFO - __main__ - Training parameters EfficientDistillationConfig(
359
+ _n_gpu=1,
360
+ accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False},
361
+ adafactor=False,
362
+ adam_beta1=0.9,
363
+ adam_beta2=0.999,
364
+ adam_epsilon=1e-08,
365
+ alpha=0.45,
366
+ auto_find_batch_size=False,
367
+ average_tokens_across_devices=False,
368
+ batch_eval_metrics=False,
369
+ benchmarks=[],
370
+ bf16=True,
371
+ bf16_full_eval=False,
372
+ callbacks=[],
373
+ ce_loss_scale=1.0,
374
+ chars_per_token=<CHARS_PER_TOKEN>,
375
+ chat_template=None,
376
+ completion_only_loss=None,
377
+ data_seed=None,
378
+ dataloader_drop_last=False,
379
+ dataloader_num_workers=0,
380
+ dataloader_persistent_workers=False,
381
+ dataloader_pin_memory=True,
382
+ dataloader_prefetch_factor=None,
383
+ dataset_batch_size=None,
384
+ dataset_kwargs=None,
385
+ dataset_num_proc=None,
386
+ dataset_text_field=text,
387
+ ddp_backend=None,
388
+ ddp_broadcast_buffers=None,
389
+ ddp_bucket_cap_mb=None,
390
+ ddp_find_unused_parameters=None,
391
+ ddp_timeout=1800000000,
392
+ debug=[],
393
+ deepspeed=None,
394
+ delta=0.05,
395
+ disable_dropout=True,
396
+ disable_tqdm=False,
397
+ do_eval=True,
398
+ do_predict=False,
399
+ do_train=False,
400
+ enhance_type=subset_expert_moe,
401
+ eos_token=<EOS_TOKEN>,
402
+ eval_accumulation_steps=None,
403
+ eval_delay=0,
404
+ eval_do_concat_batches=True,
405
+ eval_on_start=False,
406
+ eval_packing=None,
407
+ eval_steps=None,
408
+ eval_strategy=IntervalStrategy.NO,
409
+ eval_use_gather_object=False,
410
+ expert_num=32,
411
+ fp16=False,
412
+ fp16_backend=auto,
413
+ fp16_full_eval=False,
414
+ fp16_opt_level=O1,
415
+ fsdp=[],
416
+ fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False},
417
+ fsdp_min_num_params=0,
418
+ fsdp_transformer_layer_cls_to_wrap=None,
419
+ full_determinism=False,
420
+ gradient_accumulation_steps=1,
421
+ gradient_checkpointing=True,
422
+ gradient_checkpointing_kwargs={'use_reentrant': False},
423
+ greater_is_better=None,
424
+ group_by_length=False,
425
+ half_precision_backend=auto,
426
+ hub_always_push=False,
427
+ hub_model_id=Deepseek-V2-13B-Math7K-Expert-Enhance-Subset-Expert-MoE-32-experts,
428
+ hub_model_revision=main,
429
+ hub_private_repo=None,
430
+ hub_strategy=HubStrategy.EVERY_SAVE,
431
+ hub_token=<HUB_TOKEN>,
432
+ ignore_data_skip=False,
433
+ include_for_metrics=[],
434
+ include_inputs_for_metrics=False,
435
+ include_num_input_tokens_seen=False,
436
+ include_tokens_per_second=False,
437
+ jit_mode_eval=False,
438
+ kl_loss_scale=1.0,
439
+ label_names=None,
440
+ label_smoothing_factor=0.0,
441
+ learning_rate=5e-06,
442
+ length_column_name=length,
443
+ lmbda=0.0,
444
+ load_best_model_at_end=False,
445
+ local_rank=0,
446
+ log_level=info,
447
+ log_level_replica=warning,
448
+ log_on_each_node=True,
449
+ logging_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/runs/Aug18_17-40-57_ip-172-31-35-162,
450
+ logging_first_step=False,
451
+ logging_nan_inf_filter=True,
452
+ logging_steps=1,
453
+ logging_strategy=IntervalStrategy.STEPS,
454
+ loss_type=mixture,
455
+ lr_scheduler_kwargs={'min_lr_rate': 0.1},
456
+ lr_scheduler_type=SchedulerType.COSINE_WITH_MIN_LR,
457
+ max_grad_norm=1.0,
458
+ max_length=4096,
459
+ max_new_tokens=512,
460
+ max_seq_length=None,
461
+ max_steps=-1,
462
+ metric_for_best_model=None,
463
+ model_init_kwargs=None,
464
+ mp_parameters=,
465
+ neftune_noise_alpha=None,
466
+ no_cuda=False,
467
+ num_of_sequences=None,
468
+ num_train_epochs=1,
469
+ optim=OptimizerNames.ADAMW_TORCH,
470
+ optim_args=None,
471
+ optim_target_modules=None,
472
+ output_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
473
+ overwrite_hub_revision=False,
474
+ overwrite_output_dir=True,
475
+ packing=False,
476
+ pad_to_multiple_of=None,
477
+ pad_token=<PAD_TOKEN>,
478
+ padding_free=False,
479
+ past_index=-1,
480
+ per_device_eval_batch_size=16,
481
+ per_device_train_batch_size=4,
482
+ prediction_loss_only=False,
483
+ push_to_hub=True,
484
+ push_to_hub_model_id=None,
485
+ push_to_hub_organization=None,
486
+ push_to_hub_revision=False,
487
+ push_to_hub_token=<PUSH_TO_HUB_TOKEN>,
488
+ ray_scope=last,
489
+ reduction=batchmean,
490
+ remove_unused_columns=True,
491
+ report_to=['wandb'],
492
+ restore_callback_states_from_checkpoint=False,
493
+ resume_from_checkpoint=None,
494
+ run_name=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
495
+ save_on_each_node=False,
496
+ save_only_model=False,
497
+ save_safetensors=True,
498
+ save_steps=500,
499
+ save_strategy=SaveStrategy.STEPS,
500
+ save_total_limit=1,
501
+ seed=1234,
502
+ skip_memory_metrics=True,
503
+ system_prompt=None,
504
+ teacher_model_init_kwargs=None,
505
+ teacher_model_name_or_path=None,
506
+ temperature=0.9,
507
+ tf32=None,
508
+ torch_compile=False,
509
+ torch_compile_backend=None,
510
+ torch_compile_mode=None,
511
+ torch_empty_cache_steps=None,
512
+ torchdynamo=None,
513
+ tpu_metrics_debug=False,
514
+ tpu_num_cores=None,
515
+ use_cpu=False,
516
+ use_ipex=False,
517
+ use_legacy_prediction_loop=False,
518
+ use_liger=False,
519
+ use_liger_kernel=False,
520
+ use_mps_device=False,
521
+ wandb_entity=None,
522
+ wandb_project=None,
523
+ warmup_ratio=0.1,
524
+ warmup_steps=0,
525
+ weight_decay=0.0,
526
+ )
527
+ 2025-08-18 17:40:58 - INFO - __main__ - *** Initializing model kwargs ***
528
+ 2025-08-18 17:40:58 - INFO - __main__ - Loaded top k experts from data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json: {'model.layers.1.mlp': [61, 51, 44, 14, 45, 22, 8, 43, 57, 0, 4, 7, 13, 19, 31, 18, 37, 40, 5, 52, 27, 59, 48, 2, 9, 42, 41, 54, 21, 24, 10, 56], 'model.layers.2.mlp': [27, 25, 18, 3, 23, 13, 17, 45, 7, 15, 46, 24, 63, 62, 5, 8, 56, 16, 0, 61, 26, 9, 58, 49, 14, 52, 42, 20, 38, 59, 47, 31], 'model.layers.3.mlp': [54, 25, 57, 28, 41, 23, 26, 4, 2, 12, 33, 22, 24, 43, 50, 21, 55, 6, 0, 16, 62, 20, 30, 5, 47, 53, 51, 60, 48, 8, 59, 7], 'model.layers.4.mlp': [11, 37, 21, 49, 33, 14, 47, 29, 32, 17, 0, 5, 31, 34, 7, 8, 30, 22, 61, 44, 57, 27, 55, 62, 38, 20, 54, 39, 52, 18, 43, 36], 'model.layers.5.mlp': [54, 47, 20, 35, 9, 52, 14, 59, 45, 51, 33, 61, 42, 34, 29, 27, 40, 60, 12, 24, 43, 16, 36, 58, 22, 18, 38, 8, 13, 62, 57, 56], 'model.layers.6.mlp': [22, 13, 1, 42, 45, 47, 28, 27, 8, 38, 61, 54, 36, 40, 7, 25, 14, 52, 49, 16, 21, 44, 51, 56, 3, 18, 15, 20, 0, 46, 37, 12], 'model.layers.7.mlp': [58, 18, 43, 24, 44, 62, 2, 14, 53, 63, 51, 60, 35, 45, 42, 40, 23, 36, 30, 7, 22, 8, 26, 21, 46, 39, 50, 52, 0, 33, 6, 5], 'model.layers.8.mlp': [47, 39, 30, 54, 56, 58, 17, 37, 36, 7, 24, 22, 19, 5, 45, 62, 42, 51, 29, 44, 21, 1, 10, 20, 33, 6, 34, 3, 46, 31, 9, 60], 'model.layers.9.mlp': [12, 13, 31, 22, 32, 24, 56, 28, 37, 57, 11, 21, 30, 51, 36, 34, 54, 60, 35, 58, 39, 48, 46, 63, 6, 1, 42, 3, 15, 41, 45, 4], 'model.layers.10.mlp': [47, 19, 42, 2, 13, 22, 43, 21, 28, 33, 38, 31, 62, 15, 60, 4, 53, 14, 55, 26, 16, 29, 41, 52, 11, 24, 3, 57, 58, 59, 27, 40], 'model.layers.11.mlp': [29, 11, 17, 59, 10, 22, 14, 3, 40, 33, 30, 8, 37, 6, 35, 44, 13, 50, 57, 61, 52, 36, 41, 12, 43, 27, 21, 60, 0, 23, 31, 56], 'model.layers.12.mlp': [5, 56, 59, 3, 4, 6, 26, 40, 49, 53, 52, 13, 51, 16, 25, 63, 11, 18, 22, 33, 29, 37, 50, 31, 43, 7, 38, 20, 34, 17, 48, 27], 'model.layers.13.mlp': [10, 58, 42, 47, 14, 17, 4, 39, 51, 52, 8, 0, 22, 50, 62, 63, 61, 6, 40, 60, 21, 35, 33, 29, 7, 32, 38, 26, 31, 25, 16, 1], 'model.layers.14.mlp': [7, 27, 51, 31, 18, 61, 40, 16, 6, 54, 29, 49, 39, 25, 37, 8, 10, 52, 47, 42, 41, 15, 32, 45, 30, 55, 50, 2, 4, 28, 63, 56], 'model.layers.15.mlp': [24, 55, 5, 17, 41, 14, 3, 59, 56, 27, 51, 21, 12, 46, 49, 31, 25, 10, 43, 45, 62, 47, 60, 52, 53, 37, 19, 63, 2, 8, 58, 13], 'model.layers.16.mlp': [33, 61, 63, 49, 19, 9, 51, 21, 56, 8, 11, 58, 23, 1, 27, 17, 42, 15, 25, 57, 60, 6, 7, 52, 41, 46, 30, 3, 45, 35, 36, 38], 'model.layers.17.mlp': [0, 43, 26, 27, 32, 29, 63, 25, 39, 14, 47, 35, 48, 8, 58, 52, 55, 34, 13, 33, 9, 40, 30, 51, 16, 37, 56, 31, 3, 42, 50, 60], 'model.layers.18.mlp': [5, 56, 42, 36, 2, 1, 38, 62, 47, 45, 12, 20, 46, 52, 11, 32, 22, 57, 51, 19, 3, 7, 34, 49, 4, 53, 18, 55, 13, 16, 41, 54], 'model.layers.19.mlp': [23, 2, 24, 40, 36, 0, 51, 59, 44, 7, 45, 21, 31, 47, 53, 57, 20, 49, 3, 14, 30, 56, 48, 52, 9, 19, 39, 8, 55, 33, 37, 34], 'model.layers.20.mlp': [56, 1, 48, 38, 20, 58, 5, 46, 19, 3, 26, 6, 59, 42, 52, 53, 24, 22, 21, 36, 45, 11, 23, 41, 17, 25, 62, 44, 57, 43, 28, 35], 'model.layers.21.mlp': [5, 15, 13, 10, 19, 28, 40, 31, 46, 57, 43, 20, 30, 29, 22, 62, 9, 58, 23, 24, 14, 47, 50, 27, 41, 38, 32, 61, 33, 63, 51, 1], 'model.layers.22.mlp': [32, 58, 3, 31, 45, 14, 8, 26, 10, 4, 12, 30, 16, 2, 40, 60, 59, 38, 28, 42, 21, 25, 56, 39, 18, 51, 47, 36, 46, 24, 48, 0], 'model.layers.23.mlp': [20, 0, 45, 58, 33, 42, 19, 26, 59, 35, 18, 6, 40, 36, 48, 29, 61, 17, 43, 39, 14, 41, 27, 8, 23, 56, 62, 28, 38, 57, 22, 2], 'model.layers.24.mlp': [62, 10, 42, 7, 47, 63, 30, 20, 6, 5, 9, 21, 13, 56, 51, 55, 49, 14, 58, 39, 33, 23, 37, 61, 28, 1, 60, 12, 35, 50, 27, 29], 'model.layers.25.mlp': [45, 48, 39, 11, 46, 38, 51, 16, 58, 15, 50, 1, 35, 14, 20, 40, 12, 0, 5, 47, 25, 18, 10, 27, 29, 60, 17, 24, 61, 31, 4, 63], 'model.layers.26.mlp': [49, 6, 46, 13, 57, 11, 41, 35, 60, 20, 25, 32, 63, 27, 4, 52, 14, 2, 19, 16, 36, 45, 53, 56, 15, 38, 1, 30, 43, 50, 8, 58]}
529
+ 2025-08-18 17:40:58 - INFO - __main__ - Model memory before loading model:Memory allocated: 0.0
530
+ Memory reserved: 0.0
531
+ 2025-08-18 17:41:33 - INFO - __main__ - Model parameters ModelConfig(model_name_or_path='/home/ubuntu/efs/hector/data/DeepSeek-Coder-V2-Lite-Instruct/sft/math7k/checkpoint-645', model_revision='main', torch_dtype='bfloat16', trust_remote_code=True, attn_implementation='flash_attention_2', use_peft=False, lora_r=16, lora_alpha=32, lora_dropout=0.05, lora_target_modules=None, lora_modules_to_save=None, lora_task_type='CAUSAL_LM', use_rslora=False, use_dora=False, load_in_8bit=False, load_in_4bit=False, bnb_4bit_quant_type='nf4', use_bnb_nested_quant=False)
532
+ 2025-08-18 17:41:33 - INFO - __main__ - Script parameters ScriptArguments(dataset_name='HectorHe/math7k', dataset_config=None, dataset_train_split='train', dataset_test_split='test', gradient_checkpointing_use_reentrant=False, ignore_bias_buffers=False)
533
+ 2025-08-18 17:41:33 - INFO - __main__ - Training parameters EfficientDistillationConfig(
534
+ _n_gpu=1,
535
+ accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False},
536
+ adafactor=False,
537
+ adam_beta1=0.9,
538
+ adam_beta2=0.999,
539
+ adam_epsilon=1e-08,
540
+ alpha=0.45,
541
+ auto_find_batch_size=False,
542
+ average_tokens_across_devices=False,
543
+ batch_eval_metrics=False,
544
+ benchmarks=[],
545
+ bf16=True,
546
+ bf16_full_eval=False,
547
+ callbacks=[],
548
+ ce_loss_scale=1.0,
549
+ chars_per_token=<CHARS_PER_TOKEN>,
550
+ chat_template=None,
551
+ completion_only_loss=None,
552
+ data_seed=None,
553
+ dataloader_drop_last=False,
554
+ dataloader_num_workers=0,
555
+ dataloader_persistent_workers=False,
556
+ dataloader_pin_memory=True,
557
+ dataloader_prefetch_factor=None,
558
+ dataset_batch_size=None,
559
+ dataset_kwargs=None,
560
+ dataset_num_proc=None,
561
+ dataset_text_field=text,
562
+ ddp_backend=None,
563
+ ddp_broadcast_buffers=None,
564
+ ddp_bucket_cap_mb=None,
565
+ ddp_find_unused_parameters=None,
566
+ ddp_timeout=1800000000,
567
+ debug=[],
568
+ deepspeed=None,
569
+ delta=0.05,
570
+ disable_dropout=True,
571
+ disable_tqdm=False,
572
+ do_eval=True,
573
+ do_predict=False,
574
+ do_train=False,
575
+ enhance_type=subset_expert_moe,
576
+ eos_token=<EOS_TOKEN>,
577
+ eval_accumulation_steps=None,
578
+ eval_delay=0,
579
+ eval_do_concat_batches=True,
580
+ eval_on_start=False,
581
+ eval_packing=None,
582
+ eval_steps=None,
583
+ eval_strategy=IntervalStrategy.NO,
584
+ eval_use_gather_object=False,
585
+ expert_num=32,
586
+ fp16=False,
587
+ fp16_backend=auto,
588
+ fp16_full_eval=False,
589
+ fp16_opt_level=O1,
590
+ fsdp=[],
591
+ fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False},
592
+ fsdp_min_num_params=0,
593
+ fsdp_transformer_layer_cls_to_wrap=None,
594
+ full_determinism=False,
595
+ gradient_accumulation_steps=1,
596
+ gradient_checkpointing=True,
597
+ gradient_checkpointing_kwargs={'use_reentrant': False},
598
+ greater_is_better=None,
599
+ group_by_length=False,
600
+ half_precision_backend=auto,
601
+ hub_always_push=False,
602
+ hub_model_id=Deepseek-V2-13B-Math7K-Expert-Enhance-Subset-Expert-MoE-32-experts,
603
+ hub_model_revision=main,
604
+ hub_private_repo=None,
605
+ hub_strategy=HubStrategy.EVERY_SAVE,
606
+ hub_token=<HUB_TOKEN>,
607
+ ignore_data_skip=False,
608
+ include_for_metrics=[],
609
+ include_inputs_for_metrics=False,
610
+ include_num_input_tokens_seen=False,
611
+ include_tokens_per_second=False,
612
+ jit_mode_eval=False,
613
+ kl_loss_scale=1.0,
614
+ label_names=None,
615
+ label_smoothing_factor=0.0,
616
+ learning_rate=5e-06,
617
+ length_column_name=length,
618
+ lmbda=0.0,
619
+ load_best_model_at_end=False,
620
+ local_rank=0,
621
+ log_level=info,
622
+ log_level_replica=warning,
623
+ log_on_each_node=True,
624
+ logging_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/runs/Aug18_17-41-33_ip-172-31-35-162,
625
+ logging_first_step=False,
626
+ logging_nan_inf_filter=True,
627
+ logging_steps=1,
628
+ logging_strategy=IntervalStrategy.STEPS,
629
+ loss_type=mixture,
630
+ lr_scheduler_kwargs={'min_lr_rate': 0.1},
631
+ lr_scheduler_type=SchedulerType.COSINE_WITH_MIN_LR,
632
+ max_grad_norm=1.0,
633
+ max_length=4096,
634
+ max_new_tokens=512,
635
+ max_seq_length=None,
636
+ max_steps=-1,
637
+ metric_for_best_model=None,
638
+ model_init_kwargs=None,
639
+ mp_parameters=,
640
+ neftune_noise_alpha=None,
641
+ no_cuda=False,
642
+ num_of_sequences=None,
643
+ num_train_epochs=1,
644
+ optim=OptimizerNames.ADAMW_TORCH,
645
+ optim_args=None,
646
+ optim_target_modules=None,
647
+ output_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
648
+ overwrite_hub_revision=False,
649
+ overwrite_output_dir=True,
650
+ packing=False,
651
+ pad_to_multiple_of=None,
652
+ pad_token=<PAD_TOKEN>,
653
+ padding_free=False,
654
+ past_index=-1,
655
+ per_device_eval_batch_size=16,
656
+ per_device_train_batch_size=4,
657
+ prediction_loss_only=False,
658
+ push_to_hub=True,
659
+ push_to_hub_model_id=None,
660
+ push_to_hub_organization=None,
661
+ push_to_hub_revision=False,
662
+ push_to_hub_token=<PUSH_TO_HUB_TOKEN>,
663
+ ray_scope=last,
664
+ reduction=batchmean,
665
+ remove_unused_columns=True,
666
+ report_to=['wandb'],
667
+ restore_callback_states_from_checkpoint=False,
668
+ resume_from_checkpoint=None,
669
+ run_name=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
670
+ save_on_each_node=False,
671
+ save_only_model=False,
672
+ save_safetensors=True,
673
+ save_steps=500,
674
+ save_strategy=SaveStrategy.STEPS,
675
+ save_total_limit=1,
676
+ seed=1234,
677
+ skip_memory_metrics=True,
678
+ system_prompt=None,
679
+ teacher_model_init_kwargs=None,
680
+ teacher_model_name_or_path=None,
681
+ temperature=0.9,
682
+ tf32=None,
683
+ torch_compile=False,
684
+ torch_compile_backend=None,
685
+ torch_compile_mode=None,
686
+ torch_empty_cache_steps=None,
687
+ torchdynamo=None,
688
+ tpu_metrics_debug=False,
689
+ tpu_num_cores=None,
690
+ use_cpu=False,
691
+ use_ipex=False,
692
+ use_legacy_prediction_loop=False,
693
+ use_liger=False,
694
+ use_liger_kernel=False,
695
+ use_mps_device=False,
696
+ wandb_entity=None,
697
+ wandb_project=None,
698
+ warmup_ratio=0.1,
699
+ warmup_steps=0,
700
+ weight_decay=0.0,
701
+ )
702
+ 2025-08-18 17:41:35 - INFO - __main__ - *** Initializing model kwargs ***
703
+ 2025-08-18 17:41:35 - INFO - __main__ - Loaded top k experts from data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json: {'model.layers.1.mlp': [61, 51, 44, 14, 45, 22, 8, 43, 57, 0, 4, 7, 13, 19, 31, 18, 37, 40, 5, 52, 27, 59, 48, 2, 9, 42, 41, 54, 21, 24, 10, 56], 'model.layers.2.mlp': [27, 25, 18, 3, 23, 13, 17, 45, 7, 15, 46, 24, 63, 62, 5, 8, 56, 16, 0, 61, 26, 9, 58, 49, 14, 52, 42, 20, 38, 59, 47, 31], 'model.layers.3.mlp': [54, 25, 57, 28, 41, 23, 26, 4, 2, 12, 33, 22, 24, 43, 50, 21, 55, 6, 0, 16, 62, 20, 30, 5, 47, 53, 51, 60, 48, 8, 59, 7], 'model.layers.4.mlp': [11, 37, 21, 49, 33, 14, 47, 29, 32, 17, 0, 5, 31, 34, 7, 8, 30, 22, 61, 44, 57, 27, 55, 62, 38, 20, 54, 39, 52, 18, 43, 36], 'model.layers.5.mlp': [54, 47, 20, 35, 9, 52, 14, 59, 45, 51, 33, 61, 42, 34, 29, 27, 40, 60, 12, 24, 43, 16, 36, 58, 22, 18, 38, 8, 13, 62, 57, 56], 'model.layers.6.mlp': [22, 13, 1, 42, 45, 47, 28, 27, 8, 38, 61, 54, 36, 40, 7, 25, 14, 52, 49, 16, 21, 44, 51, 56, 3, 18, 15, 20, 0, 46, 37, 12], 'model.layers.7.mlp': [58, 18, 43, 24, 44, 62, 2, 14, 53, 63, 51, 60, 35, 45, 42, 40, 23, 36, 30, 7, 22, 8, 26, 21, 46, 39, 50, 52, 0, 33, 6, 5], 'model.layers.8.mlp': [47, 39, 30, 54, 56, 58, 17, 37, 36, 7, 24, 22, 19, 5, 45, 62, 42, 51, 29, 44, 21, 1, 10, 20, 33, 6, 34, 3, 46, 31, 9, 60], 'model.layers.9.mlp': [12, 13, 31, 22, 32, 24, 56, 28, 37, 57, 11, 21, 30, 51, 36, 34, 54, 60, 35, 58, 39, 48, 46, 63, 6, 1, 42, 3, 15, 41, 45, 4], 'model.layers.10.mlp': [47, 19, 42, 2, 13, 22, 43, 21, 28, 33, 38, 31, 62, 15, 60, 4, 53, 14, 55, 26, 16, 29, 41, 52, 11, 24, 3, 57, 58, 59, 27, 40], 'model.layers.11.mlp': [29, 11, 17, 59, 10, 22, 14, 3, 40, 33, 30, 8, 37, 6, 35, 44, 13, 50, 57, 61, 52, 36, 41, 12, 43, 27, 21, 60, 0, 23, 31, 56], 'model.layers.12.mlp': [5, 56, 59, 3, 4, 6, 26, 40, 49, 53, 52, 13, 51, 16, 25, 63, 11, 18, 22, 33, 29, 37, 50, 31, 43, 7, 38, 20, 34, 17, 48, 27], 'model.layers.13.mlp': [10, 58, 42, 47, 14, 17, 4, 39, 51, 52, 8, 0, 22, 50, 62, 63, 61, 6, 40, 60, 21, 35, 33, 29, 7, 32, 38, 26, 31, 25, 16, 1], 'model.layers.14.mlp': [7, 27, 51, 31, 18, 61, 40, 16, 6, 54, 29, 49, 39, 25, 37, 8, 10, 52, 47, 42, 41, 15, 32, 45, 30, 55, 50, 2, 4, 28, 63, 56], 'model.layers.15.mlp': [24, 55, 5, 17, 41, 14, 3, 59, 56, 27, 51, 21, 12, 46, 49, 31, 25, 10, 43, 45, 62, 47, 60, 52, 53, 37, 19, 63, 2, 8, 58, 13], 'model.layers.16.mlp': [33, 61, 63, 49, 19, 9, 51, 21, 56, 8, 11, 58, 23, 1, 27, 17, 42, 15, 25, 57, 60, 6, 7, 52, 41, 46, 30, 3, 45, 35, 36, 38], 'model.layers.17.mlp': [0, 43, 26, 27, 32, 29, 63, 25, 39, 14, 47, 35, 48, 8, 58, 52, 55, 34, 13, 33, 9, 40, 30, 51, 16, 37, 56, 31, 3, 42, 50, 60], 'model.layers.18.mlp': [5, 56, 42, 36, 2, 1, 38, 62, 47, 45, 12, 20, 46, 52, 11, 32, 22, 57, 51, 19, 3, 7, 34, 49, 4, 53, 18, 55, 13, 16, 41, 54], 'model.layers.19.mlp': [23, 2, 24, 40, 36, 0, 51, 59, 44, 7, 45, 21, 31, 47, 53, 57, 20, 49, 3, 14, 30, 56, 48, 52, 9, 19, 39, 8, 55, 33, 37, 34], 'model.layers.20.mlp': [56, 1, 48, 38, 20, 58, 5, 46, 19, 3, 26, 6, 59, 42, 52, 53, 24, 22, 21, 36, 45, 11, 23, 41, 17, 25, 62, 44, 57, 43, 28, 35], 'model.layers.21.mlp': [5, 15, 13, 10, 19, 28, 40, 31, 46, 57, 43, 20, 30, 29, 22, 62, 9, 58, 23, 24, 14, 47, 50, 27, 41, 38, 32, 61, 33, 63, 51, 1], 'model.layers.22.mlp': [32, 58, 3, 31, 45, 14, 8, 26, 10, 4, 12, 30, 16, 2, 40, 60, 59, 38, 28, 42, 21, 25, 56, 39, 18, 51, 47, 36, 46, 24, 48, 0], 'model.layers.23.mlp': [20, 0, 45, 58, 33, 42, 19, 26, 59, 35, 18, 6, 40, 36, 48, 29, 61, 17, 43, 39, 14, 41, 27, 8, 23, 56, 62, 28, 38, 57, 22, 2], 'model.layers.24.mlp': [62, 10, 42, 7, 47, 63, 30, 20, 6, 5, 9, 21, 13, 56, 51, 55, 49, 14, 58, 39, 33, 23, 37, 61, 28, 1, 60, 12, 35, 50, 27, 29], 'model.layers.25.mlp': [45, 48, 39, 11, 46, 38, 51, 16, 58, 15, 50, 1, 35, 14, 20, 40, 12, 0, 5, 47, 25, 18, 10, 27, 29, 60, 17, 24, 61, 31, 4, 63], 'model.layers.26.mlp': [49, 6, 46, 13, 57, 11, 41, 35, 60, 20, 25, 32, 63, 27, 4, 52, 14, 2, 19, 16, 36, 45, 53, 56, 15, 38, 1, 30, 43, 50, 8, 58]}
704
+ 2025-08-18 17:41:35 - INFO - __main__ - Model memory before loading model:Memory allocated: 0.0
705
+ Memory reserved: 0.0
706
+ 2025-08-18 17:42:04 - INFO - __main__ - Model memory after loading model:Memory allocated: 4836.39697265625
707
+ Memory reserved: 7322.0
708
+ 2025-08-18 17:42:04 - INFO - __main__ - MoE layers replaced with dense expert update backward
709
+ 2025-08-18 17:42:04 - INFO - __main__ - Model memory after replacing MoE with dense:Memory allocated: 4836.39697265625
710
+ Memory reserved: 7322.0
711
+ 2025-08-18 17:42:04 - INFO - __main__ - Initializing EfficientDistillationTrainer...
712
+ 2025-08-18 17:42:34 - INFO - __main__ - Model memory after trainer initialization:Memory allocated: 9670.79443359375
713
+ Memory reserved: 13710.0
714
+ 2025-08-18 17:42:34 - INFO - __main__ - *** Starting training ***
715
+ 2025-08-18 17:42:34 - INFO - __main__ - Model architecture: DeepseekV2ForCausalLM(
716
+ (model): DeepseekV2Model(
717
+ (embed_tokens): Embedding(102400, 2048)
718
+ (layers): ModuleList(
719
+ (0): DeepseekV2DecoderLayer(
720
+ (self_attn): DeepseekV2FlashAttention2(
721
+ (q_proj): Linear(in_features=2048, out_features=3072, bias=False)
722
+ (kv_a_proj_with_mqa): Linear(in_features=2048, out_features=576, bias=False)
723
+ (kv_a_layernorm): DeepseekV2RMSNorm()
724
+ (kv_b_proj): Linear(in_features=512, out_features=4096, bias=False)
725
+ (o_proj): Linear(in_features=2048, out_features=2048, bias=False)
726
+ (rotary_emb): DeepseekV2YarnRotaryEmbedding()
727
+ )
728
+ (mlp): DeepseekV2MLP(
729
+ (gate_proj): Linear(in_features=2048, out_features=10944, bias=False)
730
+ (up_proj): Linear(in_features=2048, out_features=10944, bias=False)
731
+ (down_proj): Linear(in_features=10944, out_features=2048, bias=False)
732
+ (act_fn): SiLU()
733
+ )
734
+ (input_layernorm): DeepseekV2RMSNorm()
735
+ (post_attention_layernorm): DeepseekV2RMSNorm()
736
+ )
737
+ (1-26): 26 x DeepseekV2DecoderLayer(
738
+ (self_attn): DeepseekV2FlashAttention2(
739
+ (q_proj): Linear(in_features=2048, out_features=3072, bias=False)
740
+ (kv_a_proj_with_mqa): Linear(in_features=2048, out_features=576, bias=False)
741
+ (kv_a_layernorm): DeepseekV2RMSNorm()
742
+ (kv_b_proj): Linear(in_features=512, out_features=4096, bias=False)
743
+ (o_proj): Linear(in_features=2048, out_features=2048, bias=False)
744
+ (rotary_emb): DeepseekV2YarnRotaryEmbedding()
745
+ )
746
+ (mlp): DeepseekV2MoE(
747
+ (experts): ModuleList(
748
+ (0-63): 64 x DeepseekV2MLP(
749
+ (gate_proj): Linear(in_features=2048, out_features=1408, bias=False)
750
+ (up_proj): Linear(in_features=2048, out_features=1408, bias=False)
751
+ (down_proj): Linear(in_features=1408, out_features=2048, bias=False)
752
+ (act_fn): SiLU()
753
+ )
754
+ )
755
+ (gate): MoEGate()
756
+ (shared_experts): DeepseekV2MLP(
757
+ (gate_proj): Linear(in_features=2048, out_features=2816, bias=False)
758
+ (up_proj): Linear(in_features=2048, out_features=2816, bias=False)
759
+ (down_proj): Linear(in_features=2816, out_features=2048, bias=False)
760
+ (act_fn): SiLU()
761
+ )
762
+ )
763
+ (input_layernorm): DeepseekV2RMSNorm()
764
+ (post_attention_layernorm): DeepseekV2RMSNorm()
765
+ )
766
+ )
767
+ (norm): DeepseekV2RMSNorm()
768
+ )
769
+ (lm_head): Linear(in_features=2048, out_features=102400, bias=False)
770
+ )
771
+ 2025-08-18 17:44:00 - INFO - __main__ - Model parameters ModelConfig(model_name_or_path='/home/ubuntu/efs/hector/data/DeepSeek-Coder-V2-Lite-Instruct/sft/math7k/checkpoint-645', model_revision='main', torch_dtype='bfloat16', trust_remote_code=True, attn_implementation='flash_attention_2', use_peft=False, lora_r=16, lora_alpha=32, lora_dropout=0.05, lora_target_modules=None, lora_modules_to_save=None, lora_task_type='CAUSAL_LM', use_rslora=False, use_dora=False, load_in_8bit=False, load_in_4bit=False, bnb_4bit_quant_type='nf4', use_bnb_nested_quant=False)
772
+ 2025-08-18 17:44:00 - INFO - __main__ - Script parameters ScriptArguments(dataset_name='HectorHe/math7k', dataset_config=None, dataset_train_split='train', dataset_test_split='test', gradient_checkpointing_use_reentrant=False, ignore_bias_buffers=False)
773
+ 2025-08-18 17:44:00 - INFO - __main__ - Training parameters EfficientDistillationConfig(
774
+ _n_gpu=1,
775
+ accelerator_config={'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None, 'use_configured_state': False},
776
+ adafactor=False,
777
+ adam_beta1=0.9,
778
+ adam_beta2=0.999,
779
+ adam_epsilon=1e-08,
780
+ alpha=0.45,
781
+ auto_find_batch_size=False,
782
+ average_tokens_across_devices=False,
783
+ batch_eval_metrics=False,
784
+ benchmarks=[],
785
+ bf16=True,
786
+ bf16_full_eval=False,
787
+ callbacks=[],
788
+ ce_loss_scale=1.0,
789
+ chars_per_token=<CHARS_PER_TOKEN>,
790
+ chat_template=None,
791
+ completion_only_loss=None,
792
+ data_seed=None,
793
+ dataloader_drop_last=False,
794
+ dataloader_num_workers=0,
795
+ dataloader_persistent_workers=False,
796
+ dataloader_pin_memory=True,
797
+ dataloader_prefetch_factor=None,
798
+ dataset_batch_size=None,
799
+ dataset_kwargs=None,
800
+ dataset_num_proc=None,
801
+ dataset_text_field=text,
802
+ ddp_backend=None,
803
+ ddp_broadcast_buffers=None,
804
+ ddp_bucket_cap_mb=None,
805
+ ddp_find_unused_parameters=None,
806
+ ddp_timeout=1800000000,
807
+ debug=[],
808
+ deepspeed=None,
809
+ delta=0.05,
810
+ disable_dropout=True,
811
+ disable_tqdm=False,
812
+ do_eval=True,
813
+ do_predict=False,
814
+ do_train=False,
815
+ enhance_type=subset_expert_moe,
816
+ eos_token=<EOS_TOKEN>,
817
+ eval_accumulation_steps=None,
818
+ eval_delay=0,
819
+ eval_do_concat_batches=True,
820
+ eval_on_start=False,
821
+ eval_packing=None,
822
+ eval_steps=None,
823
+ eval_strategy=IntervalStrategy.NO,
824
+ eval_use_gather_object=False,
825
+ expert_num=32,
826
+ fp16=False,
827
+ fp16_backend=auto,
828
+ fp16_full_eval=False,
829
+ fp16_opt_level=O1,
830
+ fsdp=[],
831
+ fsdp_config={'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False},
832
+ fsdp_min_num_params=0,
833
+ fsdp_transformer_layer_cls_to_wrap=None,
834
+ full_determinism=False,
835
+ gradient_accumulation_steps=1,
836
+ gradient_checkpointing=True,
837
+ gradient_checkpointing_kwargs={'use_reentrant': False},
838
+ greater_is_better=None,
839
+ group_by_length=False,
840
+ half_precision_backend=auto,
841
+ hub_always_push=False,
842
+ hub_model_id=Deepseek-V2-13B-Math7K-Expert-Enhance-Subset-Expert-MoE-32-experts,
843
+ hub_model_revision=main,
844
+ hub_private_repo=None,
845
+ hub_strategy=HubStrategy.EVERY_SAVE,
846
+ hub_token=<HUB_TOKEN>,
847
+ ignore_data_skip=False,
848
+ include_for_metrics=[],
849
+ include_inputs_for_metrics=False,
850
+ include_num_input_tokens_seen=False,
851
+ include_tokens_per_second=False,
852
+ jit_mode_eval=False,
853
+ kl_loss_scale=1.0,
854
+ label_names=None,
855
+ label_smoothing_factor=0.0,
856
+ learning_rate=5e-06,
857
+ length_column_name=length,
858
+ lmbda=0.0,
859
+ load_best_model_at_end=False,
860
+ local_rank=0,
861
+ log_level=info,
862
+ log_level_replica=warning,
863
+ log_on_each_node=True,
864
+ logging_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/runs/Aug18_17-44-00_ip-172-31-35-162,
865
+ logging_first_step=False,
866
+ logging_nan_inf_filter=True,
867
+ logging_steps=1,
868
+ logging_strategy=IntervalStrategy.STEPS,
869
+ loss_type=mixture,
870
+ lr_scheduler_kwargs={'min_lr_rate': 0.1},
871
+ lr_scheduler_type=SchedulerType.COSINE_WITH_MIN_LR,
872
+ max_grad_norm=1.0,
873
+ max_length=4096,
874
+ max_new_tokens=512,
875
+ max_seq_length=None,
876
+ max_steps=-1,
877
+ metric_for_best_model=None,
878
+ model_init_kwargs=None,
879
+ mp_parameters=,
880
+ neftune_noise_alpha=None,
881
+ no_cuda=False,
882
+ num_of_sequences=None,
883
+ num_train_epochs=1,
884
+ optim=OptimizerNames.ADAMW_TORCH,
885
+ optim_args=None,
886
+ optim_target_modules=None,
887
+ output_dir=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
888
+ overwrite_hub_revision=False,
889
+ overwrite_output_dir=True,
890
+ packing=False,
891
+ pad_to_multiple_of=None,
892
+ pad_token=<PAD_TOKEN>,
893
+ padding_free=False,
894
+ past_index=-1,
895
+ per_device_eval_batch_size=16,
896
+ per_device_train_batch_size=4,
897
+ prediction_loss_only=False,
898
+ push_to_hub=True,
899
+ push_to_hub_model_id=None,
900
+ push_to_hub_organization=None,
901
+ push_to_hub_revision=False,
902
+ push_to_hub_token=<PUSH_TO_HUB_TOKEN>,
903
+ ray_scope=last,
904
+ reduction=batchmean,
905
+ remove_unused_columns=True,
906
+ report_to=['wandb'],
907
+ restore_callback_states_from_checkpoint=False,
908
+ resume_from_checkpoint=None,
909
+ run_name=data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts,
910
+ save_on_each_node=False,
911
+ save_only_model=False,
912
+ save_safetensors=True,
913
+ save_steps=500,
914
+ save_strategy=SaveStrategy.STEPS,
915
+ save_total_limit=1,
916
+ seed=1234,
917
+ skip_memory_metrics=True,
918
+ system_prompt=None,
919
+ teacher_model_init_kwargs=None,
920
+ teacher_model_name_or_path=None,
921
+ temperature=0.9,
922
+ tf32=None,
923
+ torch_compile=False,
924
+ torch_compile_backend=None,
925
+ torch_compile_mode=None,
926
+ torch_empty_cache_steps=None,
927
+ torchdynamo=None,
928
+ tpu_metrics_debug=False,
929
+ tpu_num_cores=None,
930
+ use_cpu=False,
931
+ use_ipex=False,
932
+ use_legacy_prediction_loop=False,
933
+ use_liger=False,
934
+ use_liger_kernel=False,
935
+ use_mps_device=False,
936
+ wandb_entity=None,
937
+ wandb_project=None,
938
+ warmup_ratio=0.1,
939
+ warmup_steps=0,
940
+ weight_decay=0.0,
941
+ )
942
+ 2025-08-18 17:44:01 - INFO - __main__ - *** Initializing model kwargs ***
943
+ 2025-08-18 17:44:01 - INFO - __main__ - Loaded top k experts from data/DeepSeek-Coder-V2-Lite-Instruct/expert_enhance/subset_expert_moe/math7K/32_experts/top_32_experts_HectorHe_math7k.json: {'model.layers.1.mlp': [61, 51, 44, 14, 45, 22, 8, 43, 57, 0, 4, 7, 13, 19, 31, 18, 37, 40, 5, 52, 27, 59, 48, 2, 9, 42, 41, 54, 21, 24, 10, 56], 'model.layers.2.mlp': [27, 25, 18, 3, 23, 13, 17, 45, 7, 15, 46, 24, 63, 62, 5, 8, 56, 16, 0, 61, 26, 9, 58, 49, 14, 52, 42, 20, 38, 59, 47, 31], 'model.layers.3.mlp': [54, 25, 57, 28, 41, 23, 26, 4, 2, 12, 33, 22, 24, 43, 50, 21, 55, 6, 0, 16, 62, 20, 30, 5, 47, 53, 51, 60, 48, 8, 59, 7], 'model.layers.4.mlp': [11, 37, 21, 49, 33, 14, 47, 29, 32, 17, 0, 5, 31, 34, 7, 8, 30, 22, 61, 44, 57, 27, 55, 62, 38, 20, 54, 39, 52, 18, 43, 36], 'model.layers.5.mlp': [54, 47, 20, 35, 9, 52, 14, 59, 45, 51, 33, 61, 42, 34, 29, 27, 40, 60, 12, 24, 43, 16, 36, 58, 22, 18, 38, 8, 13, 62, 57, 56], 'model.layers.6.mlp': [22, 13, 1, 42, 45, 47, 28, 27, 8, 38, 61, 54, 36, 40, 7, 25, 14, 52, 49, 16, 21, 44, 51, 56, 3, 18, 15, 20, 0, 46, 37, 12], 'model.layers.7.mlp': [58, 18, 43, 24, 44, 62, 2, 14, 53, 63, 51, 60, 35, 45, 42, 40, 23, 36, 30, 7, 22, 8, 26, 21, 46, 39, 50, 52, 0, 33, 6, 5], 'model.layers.8.mlp': [47, 39, 30, 54, 56, 58, 17, 37, 36, 7, 24, 22, 19, 5, 45, 62, 42, 51, 29, 44, 21, 1, 10, 20, 33, 6, 34, 3, 46, 31, 9, 60], 'model.layers.9.mlp': [12, 13, 31, 22, 32, 24, 56, 28, 37, 57, 11, 21, 30, 51, 36, 34, 54, 60, 35, 58, 39, 48, 46, 63, 6, 1, 42, 3, 15, 41, 45, 4], 'model.layers.10.mlp': [47, 19, 42, 2, 13, 22, 43, 21, 28, 33, 38, 31, 62, 15, 60, 4, 53, 14, 55, 26, 16, 29, 41, 52, 11, 24, 3, 57, 58, 59, 27, 40], 'model.layers.11.mlp': [29, 11, 17, 59, 10, 22, 14, 3, 40, 33, 30, 8, 37, 6, 35, 44, 13, 50, 57, 61, 52, 36, 41, 12, 43, 27, 21, 60, 0, 23, 31, 56], 'model.layers.12.mlp': [5, 56, 59, 3, 4, 6, 26, 40, 49, 53, 52, 13, 51, 16, 25, 63, 11, 18, 22, 33, 29, 37, 50, 31, 43, 7, 38, 20, 34, 17, 48, 27], 'model.layers.13.mlp': [10, 58, 42, 47, 14, 17, 4, 39, 51, 52, 8, 0, 22, 50, 62, 63, 61, 6, 40, 60, 21, 35, 33, 29, 7, 32, 38, 26, 31, 25, 16, 1], 'model.layers.14.mlp': [7, 27, 51, 31, 18, 61, 40, 16, 6, 54, 29, 49, 39, 25, 37, 8, 10, 52, 47, 42, 41, 15, 32, 45, 30, 55, 50, 2, 4, 28, 63, 56], 'model.layers.15.mlp': [24, 55, 5, 17, 41, 14, 3, 59, 56, 27, 51, 21, 12, 46, 49, 31, 25, 10, 43, 45, 62, 47, 60, 52, 53, 37, 19, 63, 2, 8, 58, 13], 'model.layers.16.mlp': [33, 61, 63, 49, 19, 9, 51, 21, 56, 8, 11, 58, 23, 1, 27, 17, 42, 15, 25, 57, 60, 6, 7, 52, 41, 46, 30, 3, 45, 35, 36, 38], 'model.layers.17.mlp': [0, 43, 26, 27, 32, 29, 63, 25, 39, 14, 47, 35, 48, 8, 58, 52, 55, 34, 13, 33, 9, 40, 30, 51, 16, 37, 56, 31, 3, 42, 50, 60], 'model.layers.18.mlp': [5, 56, 42, 36, 2, 1, 38, 62, 47, 45, 12, 20, 46, 52, 11, 32, 22, 57, 51, 19, 3, 7, 34, 49, 4, 53, 18, 55, 13, 16, 41, 54], 'model.layers.19.mlp': [23, 2, 24, 40, 36, 0, 51, 59, 44, 7, 45, 21, 31, 47, 53, 57, 20, 49, 3, 14, 30, 56, 48, 52, 9, 19, 39, 8, 55, 33, 37, 34], 'model.layers.20.mlp': [56, 1, 48, 38, 20, 58, 5, 46, 19, 3, 26, 6, 59, 42, 52, 53, 24, 22, 21, 36, 45, 11, 23, 41, 17, 25, 62, 44, 57, 43, 28, 35], 'model.layers.21.mlp': [5, 15, 13, 10, 19, 28, 40, 31, 46, 57, 43, 20, 30, 29, 22, 62, 9, 58, 23, 24, 14, 47, 50, 27, 41, 38, 32, 61, 33, 63, 51, 1], 'model.layers.22.mlp': [32, 58, 3, 31, 45, 14, 8, 26, 10, 4, 12, 30, 16, 2, 40, 60, 59, 38, 28, 42, 21, 25, 56, 39, 18, 51, 47, 36, 46, 24, 48, 0], 'model.layers.23.mlp': [20, 0, 45, 58, 33, 42, 19, 26, 59, 35, 18, 6, 40, 36, 48, 29, 61, 17, 43, 39, 14, 41, 27, 8, 23, 56, 62, 28, 38, 57, 22, 2], 'model.layers.24.mlp': [62, 10, 42, 7, 47, 63, 30, 20, 6, 5, 9, 21, 13, 56, 51, 55, 49, 14, 58, 39, 33, 23, 37, 61, 28, 1, 60, 12, 35, 50, 27, 29], 'model.layers.25.mlp': [45, 48, 39, 11, 46, 38, 51, 16, 58, 15, 50, 1, 35, 14, 20, 40, 12, 0, 5, 47, 25, 18, 10, 27, 29, 60, 17, 24, 61, 31, 4, 63], 'model.layers.26.mlp': [49, 6, 46, 13, 57, 11, 41, 35, 60, 20, 25, 32, 63, 27, 4, 52, 14, 2, 19, 16, 36, 45, 53, 56, 15, 38, 1, 30, 43, 50, 8, 58]}
944
+ 2025-08-18 17:44:01 - INFO - __main__ - Model memory before loading model:Memory allocated: 0.0
945
+ Memory reserved: 0.0
946
+ 2025-08-18 17:44:30 - INFO - __main__ - Model memory after loading model:Memory allocated: 4836.39697265625
947
+ Memory reserved: 7322.0
948
+ 2025-08-18 17:44:30 - INFO - __main__ - MoE layers replaced with dense expert update backward
949
+ 2025-08-18 17:44:30 - INFO - __main__ - Model memory after replacing MoE with dense:Memory allocated: 4836.39697265625
950
+ Memory reserved: 7322.0
951
+ 2025-08-18 17:44:30 - INFO - __main__ - Initializing EfficientDistillationTrainer...
952
+ 2025-08-18 17:45:01 - INFO - __main__ - Model memory after trainer initialization:Memory allocated: 9670.79443359375
953
+ Memory reserved: 13710.0
954
+ 2025-08-18 17:45:01 - INFO - __main__ - *** Starting training ***
955
+ 2025-08-18 17:45:01 - INFO - __main__ - Model architecture: DeepseekV2ForCausalLM(
956
+ (model): DeepseekV2Model(
957
+ (embed_tokens): Embedding(102400, 2048)
958
+ (layers): ModuleList(
959
+ (0): DeepseekV2DecoderLayer(
960
+ (self_attn): DeepseekV2FlashAttention2(
961
+ (q_proj): Linear(in_features=2048, out_features=3072, bias=False)
962
+ (kv_a_proj_with_mqa): Linear(in_features=2048, out_features=576, bias=False)
963
+ (kv_a_layernorm): DeepseekV2RMSNorm()
964
+ (kv_b_proj): Linear(in_features=512, out_features=4096, bias=False)
965
+ (o_proj): Linear(in_features=2048, out_features=2048, bias=False)
966
+ (rotary_emb): DeepseekV2YarnRotaryEmbedding()
967
+ )
968
+ (mlp): DeepseekV2MLP(
969
+ (gate_proj): Linear(in_features=2048, out_features=10944, bias=False)
970
+ (up_proj): Linear(in_features=2048, out_features=10944, bias=False)
971
+ (down_proj): Linear(in_features=10944, out_features=2048, bias=False)
972
+ (act_fn): SiLU()
973
+ )
974
+ (input_layernorm): DeepseekV2RMSNorm()
975
+ (post_attention_layernorm): DeepseekV2RMSNorm()
976
+ )
977
+ (1-26): 26 x DeepseekV2DecoderLayer(
978
+ (self_attn): DeepseekV2FlashAttention2(
979
+ (q_proj): Linear(in_features=2048, out_features=3072, bias=False)
980
+ (kv_a_proj_with_mqa): Linear(in_features=2048, out_features=576, bias=False)
981
+ (kv_a_layernorm): DeepseekV2RMSNorm()
982
+ (kv_b_proj): Linear(in_features=512, out_features=4096, bias=False)
983
+ (o_proj): Linear(in_features=2048, out_features=2048, bias=False)
984
+ (rotary_emb): DeepseekV2YarnRotaryEmbedding()
985
+ )
986
+ (mlp): DeepseekV2MoE(
987
+ (experts): ModuleList(
988
+ (0-63): 64 x DeepseekV2MLP(
989
+ (gate_proj): Linear(in_features=2048, out_features=1408, bias=False)
990
+ (up_proj): Linear(in_features=2048, out_features=1408, bias=False)
991
+ (down_proj): Linear(in_features=1408, out_features=2048, bias=False)
992
+ (act_fn): SiLU()
993
+ )
994
+ )
995
+ (gate): MoEGate()
996
+ (shared_experts): DeepseekV2MLP(
997
+ (gate_proj): Linear(in_features=2048, out_features=2816, bias=False)
998
+ (up_proj): Linear(in_features=2048, out_features=2816, bias=False)
999
+ (down_proj): Linear(in_features=2816, out_features=2048, bias=False)
1000
+ (act_fn): SiLU()
1001
+ )
1002
+ )
1003
+ (input_layernorm): DeepseekV2RMSNorm()
1004
+ (post_attention_layernorm): DeepseekV2RMSNorm()
1005
+ )
1006
+ )
1007
+ (norm): DeepseekV2RMSNorm()
1008
+ )
1009
+ (lm_head): Linear(in_features=2048, out_features=102400, bias=False)
1010
+ )
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79ae4c6788c02b9e5b0ba16f7a3f5c6938c7cf51397346c67c70a8192052504b
3
+ size 8184