sorgfresser commited on
Commit
18280ae
·
verified ·
1 Parent(s): 1d50a22

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
added_tokens.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</tool_call>": 151658,
3
+ "<tool_call>": 151657,
4
+ "<|box_end|>": 151649,
5
+ "<|box_start|>": 151648,
6
+ "<|endoftext|>": 151643,
7
+ "<|file_sep|>": 151664,
8
+ "<|fim_middle|>": 151660,
9
+ "<|fim_pad|>": 151662,
10
+ "<|fim_prefix|>": 151659,
11
+ "<|fim_suffix|>": 151661,
12
+ "<|im_end|>": 151645,
13
+ "<|im_start|>": 151644,
14
+ "<|image_pad|>": 151655,
15
+ "<|object_ref_end|>": 151647,
16
+ "<|object_ref_start|>": 151646,
17
+ "<|quad_end|>": 151651,
18
+ "<|quad_start|>": 151650,
19
+ "<|repo_name|>": 151663,
20
+ "<|video_pad|>": 151656,
21
+ "<|vision_end|>": 151653,
22
+ "<|vision_pad|>": 151654,
23
+ "<|vision_start|>": 151652
24
+ }
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen2ForCausalLM"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 151643,
7
+ "eos_token_id": 151645,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 3584,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 18944,
12
+ "max_position_embeddings": 32768,
13
+ "max_window_layers": 28,
14
+ "model_type": "qwen2",
15
+ "num_attention_heads": 28,
16
+ "num_hidden_layers": 28,
17
+ "num_key_value_heads": 4,
18
+ "rms_norm_eps": 1e-06,
19
+ "rope_scaling": null,
20
+ "rope_theta": 1000000.0,
21
+ "sliding_window": null,
22
+ "tie_word_embeddings": false,
23
+ "torch_dtype": "bfloat16",
24
+ "transformers_version": "4.51.3",
25
+ "use_cache": false,
26
+ "use_sliding_window": false,
27
+ "vocab_size": 152064
28
+ }
generation_config.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 151645,
6
+ 151643
7
+ ],
8
+ "pad_token_id": 151643,
9
+ "repetition_penalty": 1.1,
10
+ "temperature": 0.7,
11
+ "top_k": 20,
12
+ "top_p": 0.8,
13
+ "transformers_version": "4.51.3"
14
+ }
latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step198
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e0ad8a20391d004e08f908af0a931cc03bdfd2f17e7ed7ea1bafb4cb4e5bf80
3
+ size 4877660776
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4a1528ac61dee840904da08e7a3f991ce2bdf69bc6c536c9ae6c2d043cf84df6
3
+ size 4932751008
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10a546f9ee785ca28310032ead75c5ec8996d28085167e63dc25ae2148b650a2
3
+ size 4330865200
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50597525d6f42400c7541391256302bdfde8bf4d2ead4dcf4d76c5c355575211
3
+ size 1089994880
model.safetensors.index.json ADDED
@@ -0,0 +1,346 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 15231233024
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
17
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.0.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
19
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
26
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
27
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
28
+ "model.layers.1.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
29
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
30
+ "model.layers.1.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
31
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
32
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.10.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
38
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.10.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
41
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.10.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
43
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.11.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
50
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.11.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
53
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.11.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
55
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.12.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
62
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.12.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
65
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.12.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
67
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.13.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
74
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.13.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
77
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.13.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
79
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.14.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
86
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.14.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
89
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.14.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
91
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.15.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
98
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.15.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
101
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.15.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
103
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
108
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
109
+ "model.layers.16.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
110
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
111
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
112
+ "model.layers.16.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
113
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.16.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
115
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
117
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
118
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
119
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
120
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
121
+ "model.layers.17.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
122
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
123
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
124
+ "model.layers.17.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
125
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
126
+ "model.layers.17.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
127
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
128
+ "model.layers.18.input_layernorm.weight": "model-00003-of-00004.safetensors",
129
+ "model.layers.18.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
131
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
132
+ "model.layers.18.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
133
+ "model.layers.18.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
134
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
135
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
136
+ "model.layers.18.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
137
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
138
+ "model.layers.18.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
139
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
140
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.19.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
146
+ "model.layers.19.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.19.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.19.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
149
+ "model.layers.19.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.19.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
151
+ "model.layers.19.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
153
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
154
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
155
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
156
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
157
+ "model.layers.2.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
158
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
159
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
160
+ "model.layers.2.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
161
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
162
+ "model.layers.2.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
163
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
164
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.20.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
170
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.20.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
173
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.20.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
175
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.21.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
182
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.21.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
185
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.21.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
187
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.22.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
194
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.22.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
197
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.22.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
199
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.23.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
206
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.23.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
209
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.23.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
211
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
216
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
217
+ "model.layers.24.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
218
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
219
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
220
+ "model.layers.24.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
221
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
222
+ "model.layers.24.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
223
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
224
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
225
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
226
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
228
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
229
+ "model.layers.25.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
230
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.25.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
233
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
234
+ "model.layers.25.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
235
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
236
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
237
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
238
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
239
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
240
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
241
+ "model.layers.26.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
242
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
243
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
244
+ "model.layers.26.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
245
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
246
+ "model.layers.26.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
247
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
248
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
249
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
250
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
251
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
252
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
253
+ "model.layers.27.self_attn.k_proj.bias": "model-00003-of-00004.safetensors",
254
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
255
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
256
+ "model.layers.27.self_attn.q_proj.bias": "model-00003-of-00004.safetensors",
257
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
258
+ "model.layers.27.self_attn.v_proj.bias": "model-00003-of-00004.safetensors",
259
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
260
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.3.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
266
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.3.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
269
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
270
+ "model.layers.3.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
271
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
274
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.4.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
278
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
279
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
280
+ "model.layers.4.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
281
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
282
+ "model.layers.4.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
283
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
284
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
285
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
286
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
287
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
288
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
289
+ "model.layers.5.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
290
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
291
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
292
+ "model.layers.5.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
293
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
294
+ "model.layers.5.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
295
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
296
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
297
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
298
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
299
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
300
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
301
+ "model.layers.6.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
302
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
303
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
304
+ "model.layers.6.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
305
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
306
+ "model.layers.6.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
307
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
308
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00004.safetensors",
309
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
310
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
311
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
312
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
313
+ "model.layers.7.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
314
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
315
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
316
+ "model.layers.7.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
317
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
318
+ "model.layers.7.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
319
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
320
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
321
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
322
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
323
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
324
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
325
+ "model.layers.8.self_attn.k_proj.bias": "model-00001-of-00004.safetensors",
326
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
327
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
328
+ "model.layers.8.self_attn.q_proj.bias": "model-00001-of-00004.safetensors",
329
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
330
+ "model.layers.8.self_attn.v_proj.bias": "model-00001-of-00004.safetensors",
331
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
332
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
333
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
334
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
335
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
336
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
337
+ "model.layers.9.self_attn.k_proj.bias": "model-00002-of-00004.safetensors",
338
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
339
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
340
+ "model.layers.9.self_attn.q_proj.bias": "model-00002-of-00004.safetensors",
341
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
342
+ "model.layers.9.self_attn.v_proj.bias": "model-00002-of-00004.safetensors",
343
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
344
+ "model.norm.weight": "model-00003-of-00004.safetensors"
345
+ }
346
+ }
rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70208c3fb44e5fcccd73f2847648badd160b8f3bad7a5421ec65a5dbafba6df3
3
+ size 14768
rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7851155a86223a21c7a3354af9a64bb7de634603b85a0cccba1626c89121d4e3
3
+ size 14768
rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09e831fd61bd5abc7cf91627888b51bdfb3232dc5b5ca24beab591a854d5d401
3
+ size 14768
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:603067db864b1ab6d8c72f3ade56691eea647663c3c1aff0f89036d121586635
3
+ size 1064
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5eee858c5123a4279c3e1f7b81247343f356ac767940b2692a928ad929543214
3
+ size 11422063
tokenizer_config.json ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ }
181
+ },
182
+ "additional_special_tokens": [
183
+ "<|im_start|>",
184
+ "<|im_end|>",
185
+ "<|object_ref_start|>",
186
+ "<|object_ref_end|>",
187
+ "<|box_start|>",
188
+ "<|box_end|>",
189
+ "<|quad_start|>",
190
+ "<|quad_end|>",
191
+ "<|vision_start|>",
192
+ "<|vision_end|>",
193
+ "<|vision_pad|>",
194
+ "<|image_pad|>",
195
+ "<|video_pad|>"
196
+ ],
197
+ "bos_token": null,
198
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
+ "clean_up_tokenization_spaces": false,
200
+ "eos_token": "<|im_end|>",
201
+ "errors": "replace",
202
+ "extra_special_tokens": {},
203
+ "model_max_length": 32768,
204
+ "pad_token": "<|endoftext|>",
205
+ "padding_side": "left",
206
+ "split_special_tokens": false,
207
+ "tokenizer_class": "Qwen2Tokenizer",
208
+ "unk_token": null
209
+ }
trainer_state.json ADDED
@@ -0,0 +1,1840 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_global_step": null,
3
+ "best_metric": null,
4
+ "best_model_checkpoint": null,
5
+ "epoch": 2.998109640831758,
6
+ "eval_steps": 51,
7
+ "global_step": 198,
8
+ "is_hyper_param_search": false,
9
+ "is_local_process_zero": true,
10
+ "is_world_process_zero": true,
11
+ "log_history": [
12
+ {
13
+ "clip_ratio/high_max": 0.0,
14
+ "clip_ratio/high_mean": 0.0,
15
+ "clip_ratio/low_mean": 0.0,
16
+ "clip_ratio/low_min": 0.0,
17
+ "clip_ratio/region_mean": 0.0,
18
+ "completions/clipped_ratio": 0.15104166666666666,
19
+ "completions/max_length": 1024.0,
20
+ "completions/max_terminated_length": 975.3333333333334,
21
+ "completions/mean_length": 312.0329996744792,
22
+ "completions/mean_terminated_length": 185.89303080240884,
23
+ "completions/min_length": 28.333333333333332,
24
+ "completions/min_terminated_length": 28.333333333333332,
25
+ "epoch": 0.045368620037807186,
26
+ "grad_norm": 0.14972379803657532,
27
+ "kl": 4.560748736063639e-05,
28
+ "learning_rate": 4e-07,
29
+ "loss": -0.0081,
30
+ "num_tokens": 942182.0,
31
+ "reward": 0.37008477250734967,
32
+ "reward_std": 0.11998833467562993,
33
+ "rewards/get_embedding_sim/mean": 0.3440430959065755,
34
+ "rewards/get_embedding_sim/std": 0.06710867583751678,
35
+ "rewards/reward_num_unique_chars/mean": 0.026041666666666668,
36
+ "rewards/reward_num_unique_chars/std": 0.14761295169591904,
37
+ "step": 3
38
+ },
39
+ {
40
+ "clip_ratio/high_max": 0.0,
41
+ "clip_ratio/high_mean": 0.0,
42
+ "clip_ratio/low_mean": 0.0,
43
+ "clip_ratio/low_min": 0.0,
44
+ "clip_ratio/region_mean": 0.0,
45
+ "completions/clipped_ratio": 0.13020833333333334,
46
+ "completions/max_length": 1024.0,
47
+ "completions/max_terminated_length": 959.0,
48
+ "completions/mean_length": 307.0069580078125,
49
+ "completions/mean_terminated_length": 199.09521484375,
50
+ "completions/min_length": 10.333333333333334,
51
+ "completions/min_terminated_length": 10.333333333333334,
52
+ "epoch": 0.09073724007561437,
53
+ "grad_norm": 0.12008437514305115,
54
+ "kl": 0.0001388813058535258,
55
+ "learning_rate": 1e-06,
56
+ "loss": 0.035,
57
+ "num_tokens": 1882942.0,
58
+ "reward": 0.4796616733074188,
59
+ "reward_std": 0.214401513338089,
60
+ "rewards/get_embedding_sim/mean": 0.3694185713926951,
61
+ "rewards/get_embedding_sim/std": 0.07585694640874863,
62
+ "rewards/reward_num_unique_chars/mean": 0.1102430559694767,
63
+ "rewards/reward_num_unique_chars/std": 0.2982482860485713,
64
+ "step": 6
65
+ },
66
+ {
67
+ "clip_ratio/high_max": 0.0,
68
+ "clip_ratio/high_mean": 0.0,
69
+ "clip_ratio/low_mean": 0.0,
70
+ "clip_ratio/low_min": 0.0,
71
+ "clip_ratio/region_mean": 0.0,
72
+ "completions/clipped_ratio": 0.08072916666666667,
73
+ "completions/max_length": 1024.0,
74
+ "completions/max_terminated_length": 845.0,
75
+ "completions/mean_length": 234.67969258626303,
76
+ "completions/mean_terminated_length": 166.36500040690103,
77
+ "completions/min_length": 21.0,
78
+ "completions/min_terminated_length": 21.0,
79
+ "epoch": 0.13610586011342155,
80
+ "grad_norm": 0.08606597781181335,
81
+ "kl": 0.00013801626240213713,
82
+ "learning_rate": 1e-06,
83
+ "loss": 0.0172,
84
+ "num_tokens": 2735293.0,
85
+ "reward": 0.39071526130040485,
86
+ "reward_std": 0.1662569542725881,
87
+ "rewards/get_embedding_sim/mean": 0.33168746034304303,
88
+ "rewards/get_embedding_sim/std": 0.07500659177700679,
89
+ "rewards/reward_num_unique_chars/mean": 0.059027779226501785,
90
+ "rewards/reward_num_unique_chars/std": 0.22509141763051352,
91
+ "step": 9
92
+ },
93
+ {
94
+ "clip_ratio/high_max": 0.0,
95
+ "clip_ratio/high_mean": 0.0,
96
+ "clip_ratio/low_mean": 0.0,
97
+ "clip_ratio/low_min": 0.0,
98
+ "clip_ratio/region_mean": 0.0,
99
+ "completions/clipped_ratio": 0.10503472222222225,
100
+ "completions/max_length": 1024.0,
101
+ "completions/max_terminated_length": 983.3333333333334,
102
+ "completions/mean_length": 262.79688517252606,
103
+ "completions/mean_terminated_length": 173.54302469889322,
104
+ "completions/min_length": 12.0,
105
+ "completions/min_terminated_length": 12.0,
106
+ "epoch": 0.18147448015122875,
107
+ "grad_norm": 0.11949238181114197,
108
+ "kl": 0.00030877192815144855,
109
+ "learning_rate": 1e-06,
110
+ "loss": -0.0001,
111
+ "num_tokens": 3627859.0,
112
+ "reward": 0.4095470607280731,
113
+ "reward_std": 0.18979967882235846,
114
+ "rewards/get_embedding_sim/mean": 0.33055397868156433,
115
+ "rewards/get_embedding_sim/std": 0.07462155818939209,
116
+ "rewards/reward_num_unique_chars/mean": 0.07899305472771327,
117
+ "rewards/reward_num_unique_chars/std": 0.25569593409697217,
118
+ "step": 12
119
+ },
120
+ {
121
+ "clip_ratio/high_max": 0.0,
122
+ "clip_ratio/high_mean": 0.0,
123
+ "clip_ratio/low_mean": 0.0,
124
+ "clip_ratio/low_min": 0.0,
125
+ "clip_ratio/region_mean": 0.0,
126
+ "completions/clipped_ratio": 0.1362847222222222,
127
+ "completions/max_length": 1024.0,
128
+ "completions/max_terminated_length": 991.6666666666666,
129
+ "completions/mean_length": 316.6762288411458,
130
+ "completions/mean_terminated_length": 204.85944112141928,
131
+ "completions/min_length": 9.666666666666666,
132
+ "completions/min_terminated_length": 9.666666666666666,
133
+ "epoch": 0.22684310018903592,
134
+ "grad_norm": 0.16435399651527405,
135
+ "kl": 0.0005876521269480387,
136
+ "learning_rate": 1e-06,
137
+ "loss": 0.0529,
138
+ "num_tokens": 4554894.0,
139
+ "reward": 0.4522427221139272,
140
+ "reward_std": 0.205996572971344,
141
+ "rewards/get_embedding_sim/mean": 0.35502047340075177,
142
+ "rewards/get_embedding_sim/std": 0.076506607234478,
143
+ "rewards/reward_num_unique_chars/mean": 0.09722222139437993,
144
+ "rewards/reward_num_unique_chars/std": 0.27809616923332214,
145
+ "step": 15
146
+ },
147
+ {
148
+ "clip_ratio/high_max": 0.0,
149
+ "clip_ratio/high_mean": 0.0,
150
+ "clip_ratio/low_mean": 0.0,
151
+ "clip_ratio/low_min": 0.0,
152
+ "clip_ratio/region_mean": 0.0,
153
+ "completions/clipped_ratio": 0.11718750000000004,
154
+ "completions/max_length": 1024.0,
155
+ "completions/max_terminated_length": 927.0,
156
+ "completions/mean_length": 283.77171834309894,
157
+ "completions/mean_terminated_length": 184.45149739583334,
158
+ "completions/min_length": 24.666666666666668,
159
+ "completions/min_terminated_length": 24.666666666666668,
160
+ "epoch": 0.2722117202268431,
161
+ "grad_norm": 0.17904439568519592,
162
+ "kl": 0.0004306634267171224,
163
+ "learning_rate": 1e-06,
164
+ "loss": 0.036,
165
+ "num_tokens": 5464567.0,
166
+ "reward": 0.47324784596761066,
167
+ "reward_std": 0.2480545292297999,
168
+ "rewards/get_embedding_sim/mean": 0.35345616936683655,
169
+ "rewards/get_embedding_sim/std": 0.08570993691682816,
170
+ "rewards/reward_num_unique_chars/mean": 0.11979166915019353,
171
+ "rewards/reward_num_unique_chars/std": 0.32309961318969727,
172
+ "step": 18
173
+ },
174
+ {
175
+ "clip_ratio/high_max": 0.0,
176
+ "clip_ratio/high_mean": 0.0,
177
+ "clip_ratio/low_mean": 0.0,
178
+ "clip_ratio/low_min": 0.0,
179
+ "clip_ratio/region_mean": 0.0,
180
+ "completions/clipped_ratio": 0.07204861111111112,
181
+ "completions/max_length": 1024.0,
182
+ "completions/max_terminated_length": 1011.0,
183
+ "completions/mean_length": 230.54688517252603,
184
+ "completions/mean_terminated_length": 169.21332804361978,
185
+ "completions/min_length": 12.333333333333334,
186
+ "completions/min_terminated_length": 12.333333333333334,
187
+ "epoch": 0.31758034026465026,
188
+ "grad_norm": 0.11123450100421906,
189
+ "kl": 0.0011239051818847656,
190
+ "learning_rate": 1e-06,
191
+ "loss": 0.0222,
192
+ "num_tokens": 6313117.0,
193
+ "reward": 0.4715224802494049,
194
+ "reward_std": 0.2366275986035665,
195
+ "rewards/get_embedding_sim/mean": 0.3491266171137492,
196
+ "rewards/get_embedding_sim/std": 0.06465367351969083,
197
+ "rewards/reward_num_unique_chars/mean": 0.1223958358168602,
198
+ "rewards/reward_num_unique_chars/std": 0.3250391185283661,
199
+ "step": 21
200
+ },
201
+ {
202
+ "clip_ratio/high_max": 0.0,
203
+ "clip_ratio/high_mean": 0.0,
204
+ "clip_ratio/low_mean": 0.0,
205
+ "clip_ratio/low_min": 0.0,
206
+ "clip_ratio/region_mean": 0.0,
207
+ "completions/clipped_ratio": 0.09895833333333337,
208
+ "completions/max_length": 1024.0,
209
+ "completions/max_terminated_length": 961.0,
210
+ "completions/mean_length": 229.36719258626303,
211
+ "completions/mean_terminated_length": 142.55723571777344,
212
+ "completions/min_length": 15.0,
213
+ "completions/min_terminated_length": 15.0,
214
+ "epoch": 0.3629489603024575,
215
+ "grad_norm": 0.118320994079113,
216
+ "kl": 0.0019257068634033203,
217
+ "learning_rate": 1e-06,
218
+ "loss": 0.0158,
219
+ "num_tokens": 7162132.0,
220
+ "reward": 0.5189645787080129,
221
+ "reward_std": 0.24159842729568481,
222
+ "rewards/get_embedding_sim/mean": 0.3809437155723572,
223
+ "rewards/get_embedding_sim/std": 0.0799456536769867,
224
+ "rewards/reward_num_unique_chars/mean": 0.13802083084980646,
225
+ "rewards/reward_num_unique_chars/std": 0.3419287900129954,
226
+ "step": 24
227
+ },
228
+ {
229
+ "clip_ratio/high_max": 0.0,
230
+ "clip_ratio/high_mean": 0.0,
231
+ "clip_ratio/low_mean": 0.0,
232
+ "clip_ratio/low_min": 0.0,
233
+ "clip_ratio/region_mean": 0.0,
234
+ "completions/clipped_ratio": 0.052951388888888874,
235
+ "completions/max_length": 1024.0,
236
+ "completions/max_terminated_length": 982.3333333333334,
237
+ "completions/mean_length": 197.44445292154947,
238
+ "completions/mean_terminated_length": 151.25631205240884,
239
+ "completions/min_length": 14.666666666666666,
240
+ "completions/min_terminated_length": 14.666666666666666,
241
+ "epoch": 0.40831758034026466,
242
+ "grad_norm": 0.11851406842470169,
243
+ "kl": 0.002936681111653646,
244
+ "learning_rate": 1e-06,
245
+ "loss": 0.0317,
246
+ "num_tokens": 7973172.0,
247
+ "reward": 0.569815476735433,
248
+ "reward_std": 0.25512967507044476,
249
+ "rewards/get_embedding_sim/mean": 0.362350195646286,
250
+ "rewards/get_embedding_sim/std": 0.07909337679545085,
251
+ "rewards/reward_num_unique_chars/mean": 0.2074652761220932,
252
+ "rewards/reward_num_unique_chars/std": 0.4044720729192098,
253
+ "step": 27
254
+ },
255
+ {
256
+ "clip_ratio/high_max": 0.0,
257
+ "clip_ratio/high_mean": 0.0,
258
+ "clip_ratio/low_mean": 0.0,
259
+ "clip_ratio/low_min": 0.0,
260
+ "clip_ratio/region_mean": 0.0,
261
+ "completions/clipped_ratio": 0.056423611111111126,
262
+ "completions/max_length": 1024.0,
263
+ "completions/max_terminated_length": 934.3333333333334,
264
+ "completions/mean_length": 211.5963592529297,
265
+ "completions/mean_terminated_length": 163.11248270670572,
266
+ "completions/min_length": 16.333333333333332,
267
+ "completions/min_terminated_length": 16.333333333333332,
268
+ "epoch": 0.45368620037807184,
269
+ "grad_norm": 0.21573348343372345,
270
+ "kl": 0.008742332458496094,
271
+ "learning_rate": 1e-06,
272
+ "loss": 0.0125,
273
+ "num_tokens": 8794371.0,
274
+ "reward": 0.43826034665107727,
275
+ "reward_std": 0.20837691922982535,
276
+ "rewards/get_embedding_sim/mean": 0.3427741924921672,
277
+ "rewards/get_embedding_sim/std": 0.0719177375237147,
278
+ "rewards/reward_num_unique_chars/mean": 0.09548610945542653,
279
+ "rewards/reward_num_unique_chars/std": 0.2681623448928197,
280
+ "step": 30
281
+ },
282
+ {
283
+ "clip_ratio/high_max": 0.0,
284
+ "clip_ratio/high_mean": 0.0,
285
+ "clip_ratio/low_mean": 0.0,
286
+ "clip_ratio/low_min": 0.0,
287
+ "clip_ratio/region_mean": 0.0,
288
+ "completions/clipped_ratio": 0.056423611111111126,
289
+ "completions/max_length": 1024.0,
290
+ "completions/max_terminated_length": 892.0,
291
+ "completions/mean_length": 197.90365091959634,
292
+ "completions/mean_terminated_length": 148.50442504882812,
293
+ "completions/min_length": 15.0,
294
+ "completions/min_terminated_length": 15.0,
295
+ "epoch": 0.499054820415879,
296
+ "grad_norm": 0.08199404180049896,
297
+ "kl": 0.005775133768717448,
298
+ "learning_rate": 1e-06,
299
+ "loss": 0.0113,
300
+ "num_tokens": 9601812.0,
301
+ "reward": 0.45480871200561523,
302
+ "reward_std": 0.2194500764211019,
303
+ "rewards/get_embedding_sim/mean": 0.36192673444747925,
304
+ "rewards/get_embedding_sim/std": 0.0750991627573967,
305
+ "rewards/reward_num_unique_chars/mean": 0.0928819440305233,
306
+ "rewards/reward_num_unique_chars/std": 0.2857237259546916,
307
+ "step": 33
308
+ },
309
+ {
310
+ "clip_ratio/high_max": 0.0,
311
+ "clip_ratio/high_mean": 0.0,
312
+ "clip_ratio/low_mean": 0.0,
313
+ "clip_ratio/low_min": 0.0,
314
+ "clip_ratio/region_mean": 0.0,
315
+ "completions/clipped_ratio": 0.053819444444444454,
316
+ "completions/max_length": 1024.0,
317
+ "completions/max_terminated_length": 873.3333333333334,
318
+ "completions/mean_length": 201.65104166666666,
319
+ "completions/mean_terminated_length": 154.5564727783203,
320
+ "completions/min_length": 10.666666666666666,
321
+ "completions/min_terminated_length": 10.666666666666666,
322
+ "epoch": 0.5444234404536862,
323
+ "grad_norm": 0.13542793691158295,
324
+ "kl": 0.011366526285807291,
325
+ "learning_rate": 1e-06,
326
+ "loss": -0.0008,
327
+ "num_tokens": 10414722.0,
328
+ "reward": 0.4134095311164856,
329
+ "reward_std": 0.16343241184949875,
330
+ "rewards/get_embedding_sim/mean": 0.3708748022715251,
331
+ "rewards/get_embedding_sim/std": 0.08833041042089462,
332
+ "rewards/reward_num_unique_chars/mean": 0.042534722636143364,
333
+ "rewards/reward_num_unique_chars/std": 0.1979833443959554,
334
+ "step": 36
335
+ },
336
+ {
337
+ "clip_ratio/high_max": 0.0,
338
+ "clip_ratio/high_mean": 0.0,
339
+ "clip_ratio/low_mean": 0.0,
340
+ "clip_ratio/low_min": 0.0,
341
+ "clip_ratio/region_mean": 0.0,
342
+ "completions/clipped_ratio": 0.04340277777777779,
343
+ "completions/max_length": 1024.0,
344
+ "completions/max_terminated_length": 891.6666666666666,
345
+ "completions/mean_length": 176.1076456705729,
346
+ "completions/mean_terminated_length": 137.35225423177084,
347
+ "completions/min_length": 11.0,
348
+ "completions/min_terminated_length": 11.0,
349
+ "epoch": 0.5897920604914934,
350
+ "grad_norm": 1.7642544507980347,
351
+ "kl": 0.151151974995931,
352
+ "learning_rate": 1e-06,
353
+ "loss": 0.0179,
354
+ "num_tokens": 11207422.0,
355
+ "reward": 0.5713514387607574,
356
+ "reward_std": 0.26335498690605164,
357
+ "rewards/get_embedding_sim/mean": 0.36909447113672894,
358
+ "rewards/get_embedding_sim/std": 0.09187572946151097,
359
+ "rewards/reward_num_unique_chars/mean": 0.202256940305233,
360
+ "rewards/reward_num_unique_chars/std": 0.390445997317632,
361
+ "step": 39
362
+ },
363
+ {
364
+ "clip_ratio/high_max": 0.0,
365
+ "clip_ratio/high_mean": 0.0,
366
+ "clip_ratio/low_mean": 0.0,
367
+ "clip_ratio/low_min": 0.0,
368
+ "clip_ratio/region_mean": 0.0,
369
+ "completions/clipped_ratio": 0.032986111111111126,
370
+ "completions/max_length": 1024.0,
371
+ "completions/max_terminated_length": 826.3333333333334,
372
+ "completions/mean_length": 201.41754150390625,
373
+ "completions/mean_terminated_length": 173.10018412272134,
374
+ "completions/min_length": 18.333333333333332,
375
+ "completions/min_terminated_length": 18.333333333333332,
376
+ "epoch": 0.6351606805293005,
377
+ "grad_norm": 0.10251538455486298,
378
+ "kl": 0.014621734619140625,
379
+ "learning_rate": 1e-06,
380
+ "loss": 0.0102,
381
+ "num_tokens": 12029279.0,
382
+ "reward": 0.5142592787742615,
383
+ "reward_std": 0.2620675365130107,
384
+ "rewards/get_embedding_sim/mean": 0.3701620002587636,
385
+ "rewards/get_embedding_sim/std": 0.10092929750680923,
386
+ "rewards/reward_num_unique_chars/mean": 0.1440972238779068,
387
+ "rewards/reward_num_unique_chars/std": 0.34582529465357464,
388
+ "step": 42
389
+ },
390
+ {
391
+ "clip_ratio/high_max": 0.0,
392
+ "clip_ratio/high_mean": 0.0,
393
+ "clip_ratio/low_mean": 0.0,
394
+ "clip_ratio/low_min": 0.0,
395
+ "clip_ratio/region_mean": 0.0,
396
+ "completions/clipped_ratio": 0.026041666666666668,
397
+ "completions/max_length": 1024.0,
398
+ "completions/max_terminated_length": 927.6666666666666,
399
+ "completions/mean_length": 183.04254150390625,
400
+ "completions/mean_terminated_length": 160.71800740559897,
401
+ "completions/min_length": 14.666666666666666,
402
+ "completions/min_terminated_length": 14.666666666666666,
403
+ "epoch": 0.6805293005671077,
404
+ "grad_norm": 0.09084329754114151,
405
+ "kl": 0.015349706013997396,
406
+ "learning_rate": 1e-06,
407
+ "loss": -0.0004,
408
+ "num_tokens": 12816000.0,
409
+ "reward": 0.5384640991687775,
410
+ "reward_std": 0.22944432497024536,
411
+ "rewards/get_embedding_sim/mean": 0.39697099725405377,
412
+ "rewards/get_embedding_sim/std": 0.10396929830312729,
413
+ "rewards/reward_num_unique_chars/mean": 0.14149305721124014,
414
+ "rewards/reward_num_unique_chars/std": 0.3254843403895696,
415
+ "step": 45
416
+ },
417
+ {
418
+ "clip_ratio/high_max": 0.0,
419
+ "clip_ratio/high_mean": 0.0,
420
+ "clip_ratio/low_mean": 0.0,
421
+ "clip_ratio/low_min": 0.0,
422
+ "clip_ratio/region_mean": 0.0,
423
+ "completions/clipped_ratio": 0.02777777777777779,
424
+ "completions/max_length": 1024.0,
425
+ "completions/max_terminated_length": 802.3333333333334,
426
+ "completions/mean_length": 165.0295155843099,
427
+ "completions/mean_terminated_length": 140.43072509765625,
428
+ "completions/min_length": 9.666666666666666,
429
+ "completions/min_terminated_length": 9.666666666666666,
430
+ "epoch": 0.725897920604915,
431
+ "grad_norm": 0.21910759806632996,
432
+ "kl": 0.027149200439453125,
433
+ "learning_rate": 1e-06,
434
+ "loss": 0.0009,
435
+ "num_tokens": 13587394.0,
436
+ "reward": 0.5553397635618845,
437
+ "reward_std": 0.23784717917442322,
438
+ "rewards/get_embedding_sim/mean": 0.4086383481820424,
439
+ "rewards/get_embedding_sim/std": 0.10949051380157471,
440
+ "rewards/reward_num_unique_chars/mean": 0.14670138930281004,
441
+ "rewards/reward_num_unique_chars/std": 0.33698558807373047,
442
+ "step": 48
443
+ },
444
+ {
445
+ "epoch": 0.7712665406427222,
446
+ "grad_norm": 0.09893961995840073,
447
+ "learning_rate": 1e-06,
448
+ "loss": 0.0047,
449
+ "step": 51
450
+ },
451
+ {
452
+ "epoch": 0.7712665406427222,
453
+ "eval_clip_ratio/high_max": 0.0,
454
+ "eval_clip_ratio/high_mean": 0.0,
455
+ "eval_clip_ratio/low_mean": 0.0,
456
+ "eval_clip_ratio/low_min": 0.0,
457
+ "eval_clip_ratio/region_mean": 0.0,
458
+ "eval_completions/clipped_ratio": 0.12797619047619044,
459
+ "eval_completions/max_length": 880.7678571428571,
460
+ "eval_completions/max_terminated_length": 701.3214285714286,
461
+ "eval_completions/mean_length": 258.24070589882984,
462
+ "eval_completions/mean_terminated_length": 153.6624070576259,
463
+ "eval_completions/min_length": 24.446428571428573,
464
+ "eval_completions/min_terminated_length": 24.446428571428573,
465
+ "eval_kl": 0.0542449951171875,
466
+ "eval_loss": 0.026244351640343666,
467
+ "eval_num_tokens": 14351398.0,
468
+ "eval_reward": 0.524820977555854,
469
+ "eval_reward_std": 0.22432494928528154,
470
+ "eval_rewards/get_embedding_sim/mean": 0.43479119294456076,
471
+ "eval_rewards/get_embedding_sim/std": 0.09110667330345937,
472
+ "eval_rewards/reward_num_unique_chars/mean": 0.09002976235933602,
473
+ "eval_rewards/reward_num_unique_chars/std": 0.18600706889161042,
474
+ "eval_runtime": 2254.2404,
475
+ "eval_samples_per_second": 0.025,
476
+ "eval_steps_per_second": 0.001,
477
+ "step": 51
478
+ },
479
+ {
480
+ "clip_ratio/high_max": 0.0,
481
+ "clip_ratio/high_mean": 0.0,
482
+ "clip_ratio/low_mean": 0.0,
483
+ "clip_ratio/low_min": 0.0,
484
+ "clip_ratio/region_mean": 0.0,
485
+ "completions/clipped_ratio": 0.044270833333333315,
486
+ "completions/max_length": 1024.0,
487
+ "completions/max_terminated_length": 921.3333333333334,
488
+ "completions/mean_length": 197.77517954508463,
489
+ "completions/mean_terminated_length": 159.97277196248373,
490
+ "completions/min_length": 9.833333333333334,
491
+ "completions/min_terminated_length": 9.833333333333334,
492
+ "epoch": 0.8166351606805293,
493
+ "grad_norm": 0.08635270595550537,
494
+ "kl": 0.030397415161132812,
495
+ "learning_rate": 1e-06,
496
+ "loss": 0.0077,
497
+ "num_tokens": 15200636.0,
498
+ "reward": 0.5215439548095068,
499
+ "reward_std": 0.23126975446939468,
500
+ "rewards/get_embedding_sim/mean": 0.42692585786183673,
501
+ "rewards/get_embedding_sim/std": 0.11467409133911133,
502
+ "rewards/reward_num_unique_chars/mean": 0.09461805845300357,
503
+ "rewards/reward_num_unique_chars/std": 0.28477593511343,
504
+ "step": 54
505
+ },
506
+ {
507
+ "clip_ratio/high_max": 0.0,
508
+ "clip_ratio/high_mean": 0.0,
509
+ "clip_ratio/low_mean": 0.0,
510
+ "clip_ratio/low_min": 0.0,
511
+ "clip_ratio/region_mean": 0.0,
512
+ "completions/clipped_ratio": 0.04253472222222221,
513
+ "completions/max_length": 1024.0,
514
+ "completions/max_terminated_length": 836.6666666666666,
515
+ "completions/mean_length": 198.4244842529297,
516
+ "completions/mean_terminated_length": 161.79749043782553,
517
+ "completions/min_length": 10.333333333333334,
518
+ "completions/min_terminated_length": 10.333333333333334,
519
+ "epoch": 0.8620037807183365,
520
+ "grad_norm": 14.726771354675293,
521
+ "kl": 0.21588261922200522,
522
+ "learning_rate": 1e-06,
523
+ "loss": 0.0104,
524
+ "num_tokens": 16019045.0,
525
+ "reward": 0.5494122306505839,
526
+ "reward_std": 0.24494746327400208,
527
+ "rewards/get_embedding_sim/mean": 0.44264134764671326,
528
+ "rewards/get_embedding_sim/std": 0.11085022240877151,
529
+ "rewards/reward_num_unique_chars/mean": 0.10677083333333333,
530
+ "rewards/reward_num_unique_chars/std": 0.30227985978126526,
531
+ "step": 57
532
+ },
533
+ {
534
+ "clip_ratio/high_max": 0.0,
535
+ "clip_ratio/high_mean": 0.0,
536
+ "clip_ratio/low_mean": 0.0,
537
+ "clip_ratio/low_min": 0.0,
538
+ "clip_ratio/region_mean": 0.0,
539
+ "completions/clipped_ratio": 0.04253472222222221,
540
+ "completions/max_length": 1024.0,
541
+ "completions/max_terminated_length": 964.6666666666666,
542
+ "completions/mean_length": 200.72309366861978,
543
+ "completions/mean_terminated_length": 164.248779296875,
544
+ "completions/min_length": 11.333333333333334,
545
+ "completions/min_terminated_length": 11.333333333333334,
546
+ "epoch": 0.9073724007561437,
547
+ "grad_norm": 0.09581304341554642,
548
+ "kl": 0.33023325602213544,
549
+ "learning_rate": 1e-06,
550
+ "loss": 0.0072,
551
+ "num_tokens": 16832758.0,
552
+ "reward": 0.599389910697937,
553
+ "reward_std": 0.26327316959698993,
554
+ "rewards/get_embedding_sim/mean": 0.45268850525220233,
555
+ "rewards/get_embedding_sim/std": 0.11441038797299068,
556
+ "rewards/reward_num_unique_chars/mean": 0.14670139302810034,
557
+ "rewards/reward_num_unique_chars/std": 0.31440146267414093,
558
+ "step": 60
559
+ },
560
+ {
561
+ "clip_ratio/high_max": 0.0,
562
+ "clip_ratio/high_mean": 0.0,
563
+ "clip_ratio/low_mean": 0.0,
564
+ "clip_ratio/low_min": 0.0,
565
+ "clip_ratio/region_mean": 0.0,
566
+ "completions/clipped_ratio": 0.021701388888888878,
567
+ "completions/max_length": 1024.0,
568
+ "completions/max_terminated_length": 917.3333333333334,
569
+ "completions/mean_length": 186.21094258626303,
570
+ "completions/mean_terminated_length": 167.5730946858724,
571
+ "completions/min_length": 13.0,
572
+ "completions/min_terminated_length": 13.0,
573
+ "epoch": 0.9527410207939508,
574
+ "grad_norm": 0.08248484879732132,
575
+ "kl": 0.04541015625,
576
+ "learning_rate": 1e-06,
577
+ "loss": 0.0017,
578
+ "num_tokens": 17637097.0,
579
+ "reward": 0.5855847001075745,
580
+ "reward_std": 0.2750825683275859,
581
+ "rewards/get_embedding_sim/mean": 0.46405691901842755,
582
+ "rewards/get_embedding_sim/std": 0.11442819982767105,
583
+ "rewards/reward_num_unique_chars/mean": 0.12152778108914693,
584
+ "rewards/reward_num_unique_chars/std": 0.3193853000799815,
585
+ "step": 63
586
+ },
587
+ {
588
+ "clip_ratio/high_max": 0.0,
589
+ "clip_ratio/high_mean": 0.0,
590
+ "clip_ratio/low_mean": 0.0,
591
+ "clip_ratio/low_min": 0.0,
592
+ "clip_ratio/region_mean": 0.0,
593
+ "completions/clipped_ratio": 0.031507423371647504,
594
+ "completions/max_length": 1024.0,
595
+ "completions/max_terminated_length": 930.0,
596
+ "completions/mean_length": 193.8086140950521,
597
+ "completions/mean_terminated_length": 167.16290283203125,
598
+ "completions/min_length": 7.0,
599
+ "completions/min_terminated_length": 7.0,
600
+ "epoch": 0.998109640831758,
601
+ "grad_norm": 0.06374574452638626,
602
+ "kl": 0.03699493408203125,
603
+ "learning_rate": 1e-06,
604
+ "loss": 0.0187,
605
+ "num_tokens": 18440914.0,
606
+ "reward": 0.6297420461972555,
607
+ "reward_std": 0.2834969659646352,
608
+ "rewards/get_embedding_sim/mean": 0.47088783979415894,
609
+ "rewards/get_embedding_sim/std": 0.11324869592984517,
610
+ "rewards/reward_num_unique_chars/mean": 0.1588541641831398,
611
+ "rewards/reward_num_unique_chars/std": 0.36384791135787964,
612
+ "step": 66
613
+ },
614
+ {
615
+ "clip_ratio/high_max": 0.0,
616
+ "clip_ratio/high_mean": 0.0,
617
+ "clip_ratio/low_mean": 0.0,
618
+ "clip_ratio/low_min": 0.0,
619
+ "clip_ratio/region_mean": 0.0,
620
+ "completions/clipped_ratio": 0.032118055555555546,
621
+ "completions/max_length": 1024.0,
622
+ "completions/max_terminated_length": 833.3333333333334,
623
+ "completions/mean_length": 200.6024373372396,
624
+ "completions/mean_terminated_length": 173.2165069580078,
625
+ "completions/min_length": 9.0,
626
+ "completions/min_terminated_length": 9.0,
627
+ "epoch": 1.0453686200378072,
628
+ "grad_norm": 0.11849670857191086,
629
+ "kl": 0.05316925048828125,
630
+ "learning_rate": 1e-06,
631
+ "loss": 0.0071,
632
+ "num_tokens": 19261832.0,
633
+ "reward": 0.5802033940951029,
634
+ "reward_std": 0.25838569800059,
635
+ "rewards/get_embedding_sim/mean": 0.4734325309594472,
636
+ "rewards/get_embedding_sim/std": 0.11253533015648524,
637
+ "rewards/reward_num_unique_chars/mean": 0.10677083084980647,
638
+ "rewards/reward_num_unique_chars/std": 0.30244183043638867,
639
+ "step": 69
640
+ },
641
+ {
642
+ "clip_ratio/high_max": 0.0,
643
+ "clip_ratio/high_mean": 0.0,
644
+ "clip_ratio/low_mean": 0.0,
645
+ "clip_ratio/low_min": 0.0,
646
+ "clip_ratio/region_mean": 0.0,
647
+ "completions/clipped_ratio": 0.039930555555555546,
648
+ "completions/max_length": 1024.0,
649
+ "completions/max_terminated_length": 973.0,
650
+ "completions/mean_length": 199.55555725097656,
651
+ "completions/mean_terminated_length": 165.2902577718099,
652
+ "completions/min_length": 9.333333333333334,
653
+ "completions/min_terminated_length": 9.333333333333334,
654
+ "epoch": 1.0907372400756143,
655
+ "grad_norm": 0.10332732647657394,
656
+ "kl": 0.0515289306640625,
657
+ "learning_rate": 1e-06,
658
+ "loss": 0.0075,
659
+ "num_tokens": 20067096.0,
660
+ "reward": 0.625789741675059,
661
+ "reward_std": 0.2765499949455261,
662
+ "rewards/get_embedding_sim/mean": 0.49471331636110943,
663
+ "rewards/get_embedding_sim/std": 0.11266019940376282,
664
+ "rewards/reward_num_unique_chars/mean": 0.1310763880610466,
665
+ "rewards/reward_num_unique_chars/std": 0.336679349342982,
666
+ "step": 72
667
+ },
668
+ {
669
+ "clip_ratio/high_max": 0.0,
670
+ "clip_ratio/high_mean": 0.0,
671
+ "clip_ratio/low_mean": 0.0,
672
+ "clip_ratio/low_min": 0.0,
673
+ "clip_ratio/region_mean": 0.0,
674
+ "completions/clipped_ratio": 0.036458333333333294,
675
+ "completions/max_length": 1024.0,
676
+ "completions/max_terminated_length": 1008.6666666666666,
677
+ "completions/mean_length": 209.8359375,
678
+ "completions/mean_terminated_length": 178.97360229492188,
679
+ "completions/min_length": 7.0,
680
+ "completions/min_terminated_length": 7.0,
681
+ "epoch": 1.1361058601134215,
682
+ "grad_norm": 0.11925654858350754,
683
+ "kl": 0.14461263020833334,
684
+ "learning_rate": 1e-06,
685
+ "loss": 0.0055,
686
+ "num_tokens": 20893467.0,
687
+ "reward": 0.5831413467725118,
688
+ "reward_std": 0.2582869480053584,
689
+ "rewards/get_embedding_sim/mean": 0.4919954836368561,
690
+ "rewards/get_embedding_sim/std": 0.1114387462536494,
691
+ "rewards/reward_num_unique_chars/mean": 0.09114583333333333,
692
+ "rewards/reward_num_unique_chars/std": 0.2839343051115672,
693
+ "step": 75
694
+ },
695
+ {
696
+ "clip_ratio/high_max": 0.0,
697
+ "clip_ratio/high_mean": 0.0,
698
+ "clip_ratio/low_mean": 0.0,
699
+ "clip_ratio/low_min": 0.0,
700
+ "clip_ratio/region_mean": 0.0,
701
+ "completions/clipped_ratio": 0.047743055555555546,
702
+ "completions/max_length": 1024.0,
703
+ "completions/max_terminated_length": 897.3333333333334,
704
+ "completions/mean_length": 221.0104217529297,
705
+ "completions/mean_terminated_length": 180.71256510416666,
706
+ "completions/min_length": 5.0,
707
+ "completions/min_terminated_length": 5.0,
708
+ "epoch": 1.1814744801512287,
709
+ "grad_norm": 0.09554021060466766,
710
+ "kl": 0.16336822509765625,
711
+ "learning_rate": 1e-06,
712
+ "loss": 0.0197,
713
+ "num_tokens": 21730887.0,
714
+ "reward": 0.6385945876439413,
715
+ "reward_std": 0.2661168724298477,
716
+ "rewards/get_embedding_sim/mean": 0.5127264857292175,
717
+ "rewards/get_embedding_sim/std": 0.11183823893467586,
718
+ "rewards/reward_num_unique_chars/mean": 0.12586805472771326,
719
+ "rewards/reward_num_unique_chars/std": 0.3207412262757619,
720
+ "step": 78
721
+ },
722
+ {
723
+ "clip_ratio/high_max": 0.0,
724
+ "clip_ratio/high_mean": 0.0,
725
+ "clip_ratio/low_mean": 0.0,
726
+ "clip_ratio/low_min": 0.0,
727
+ "clip_ratio/region_mean": 0.0,
728
+ "completions/clipped_ratio": 0.049479166666666664,
729
+ "completions/max_length": 1024.0,
730
+ "completions/max_terminated_length": 939.0,
731
+ "completions/mean_length": 228.04601033528647,
732
+ "completions/mean_terminated_length": 186.1550038655599,
733
+ "completions/min_length": 7.333333333333333,
734
+ "completions/min_terminated_length": 7.333333333333333,
735
+ "epoch": 1.2268431001890359,
736
+ "grad_norm": 0.07755686342716217,
737
+ "kl": 0.05751800537109375,
738
+ "learning_rate": 1e-06,
739
+ "loss": 0.0156,
740
+ "num_tokens": 22583420.0,
741
+ "reward": 0.6019672354062399,
742
+ "reward_std": 0.26383428772290546,
743
+ "rewards/get_embedding_sim/mean": 0.5021408100922903,
744
+ "rewards/get_embedding_sim/std": 0.10627821832895279,
745
+ "rewards/reward_num_unique_chars/mean": 0.09982638930281003,
746
+ "rewards/reward_num_unique_chars/std": 0.2837299009164174,
747
+ "step": 81
748
+ },
749
+ {
750
+ "clip_ratio/high_max": 0.0,
751
+ "clip_ratio/high_mean": 0.0,
752
+ "clip_ratio/low_mean": 0.0,
753
+ "clip_ratio/low_min": 0.0,
754
+ "clip_ratio/region_mean": 0.0,
755
+ "completions/clipped_ratio": 0.029513888888888878,
756
+ "completions/max_length": 1024.0,
757
+ "completions/max_terminated_length": 931.3333333333334,
758
+ "completions/mean_length": 191.74740091959634,
759
+ "completions/mean_terminated_length": 166.4415028889974,
760
+ "completions/min_length": 8.666666666666666,
761
+ "completions/min_terminated_length": 8.666666666666666,
762
+ "epoch": 1.272211720226843,
763
+ "grad_norm": 0.08697984367609024,
764
+ "kl": 0.057329813639322914,
765
+ "learning_rate": 1e-06,
766
+ "loss": 0.0141,
767
+ "num_tokens": 23394137.0,
768
+ "reward": 0.6638144056002299,
769
+ "reward_std": 0.26522762576738995,
770
+ "rewards/get_embedding_sim/mean": 0.5231893658638,
771
+ "rewards/get_embedding_sim/std": 0.10482257604598999,
772
+ "rewards/reward_num_unique_chars/mean": 0.140625,
773
+ "rewards/reward_num_unique_chars/std": 0.3480878472328186,
774
+ "step": 84
775
+ },
776
+ {
777
+ "clip_ratio/high_max": 0.0,
778
+ "clip_ratio/high_mean": 0.0,
779
+ "clip_ratio/low_mean": 0.0,
780
+ "clip_ratio/low_min": 0.0,
781
+ "clip_ratio/region_mean": 0.0,
782
+ "completions/clipped_ratio": 0.026041666666666668,
783
+ "completions/max_length": 1024.0,
784
+ "completions/max_terminated_length": 872.3333333333334,
785
+ "completions/mean_length": 185.42535400390625,
786
+ "completions/mean_terminated_length": 163.15696716308594,
787
+ "completions/min_length": 7.333333333333333,
788
+ "completions/min_terminated_length": 7.333333333333333,
789
+ "epoch": 1.3175803402646502,
790
+ "grad_norm": 0.14970338344573975,
791
+ "kl": 0.12465922037760417,
792
+ "learning_rate": 1e-06,
793
+ "loss": 0.008,
794
+ "num_tokens": 24197571.0,
795
+ "reward": 0.6190575559933981,
796
+ "reward_std": 0.2601381540298462,
797
+ "rewards/get_embedding_sim/mean": 0.5174950361251831,
798
+ "rewards/get_embedding_sim/std": 0.0997606838742892,
799
+ "rewards/reward_num_unique_chars/mean": 0.10156250124176343,
800
+ "rewards/reward_num_unique_chars/std": 0.297150323788325,
801
+ "step": 87
802
+ },
803
+ {
804
+ "clip_ratio/high_max": 0.0,
805
+ "clip_ratio/high_mean": 0.0,
806
+ "clip_ratio/low_mean": 0.0,
807
+ "clip_ratio/low_min": 0.0,
808
+ "clip_ratio/region_mean": 0.0,
809
+ "completions/clipped_ratio": 0.029513888888888912,
810
+ "completions/max_length": 1024.0,
811
+ "completions/max_terminated_length": 965.6666666666666,
812
+ "completions/mean_length": 216.75694783528647,
813
+ "completions/mean_terminated_length": 192.3217315673828,
814
+ "completions/min_length": 7.333333333333333,
815
+ "completions/min_terminated_length": 7.333333333333333,
816
+ "epoch": 1.3629489603024574,
817
+ "grad_norm": 0.11725780367851257,
818
+ "kl": 0.08345540364583333,
819
+ "learning_rate": 1e-06,
820
+ "loss": 0.0079,
821
+ "num_tokens": 25034555.0,
822
+ "reward": 0.5995156168937683,
823
+ "reward_std": 0.22840352356433868,
824
+ "rewards/get_embedding_sim/mean": 0.5118419329325358,
825
+ "rewards/get_embedding_sim/std": 0.0987908939520518,
826
+ "rewards/reward_num_unique_chars/mean": 0.0876736119389534,
827
+ "rewards/reward_num_unique_chars/std": 0.27722589671611786,
828
+ "step": 90
829
+ },
830
+ {
831
+ "clip_ratio/high_max": 0.0,
832
+ "clip_ratio/high_mean": 0.0,
833
+ "clip_ratio/low_mean": 0.0,
834
+ "clip_ratio/low_min": 0.0,
835
+ "clip_ratio/region_mean": 0.0,
836
+ "completions/clipped_ratio": 0.029513888888888878,
837
+ "completions/max_length": 1024.0,
838
+ "completions/max_terminated_length": 884.3333333333334,
839
+ "completions/mean_length": 186.4375,
840
+ "completions/mean_terminated_length": 161.33899434407553,
841
+ "completions/min_length": 6.0,
842
+ "completions/min_terminated_length": 6.0,
843
+ "epoch": 1.4083175803402646,
844
+ "grad_norm": 0.10394510626792908,
845
+ "kl": 0.07037099202473958,
846
+ "learning_rate": 1e-06,
847
+ "loss": 0.0084,
848
+ "num_tokens": 25831283.0,
849
+ "reward": 0.6795124411582947,
850
+ "reward_std": 0.29141750435034436,
851
+ "rewards/get_embedding_sim/mean": 0.5137137969334921,
852
+ "rewards/get_embedding_sim/std": 0.09767910589774449,
853
+ "rewards/reward_num_unique_chars/mean": 0.16579860697189966,
854
+ "rewards/reward_num_unique_chars/std": 0.3542452355225881,
855
+ "step": 93
856
+ },
857
+ {
858
+ "clip_ratio/high_max": 0.0,
859
+ "clip_ratio/high_mean": 0.0,
860
+ "clip_ratio/low_mean": 0.0,
861
+ "clip_ratio/low_min": 0.0,
862
+ "clip_ratio/region_mean": 0.0,
863
+ "completions/clipped_ratio": 0.05034722222222221,
864
+ "completions/max_length": 1024.0,
865
+ "completions/max_terminated_length": 971.3333333333334,
866
+ "completions/mean_length": 212.23785400390625,
867
+ "completions/mean_terminated_length": 169.16080729166666,
868
+ "completions/min_length": 6.666666666666667,
869
+ "completions/min_terminated_length": 6.666666666666667,
870
+ "epoch": 1.4536862003780717,
871
+ "grad_norm": 0.10010381788015366,
872
+ "kl": 0.06960042317708333,
873
+ "learning_rate": 1e-06,
874
+ "loss": 0.0203,
875
+ "num_tokens": 26656485.0,
876
+ "reward": 0.6300086975097656,
877
+ "reward_std": 0.24619843065738678,
878
+ "rewards/get_embedding_sim/mean": 0.5267100731531779,
879
+ "rewards/get_embedding_sim/std": 0.1071697548031807,
880
+ "rewards/reward_num_unique_chars/mean": 0.1032986119389534,
881
+ "rewards/reward_num_unique_chars/std": 0.29826584458351135,
882
+ "step": 96
883
+ },
884
+ {
885
+ "clip_ratio/high_max": 0.0,
886
+ "clip_ratio/high_mean": 0.0,
887
+ "clip_ratio/low_mean": 0.0,
888
+ "clip_ratio/low_min": 0.0,
889
+ "clip_ratio/region_mean": 0.0,
890
+ "completions/clipped_ratio": 0.037326388888888874,
891
+ "completions/max_length": 1024.0,
892
+ "completions/max_terminated_length": 919.0,
893
+ "completions/mean_length": 211.8107655843099,
894
+ "completions/mean_terminated_length": 180.1980183919271,
895
+ "completions/min_length": 6.333333333333333,
896
+ "completions/min_terminated_length": 6.333333333333333,
897
+ "epoch": 1.499054820415879,
898
+ "grad_norm": 0.07485458254814148,
899
+ "kl": 0.061063130696614586,
900
+ "learning_rate": 1e-06,
901
+ "loss": 0.0248,
902
+ "num_tokens": 27490315.0,
903
+ "reward": 0.620047926902771,
904
+ "reward_std": 0.2632503807544708,
905
+ "rewards/get_embedding_sim/mean": 0.5132770538330078,
906
+ "rewards/get_embedding_sim/std": 0.10026986648639043,
907
+ "rewards/reward_num_unique_chars/mean": 0.10677083333333333,
908
+ "rewards/reward_num_unique_chars/std": 0.3043619990348816,
909
+ "step": 99
910
+ },
911
+ {
912
+ "epoch": 1.544423440453686,
913
+ "grad_norm": 0.11106861382722855,
914
+ "learning_rate": 1e-06,
915
+ "loss": 0.0115,
916
+ "step": 102
917
+ },
918
+ {
919
+ "epoch": 1.544423440453686,
920
+ "eval_clip_ratio/high_max": 0.0,
921
+ "eval_clip_ratio/high_mean": 0.0,
922
+ "eval_clip_ratio/low_mean": 0.0,
923
+ "eval_clip_ratio/low_min": 0.0,
924
+ "eval_clip_ratio/region_mean": 0.0,
925
+ "eval_completions/clipped_ratio": 0.07068452380952381,
926
+ "eval_completions/max_length": 887.5892857142857,
927
+ "eval_completions/max_terminated_length": 675.0892857142857,
928
+ "eval_completions/mean_length": 206.3244113922119,
929
+ "eval_completions/mean_terminated_length": 145.37539066587175,
930
+ "eval_completions/min_length": 18.160714285714285,
931
+ "eval_completions/min_terminated_length": 18.160714285714285,
932
+ "eval_kl": 0.06965419224330358,
933
+ "eval_loss": 0.03773626312613487,
934
+ "eval_num_tokens": 28307736.0,
935
+ "eval_reward": 0.6229457370936871,
936
+ "eval_reward_std": 0.2839882879384926,
937
+ "eval_rewards/get_embedding_sim/mean": 0.5206391582531589,
938
+ "eval_rewards/get_embedding_sim/std": 0.09148550758670483,
939
+ "eval_rewards/reward_num_unique_chars/mean": 0.10230654794057566,
940
+ "eval_rewards/reward_num_unique_chars/std": 0.24572753932859218,
941
+ "eval_runtime": 1726.6979,
942
+ "eval_samples_per_second": 0.032,
943
+ "eval_steps_per_second": 0.001,
944
+ "step": 102
945
+ },
946
+ {
947
+ "clip_ratio/high_max": 0.0,
948
+ "clip_ratio/high_mean": 0.0,
949
+ "clip_ratio/low_mean": 0.0,
950
+ "clip_ratio/low_min": 0.0,
951
+ "clip_ratio/region_mean": 0.0,
952
+ "completions/clipped_ratio": 0.03602430555555556,
953
+ "completions/max_length": 1024.0,
954
+ "completions/max_terminated_length": 990.3333333333334,
955
+ "completions/mean_length": 214.1545181274414,
956
+ "completions/mean_terminated_length": 183.94319661458334,
957
+ "completions/min_length": 6.5,
958
+ "completions/min_terminated_length": 6.5,
959
+ "epoch": 1.5897920604914932,
960
+ "grad_norm": 1.0838171243667603,
961
+ "kl": 0.0672899881998698,
962
+ "learning_rate": 1e-06,
963
+ "loss": 0.0253,
964
+ "num_tokens": 29138511.0,
965
+ "reward": 0.6624543964862823,
966
+ "reward_std": 0.26948046932617825,
967
+ "rewards/get_embedding_sim/mean": 0.5296418766180674,
968
+ "rewards/get_embedding_sim/std": 0.10213356713453929,
969
+ "rewards/reward_num_unique_chars/mean": 0.1328124993791183,
970
+ "rewards/reward_num_unique_chars/std": 0.32840434461832047,
971
+ "step": 105
972
+ },
973
+ {
974
+ "clip_ratio/high_max": 0.0,
975
+ "clip_ratio/high_mean": 0.0,
976
+ "clip_ratio/low_mean": 0.0,
977
+ "clip_ratio/low_min": 0.0,
978
+ "clip_ratio/region_mean": 0.0,
979
+ "completions/clipped_ratio": 0.026041666666666668,
980
+ "completions/max_length": 1024.0,
981
+ "completions/max_terminated_length": 974.0,
982
+ "completions/mean_length": 201.72048950195312,
983
+ "completions/mean_terminated_length": 179.72496032714844,
984
+ "completions/min_length": 7.333333333333333,
985
+ "completions/min_terminated_length": 7.333333333333333,
986
+ "epoch": 1.6351606805293004,
987
+ "grad_norm": 0.0918864831328392,
988
+ "kl": 0.061335245768229164,
989
+ "learning_rate": 1e-06,
990
+ "loss": 0.0208,
991
+ "num_tokens": 29960717.0,
992
+ "reward": 0.6120087305704752,
993
+ "reward_std": 0.250284880399704,
994
+ "rewards/get_embedding_sim/mean": 0.5364878376324972,
995
+ "rewards/get_embedding_sim/std": 0.0979540745417277,
996
+ "rewards/reward_num_unique_chars/mean": 0.07552083457509677,
997
+ "rewards/reward_num_unique_chars/std": 0.26320414741834003,
998
+ "step": 108
999
+ },
1000
+ {
1001
+ "clip_ratio/high_max": 0.0,
1002
+ "clip_ratio/high_mean": 0.0,
1003
+ "clip_ratio/low_mean": 0.0,
1004
+ "clip_ratio/low_min": 0.0,
1005
+ "clip_ratio/region_mean": 0.0,
1006
+ "completions/clipped_ratio": 0.03559027777777779,
1007
+ "completions/max_length": 1024.0,
1008
+ "completions/max_terminated_length": 923.0,
1009
+ "completions/mean_length": 206.97309366861978,
1010
+ "completions/mean_terminated_length": 177.1915079752604,
1011
+ "completions/min_length": 7.666666666666667,
1012
+ "completions/min_terminated_length": 7.666666666666667,
1013
+ "epoch": 1.6805293005671076,
1014
+ "grad_norm": 0.07678642123937607,
1015
+ "kl": 0.06285349527994792,
1016
+ "learning_rate": 1e-06,
1017
+ "loss": 0.0214,
1018
+ "num_tokens": 30781870.0,
1019
+ "reward": 0.6274827718734741,
1020
+ "reward_std": 0.26556732257207233,
1021
+ "rewards/get_embedding_sim/mean": 0.5155035257339478,
1022
+ "rewards/get_embedding_sim/std": 0.09278701990842819,
1023
+ "rewards/reward_num_unique_chars/mean": 0.11197916666666667,
1024
+ "rewards/reward_num_unique_chars/std": 0.30655037860075635,
1025
+ "step": 111
1026
+ },
1027
+ {
1028
+ "clip_ratio/high_max": 0.0,
1029
+ "clip_ratio/high_mean": 0.0,
1030
+ "clip_ratio/low_mean": 0.0,
1031
+ "clip_ratio/low_min": 0.0,
1032
+ "clip_ratio/region_mean": 0.0,
1033
+ "completions/clipped_ratio": 0.032118055555555546,
1034
+ "completions/max_length": 1024.0,
1035
+ "completions/max_terminated_length": 881.3333333333334,
1036
+ "completions/mean_length": 185.73351542154947,
1037
+ "completions/mean_terminated_length": 157.97284952799478,
1038
+ "completions/min_length": 8.333333333333334,
1039
+ "completions/min_terminated_length": 8.333333333333334,
1040
+ "epoch": 1.725897920604915,
1041
+ "grad_norm": 0.07077532261610031,
1042
+ "kl": 0.07100423177083333,
1043
+ "learning_rate": 1e-06,
1044
+ "loss": 0.0255,
1045
+ "num_tokens": 31578315.0,
1046
+ "reward": 0.6285200913747152,
1047
+ "reward_std": 0.2933768729368846,
1048
+ "rewards/get_embedding_sim/mean": 0.5260895093282064,
1049
+ "rewards/get_embedding_sim/std": 0.10419273873170216,
1050
+ "rewards/reward_num_unique_chars/mean": 0.10243055472771327,
1051
+ "rewards/reward_num_unique_chars/std": 0.30191460251808167,
1052
+ "step": 114
1053
+ },
1054
+ {
1055
+ "clip_ratio/high_max": 0.0,
1056
+ "clip_ratio/high_mean": 0.0,
1057
+ "clip_ratio/low_mean": 0.0,
1058
+ "clip_ratio/low_min": 0.0,
1059
+ "clip_ratio/region_mean": 0.0,
1060
+ "completions/clipped_ratio": 0.035590277777777755,
1061
+ "completions/max_length": 1024.0,
1062
+ "completions/max_terminated_length": 998.3333333333334,
1063
+ "completions/mean_length": 197.5555623372396,
1064
+ "completions/mean_terminated_length": 167.07290649414062,
1065
+ "completions/min_length": 7.333333333333333,
1066
+ "completions/min_terminated_length": 7.333333333333333,
1067
+ "epoch": 1.7712665406427222,
1068
+ "grad_norm": 0.07132314145565033,
1069
+ "kl": 0.07155863444010417,
1070
+ "learning_rate": 1e-06,
1071
+ "loss": 0.0289,
1072
+ "num_tokens": 32370091.0,
1073
+ "reward": 0.6605067054430643,
1074
+ "reward_std": 0.3198150396347046,
1075
+ "rewards/get_embedding_sim/mean": 0.5276941855748495,
1076
+ "rewards/get_embedding_sim/std": 0.09764280170202255,
1077
+ "rewards/reward_num_unique_chars/mean": 0.13281250248352686,
1078
+ "rewards/reward_num_unique_chars/std": 0.3356940845648448,
1079
+ "step": 117
1080
+ },
1081
+ {
1082
+ "clip_ratio/high_max": 0.0,
1083
+ "clip_ratio/high_mean": 0.0,
1084
+ "clip_ratio/low_mean": 0.0,
1085
+ "clip_ratio/low_min": 0.0,
1086
+ "clip_ratio/region_mean": 0.0,
1087
+ "completions/clipped_ratio": 0.03819444444444442,
1088
+ "completions/max_length": 1024.0,
1089
+ "completions/max_terminated_length": 925.3333333333334,
1090
+ "completions/mean_length": 205.5260467529297,
1091
+ "completions/mean_terminated_length": 172.99127197265625,
1092
+ "completions/min_length": 7.333333333333333,
1093
+ "completions/min_terminated_length": 7.333333333333333,
1094
+ "epoch": 1.8166351606805293,
1095
+ "grad_norm": 0.07695771753787994,
1096
+ "kl": 0.079559326171875,
1097
+ "learning_rate": 1e-06,
1098
+ "loss": 0.0285,
1099
+ "num_tokens": 33183529.0,
1100
+ "reward": 0.6505021651585897,
1101
+ "reward_std": 0.28806476791699726,
1102
+ "rewards/get_embedding_sim/mean": 0.5255021254221598,
1103
+ "rewards/get_embedding_sim/std": 0.10448584208885829,
1104
+ "rewards/reward_num_unique_chars/mean": 0.12499999751647313,
1105
+ "rewards/reward_num_unique_chars/std": 0.3297826250394185,
1106
+ "step": 120
1107
+ },
1108
+ {
1109
+ "clip_ratio/high_max": 0.0,
1110
+ "clip_ratio/high_mean": 0.0,
1111
+ "clip_ratio/low_mean": 0.0,
1112
+ "clip_ratio/low_min": 0.0,
1113
+ "clip_ratio/region_mean": 0.0,
1114
+ "completions/clipped_ratio": 0.03125,
1115
+ "completions/max_length": 1024.0,
1116
+ "completions/max_terminated_length": 956.0,
1117
+ "completions/mean_length": 187.78907267252603,
1118
+ "completions/mean_terminated_length": 160.96214803059897,
1119
+ "completions/min_length": 7.333333333333333,
1120
+ "completions/min_terminated_length": 7.333333333333333,
1121
+ "epoch": 1.8620037807183365,
1122
+ "grad_norm": 0.10003960132598877,
1123
+ "kl": 0.10397847493489583,
1124
+ "learning_rate": 1e-06,
1125
+ "loss": 0.0332,
1126
+ "num_tokens": 33979270.0,
1127
+ "reward": 0.702047864596049,
1128
+ "reward_std": 0.2998199959595998,
1129
+ "rewards/get_embedding_sim/mean": 0.5353811780611674,
1130
+ "rewards/get_embedding_sim/std": 0.1009945347905159,
1131
+ "rewards/reward_num_unique_chars/mean": 0.16666666915019354,
1132
+ "rewards/reward_num_unique_chars/std": 0.3635033369064331,
1133
+ "step": 123
1134
+ },
1135
+ {
1136
+ "clip_ratio/high_max": 0.0,
1137
+ "clip_ratio/high_mean": 0.0,
1138
+ "clip_ratio/low_mean": 0.0,
1139
+ "clip_ratio/low_min": 0.0,
1140
+ "clip_ratio/region_mean": 0.0,
1141
+ "completions/clipped_ratio": 0.0390625,
1142
+ "completions/max_length": 1024.0,
1143
+ "completions/max_terminated_length": 961.0,
1144
+ "completions/mean_length": 201.6701456705729,
1145
+ "completions/mean_terminated_length": 168.43896484375,
1146
+ "completions/min_length": 6.333333333333333,
1147
+ "completions/min_terminated_length": 6.333333333333333,
1148
+ "epoch": 1.9073724007561437,
1149
+ "grad_norm": 0.1418294459581375,
1150
+ "kl": 0.08981831868489583,
1151
+ "learning_rate": 1e-06,
1152
+ "loss": 0.0311,
1153
+ "num_tokens": 34790042.0,
1154
+ "reward": 0.6395866274833679,
1155
+ "reward_std": 0.278631071249644,
1156
+ "rewards/get_embedding_sim/mean": 0.5371560255686442,
1157
+ "rewards/get_embedding_sim/std": 0.10253078490495682,
1158
+ "rewards/reward_num_unique_chars/mean": 0.10243055721124013,
1159
+ "rewards/reward_num_unique_chars/std": 0.3033109207948049,
1160
+ "step": 126
1161
+ },
1162
+ {
1163
+ "clip_ratio/high_max": 0.0,
1164
+ "clip_ratio/high_mean": 0.0,
1165
+ "clip_ratio/low_mean": 0.0,
1166
+ "clip_ratio/low_min": 0.0,
1167
+ "clip_ratio/region_mean": 0.0,
1168
+ "completions/clipped_ratio": 0.020833333333333297,
1169
+ "completions/max_length": 1024.0,
1170
+ "completions/max_terminated_length": 933.6666666666666,
1171
+ "completions/mean_length": 165.38021341959634,
1172
+ "completions/mean_terminated_length": 147.11800384521484,
1173
+ "completions/min_length": 6.333333333333333,
1174
+ "completions/min_terminated_length": 6.333333333333333,
1175
+ "epoch": 1.9527410207939508,
1176
+ "grad_norm": 0.085059255361557,
1177
+ "kl": 0.09361775716145833,
1178
+ "learning_rate": 1e-06,
1179
+ "loss": 0.0241,
1180
+ "num_tokens": 35555504.0,
1181
+ "reward": 0.7251607775688171,
1182
+ "reward_std": 0.3248043159643809,
1183
+ "rewards/get_embedding_sim/mean": 0.5359246134757996,
1184
+ "rewards/get_embedding_sim/std": 0.10831368962923686,
1185
+ "rewards/reward_num_unique_chars/mean": 0.18923610945542654,
1186
+ "rewards/reward_num_unique_chars/std": 0.38598161935806274,
1187
+ "step": 129
1188
+ },
1189
+ {
1190
+ "clip_ratio/high_max": 0.0,
1191
+ "clip_ratio/high_mean": 0.0,
1192
+ "clip_ratio/low_mean": 0.0,
1193
+ "clip_ratio/low_min": 0.0,
1194
+ "clip_ratio/region_mean": 0.0,
1195
+ "completions/clipped_ratio": 0.051843869731800774,
1196
+ "completions/max_length": 1024.0,
1197
+ "completions/max_terminated_length": 949.6666666666666,
1198
+ "completions/mean_length": 218.2733408610026,
1199
+ "completions/mean_terminated_length": 174.35783894856772,
1200
+ "completions/min_length": 5.333333333333333,
1201
+ "completions/min_terminated_length": 5.333333333333333,
1202
+ "epoch": 1.998109640831758,
1203
+ "grad_norm": 0.15158401429653168,
1204
+ "kl": 0.09020487467447917,
1205
+ "learning_rate": 1e-06,
1206
+ "loss": 0.0421,
1207
+ "num_tokens": 36367765.0,
1208
+ "reward": 0.6982676188151041,
1209
+ "reward_std": 0.3466052810351054,
1210
+ "rewards/get_embedding_sim/mean": 0.5420175790786743,
1211
+ "rewards/get_embedding_sim/std": 0.09902476519346237,
1212
+ "rewards/reward_num_unique_chars/mean": 0.15625,
1213
+ "rewards/reward_num_unique_chars/std": 0.3612334032853444,
1214
+ "step": 132
1215
+ },
1216
+ {
1217
+ "clip_ratio/high_max": 0.0,
1218
+ "clip_ratio/high_mean": 0.0,
1219
+ "clip_ratio/low_mean": 0.0,
1220
+ "clip_ratio/low_min": 0.0,
1221
+ "clip_ratio/region_mean": 0.0,
1222
+ "completions/clipped_ratio": 0.03472222222222221,
1223
+ "completions/max_length": 1024.0,
1224
+ "completions/max_terminated_length": 948.0,
1225
+ "completions/mean_length": 176.51909891764322,
1226
+ "completions/mean_terminated_length": 146.023562113444,
1227
+ "completions/min_length": 6.333333333333333,
1228
+ "completions/min_terminated_length": 6.333333333333333,
1229
+ "epoch": 2.045368620037807,
1230
+ "grad_norm": 0.08893448859453201,
1231
+ "kl": 0.096466064453125,
1232
+ "learning_rate": 1e-06,
1233
+ "loss": 0.0402,
1234
+ "num_tokens": 37147067.0,
1235
+ "reward": 0.7173450986544291,
1236
+ "reward_std": 0.35685937603314716,
1237
+ "rewards/get_embedding_sim/mean": 0.5341853896776835,
1238
+ "rewards/get_embedding_sim/std": 0.1000617394844691,
1239
+ "rewards/reward_num_unique_chars/mean": 0.1831597238779068,
1240
+ "rewards/reward_num_unique_chars/std": 0.3842338224252065,
1241
+ "step": 135
1242
+ },
1243
+ {
1244
+ "clip_ratio/high_max": 0.0,
1245
+ "clip_ratio/high_mean": 0.0,
1246
+ "clip_ratio/low_mean": 0.0,
1247
+ "clip_ratio/low_min": 0.0,
1248
+ "clip_ratio/region_mean": 0.0,
1249
+ "completions/clipped_ratio": 0.041666666666666664,
1250
+ "completions/max_length": 1024.0,
1251
+ "completions/max_terminated_length": 879.0,
1252
+ "completions/mean_length": 208.60938008626303,
1253
+ "completions/mean_terminated_length": 173.26571655273438,
1254
+ "completions/min_length": 7.0,
1255
+ "completions/min_terminated_length": 7.0,
1256
+ "epoch": 2.0907372400756143,
1257
+ "grad_norm": 0.12921324372291565,
1258
+ "kl": 0.09910074869791667,
1259
+ "learning_rate": 1e-06,
1260
+ "loss": 0.0475,
1261
+ "num_tokens": 37974473.0,
1262
+ "reward": 0.672684927781423,
1263
+ "reward_std": 0.34854390223821,
1264
+ "rewards/get_embedding_sim/mean": 0.5364001393318176,
1265
+ "rewards/get_embedding_sim/std": 0.10567483057578404,
1266
+ "rewards/reward_num_unique_chars/mean": 0.13628472139437994,
1267
+ "rewards/reward_num_unique_chars/std": 0.34236905972162884,
1268
+ "step": 138
1269
+ },
1270
+ {
1271
+ "clip_ratio/high_max": 0.0,
1272
+ "clip_ratio/high_mean": 0.0,
1273
+ "clip_ratio/low_mean": 0.0,
1274
+ "clip_ratio/low_min": 0.0,
1275
+ "clip_ratio/region_mean": 0.0,
1276
+ "completions/clipped_ratio": 0.021701388888888878,
1277
+ "completions/max_length": 1024.0,
1278
+ "completions/max_terminated_length": 956.0,
1279
+ "completions/mean_length": 167.10590616861978,
1280
+ "completions/mean_terminated_length": 148.0250244140625,
1281
+ "completions/min_length": 6.333333333333333,
1282
+ "completions/min_terminated_length": 6.333333333333333,
1283
+ "epoch": 2.1361058601134215,
1284
+ "grad_norm": 0.12040314823389053,
1285
+ "kl": 0.24815877278645834,
1286
+ "learning_rate": 1e-06,
1287
+ "loss": 0.0403,
1288
+ "num_tokens": 38741491.0,
1289
+ "reward": 0.6958853205045065,
1290
+ "reward_std": 0.3416078786055247,
1291
+ "rewards/get_embedding_sim/mean": 0.5396353205045065,
1292
+ "rewards/get_embedding_sim/std": 0.11144034812847774,
1293
+ "rewards/reward_num_unique_chars/mean": 0.15625000248352686,
1294
+ "rewards/reward_num_unique_chars/std": 0.3600207368532817,
1295
+ "step": 141
1296
+ },
1297
+ {
1298
+ "clip_ratio/high_max": 0.0,
1299
+ "clip_ratio/high_mean": 0.0,
1300
+ "clip_ratio/low_mean": 0.0,
1301
+ "clip_ratio/low_min": 0.0,
1302
+ "clip_ratio/region_mean": 0.0,
1303
+ "completions/clipped_ratio": 0.032986111111111084,
1304
+ "completions/max_length": 1024.0,
1305
+ "completions/max_terminated_length": 909.0,
1306
+ "completions/mean_length": 182.28211975097656,
1307
+ "completions/mean_terminated_length": 153.65155029296875,
1308
+ "completions/min_length": 6.0,
1309
+ "completions/min_terminated_length": 6.0,
1310
+ "epoch": 2.1814744801512287,
1311
+ "grad_norm": 0.08720903098583221,
1312
+ "kl": 0.11935933430989583,
1313
+ "learning_rate": 1e-06,
1314
+ "loss": 0.042,
1315
+ "num_tokens": 39531464.0,
1316
+ "reward": 0.7134884198506674,
1317
+ "reward_std": 0.36159368356068927,
1318
+ "rewards/get_embedding_sim/mean": 0.5424814422925314,
1319
+ "rewards/get_embedding_sim/std": 0.11029936373233795,
1320
+ "rewards/reward_num_unique_chars/mean": 0.17100694278875986,
1321
+ "rewards/reward_num_unique_chars/std": 0.37471526861190796,
1322
+ "step": 144
1323
+ },
1324
+ {
1325
+ "clip_ratio/high_max": 0.0,
1326
+ "clip_ratio/high_mean": 0.0,
1327
+ "clip_ratio/low_mean": 0.0,
1328
+ "clip_ratio/low_min": 0.0,
1329
+ "clip_ratio/region_mean": 0.0,
1330
+ "completions/clipped_ratio": 0.03125,
1331
+ "completions/max_length": 1024.0,
1332
+ "completions/max_terminated_length": 917.0,
1333
+ "completions/mean_length": 171.84375508626303,
1334
+ "completions/mean_terminated_length": 144.29528299967447,
1335
+ "completions/min_length": 8.0,
1336
+ "completions/min_terminated_length": 8.0,
1337
+ "epoch": 2.226843100189036,
1338
+ "grad_norm": 0.08887135237455368,
1339
+ "kl": 0.118194580078125,
1340
+ "learning_rate": 1e-06,
1341
+ "loss": 0.0381,
1342
+ "num_tokens": 40311428.0,
1343
+ "reward": 0.6788019339243571,
1344
+ "reward_std": 0.33359630902608234,
1345
+ "rewards/get_embedding_sim/mean": 0.5451213518778483,
1346
+ "rewards/get_embedding_sim/std": 0.10193872700134914,
1347
+ "rewards/reward_num_unique_chars/mean": 0.133680559694767,
1348
+ "rewards/reward_num_unique_chars/std": 0.34027015169461566,
1349
+ "step": 147
1350
+ },
1351
+ {
1352
+ "clip_ratio/high_max": 0.0,
1353
+ "clip_ratio/high_mean": 0.0,
1354
+ "clip_ratio/low_mean": 0.0,
1355
+ "clip_ratio/low_min": 0.0,
1356
+ "clip_ratio/region_mean": 0.0,
1357
+ "completions/clipped_ratio": 0.01909722222222221,
1358
+ "completions/max_length": 1024.0,
1359
+ "completions/max_terminated_length": 922.6666666666666,
1360
+ "completions/mean_length": 165.07205200195312,
1361
+ "completions/mean_terminated_length": 148.45321146647134,
1362
+ "completions/min_length": 6.0,
1363
+ "completions/min_terminated_length": 6.0,
1364
+ "epoch": 2.272211720226843,
1365
+ "grad_norm": 0.08689926564693451,
1366
+ "kl": 0.149566650390625,
1367
+ "learning_rate": 1e-06,
1368
+ "loss": 0.0324,
1369
+ "num_tokens": 41091415.0,
1370
+ "reward": 0.6884604295094808,
1371
+ "reward_std": 0.3447088996569316,
1372
+ "rewards/get_embedding_sim/mean": 0.5495714743932089,
1373
+ "rewards/get_embedding_sim/std": 0.10353380193312962,
1374
+ "rewards/reward_num_unique_chars/mean": 0.13888888557751974,
1375
+ "rewards/reward_num_unique_chars/std": 0.3459552029768626,
1376
+ "step": 150
1377
+ },
1378
+ {
1379
+ "epoch": 2.31758034026465,
1380
+ "grad_norm": 0.10476606339216232,
1381
+ "learning_rate": 1e-06,
1382
+ "loss": 0.0513,
1383
+ "step": 153
1384
+ },
1385
+ {
1386
+ "epoch": 2.31758034026465,
1387
+ "eval_clip_ratio/high_max": 0.0,
1388
+ "eval_clip_ratio/high_mean": 0.0,
1389
+ "eval_clip_ratio/low_mean": 0.0,
1390
+ "eval_clip_ratio/low_min": 0.0,
1391
+ "eval_clip_ratio/region_mean": 0.0,
1392
+ "eval_completions/clipped_ratio": 0.04687500000000001,
1393
+ "eval_completions/max_length": 856.4464285714286,
1394
+ "eval_completions/max_terminated_length": 614.625,
1395
+ "eval_completions/mean_length": 148.9296919277736,
1396
+ "eval_completions/mean_terminated_length": 106.54870585032872,
1397
+ "eval_completions/min_length": 12.107142857142858,
1398
+ "eval_completions/min_terminated_length": 12.107142857142858,
1399
+ "eval_kl": 0.15039280482700892,
1400
+ "eval_loss": 0.05131923779845238,
1401
+ "eval_num_tokens": 41858572.0,
1402
+ "eval_reward": 0.7319182710988181,
1403
+ "eval_reward_std": 0.39004063113991705,
1404
+ "eval_rewards/get_embedding_sim/mean": 0.5399539640971592,
1405
+ "eval_rewards/get_embedding_sim/std": 0.09657471527212433,
1406
+ "eval_rewards/reward_num_unique_chars/mean": 0.19196428627973156,
1407
+ "eval_rewards/reward_num_unique_chars/std": 0.34904111203338417,
1408
+ "eval_runtime": 1578.4274,
1409
+ "eval_samples_per_second": 0.035,
1410
+ "eval_steps_per_second": 0.001,
1411
+ "step": 153
1412
+ },
1413
+ {
1414
+ "clip_ratio/high_max": 0.0,
1415
+ "clip_ratio/high_mean": 0.0,
1416
+ "clip_ratio/low_mean": 0.0,
1417
+ "clip_ratio/low_min": 0.0,
1418
+ "clip_ratio/region_mean": 0.0,
1419
+ "completions/clipped_ratio": 0.022135416666666668,
1420
+ "completions/max_length": 1024.0,
1421
+ "completions/max_terminated_length": 918.8333333333334,
1422
+ "completions/mean_length": 154.00824991861978,
1423
+ "completions/mean_terminated_length": 134.3066151936849,
1424
+ "completions/min_length": 6.333333333333333,
1425
+ "completions/min_terminated_length": 6.333333333333333,
1426
+ "epoch": 2.3629489603024574,
1427
+ "grad_norm": 0.17861098051071167,
1428
+ "kl": 0.1991424560546875,
1429
+ "learning_rate": 1e-06,
1430
+ "loss": 0.0446,
1431
+ "num_tokens": 42603290.0,
1432
+ "reward": 0.7928757965564728,
1433
+ "reward_std": 0.39940689504146576,
1434
+ "rewards/get_embedding_sim/mean": 0.5420077045758566,
1435
+ "rewards/get_embedding_sim/std": 0.10503626987338066,
1436
+ "rewards/reward_num_unique_chars/mean": 0.2508680547277133,
1437
+ "rewards/reward_num_unique_chars/std": 0.43154530723889667,
1438
+ "step": 156
1439
+ },
1440
+ {
1441
+ "clip_ratio/high_max": 0.0,
1442
+ "clip_ratio/high_mean": 0.0,
1443
+ "clip_ratio/low_mean": 0.0,
1444
+ "clip_ratio/low_min": 0.0,
1445
+ "clip_ratio/region_mean": 0.0,
1446
+ "completions/clipped_ratio": 0.02083333333333337,
1447
+ "completions/max_length": 1024.0,
1448
+ "completions/max_terminated_length": 943.6666666666666,
1449
+ "completions/mean_length": 149.3498331705729,
1450
+ "completions/mean_terminated_length": 130.67583719889322,
1451
+ "completions/min_length": 6.0,
1452
+ "completions/min_terminated_length": 6.0,
1453
+ "epoch": 2.4083175803402646,
1454
+ "grad_norm": 0.0997217446565628,
1455
+ "kl": 0.176727294921875,
1456
+ "learning_rate": 1e-06,
1457
+ "loss": 0.0479,
1458
+ "num_tokens": 43362573.0,
1459
+ "reward": 0.7896133859952291,
1460
+ "reward_std": 0.37762073675791424,
1461
+ "rewards/get_embedding_sim/mean": 0.5604466795921326,
1462
+ "rewards/get_embedding_sim/std": 0.10085596889257431,
1463
+ "rewards/reward_num_unique_chars/mean": 0.22916666666666666,
1464
+ "rewards/reward_num_unique_chars/std": 0.417032649119695,
1465
+ "step": 159
1466
+ },
1467
+ {
1468
+ "clip_ratio/high_max": 0.0,
1469
+ "clip_ratio/high_mean": 0.0,
1470
+ "clip_ratio/low_mean": 0.0,
1471
+ "clip_ratio/low_min": 0.0,
1472
+ "clip_ratio/region_mean": 0.0,
1473
+ "completions/clipped_ratio": 0.01996527777777779,
1474
+ "completions/max_length": 1024.0,
1475
+ "completions/max_terminated_length": 966.0,
1476
+ "completions/mean_length": 133.52865091959634,
1477
+ "completions/mean_terminated_length": 115.48833719889323,
1478
+ "completions/min_length": 6.333333333333333,
1479
+ "completions/min_terminated_length": 6.333333333333333,
1480
+ "epoch": 2.4536862003780717,
1481
+ "grad_norm": 0.08974426239728928,
1482
+ "kl": 0.13869730631510416,
1483
+ "learning_rate": 1e-06,
1484
+ "loss": 0.0442,
1485
+ "num_tokens": 44099022.0,
1486
+ "reward": 0.8535909652709961,
1487
+ "reward_std": 0.42868249615033466,
1488
+ "rewards/get_embedding_sim/mean": 0.5332783659299215,
1489
+ "rewards/get_embedding_sim/std": 0.10329846044381459,
1490
+ "rewards/reward_num_unique_chars/mean": 0.3203125,
1491
+ "rewards/reward_num_unique_chars/std": 0.45679094394048053,
1492
+ "step": 162
1493
+ },
1494
+ {
1495
+ "clip_ratio/high_max": 0.0,
1496
+ "clip_ratio/high_mean": 0.0,
1497
+ "clip_ratio/low_mean": 0.0,
1498
+ "clip_ratio/low_min": 0.0,
1499
+ "clip_ratio/region_mean": 0.0,
1500
+ "completions/clipped_ratio": 0.026041666666666668,
1501
+ "completions/max_length": 1024.0,
1502
+ "completions/max_terminated_length": 908.0,
1503
+ "completions/mean_length": 141.3715337117513,
1504
+ "completions/mean_terminated_length": 117.76270294189453,
1505
+ "completions/min_length": 6.333333333333333,
1506
+ "completions/min_terminated_length": 6.333333333333333,
1507
+ "epoch": 2.499054820415879,
1508
+ "grad_norm": 0.10181669145822525,
1509
+ "kl": 0.23414103190104166,
1510
+ "learning_rate": 1e-06,
1511
+ "loss": 0.0402,
1512
+ "num_tokens": 44851706.0,
1513
+ "reward": 0.8000141382217407,
1514
+ "reward_std": 0.3941415250301361,
1515
+ "rewards/get_embedding_sim/mean": 0.5456738670667013,
1516
+ "rewards/get_embedding_sim/std": 0.10725356390078862,
1517
+ "rewards/reward_num_unique_chars/mean": 0.2543402810891469,
1518
+ "rewards/reward_num_unique_chars/std": 0.43460813164711,
1519
+ "step": 165
1520
+ },
1521
+ {
1522
+ "clip_ratio/high_max": 0.0,
1523
+ "clip_ratio/high_mean": 0.0,
1524
+ "clip_ratio/low_mean": 0.0,
1525
+ "clip_ratio/low_min": 0.0,
1526
+ "clip_ratio/region_mean": 0.0,
1527
+ "completions/clipped_ratio": 0.018229166666666703,
1528
+ "completions/max_length": 1024.0,
1529
+ "completions/max_terminated_length": 882.6666666666666,
1530
+ "completions/mean_length": 141.09028116861978,
1531
+ "completions/mean_terminated_length": 124.72643280029297,
1532
+ "completions/min_length": 6.666666666666667,
1533
+ "completions/min_terminated_length": 6.666666666666667,
1534
+ "epoch": 2.544423440453686,
1535
+ "grad_norm": 0.08525840193033218,
1536
+ "kl": 0.20921834309895834,
1537
+ "learning_rate": 1e-06,
1538
+ "loss": 0.0455,
1539
+ "num_tokens": 45604066.0,
1540
+ "reward": 0.7868956923484802,
1541
+ "reward_std": 0.40804105003674823,
1542
+ "rewards/get_embedding_sim/mean": 0.5299512147903442,
1543
+ "rewards/get_embedding_sim/std": 0.10723193486531575,
1544
+ "rewards/reward_num_unique_chars/mean": 0.2569444378217061,
1545
+ "rewards/reward_num_unique_chars/std": 0.42565350731213886,
1546
+ "step": 168
1547
+ },
1548
+ {
1549
+ "clip_ratio/high_max": 0.0,
1550
+ "clip_ratio/high_mean": 0.0,
1551
+ "clip_ratio/low_mean": 0.0,
1552
+ "clip_ratio/low_min": 0.0,
1553
+ "clip_ratio/region_mean": 0.0,
1554
+ "completions/clipped_ratio": 0.025173611111111122,
1555
+ "completions/max_length": 1024.0,
1556
+ "completions/max_terminated_length": 923.3333333333334,
1557
+ "completions/mean_length": 138.74913533528647,
1558
+ "completions/mean_terminated_length": 116.1558354695638,
1559
+ "completions/min_length": 6.333333333333333,
1560
+ "completions/min_terminated_length": 6.333333333333333,
1561
+ "epoch": 2.5897920604914932,
1562
+ "grad_norm": 0.6628166437149048,
1563
+ "kl": 0.317626953125,
1564
+ "learning_rate": 1e-06,
1565
+ "loss": 0.0491,
1566
+ "num_tokens": 46345857.0,
1567
+ "reward": 0.8313470085461935,
1568
+ "reward_std": 0.4129582444826762,
1569
+ "rewards/get_embedding_sim/mean": 0.5509650309880575,
1570
+ "rewards/get_embedding_sim/std": 0.09154053280750911,
1571
+ "rewards/reward_num_unique_chars/mean": 0.2803819427887599,
1572
+ "rewards/reward_num_unique_chars/std": 0.4417712489763896,
1573
+ "step": 171
1574
+ },
1575
+ {
1576
+ "clip_ratio/high_max": 0.0,
1577
+ "clip_ratio/high_mean": 0.0,
1578
+ "clip_ratio/low_mean": 0.0,
1579
+ "clip_ratio/low_min": 0.0,
1580
+ "clip_ratio/region_mean": 0.0,
1581
+ "completions/clipped_ratio": 0.01128472222222221,
1582
+ "completions/max_length": 1024.0,
1583
+ "completions/max_terminated_length": 772.6666666666666,
1584
+ "completions/mean_length": 111.97396087646484,
1585
+ "completions/mean_terminated_length": 101.59329223632812,
1586
+ "completions/min_length": 6.666666666666667,
1587
+ "completions/min_terminated_length": 6.666666666666667,
1588
+ "epoch": 2.6351606805293004,
1589
+ "grad_norm": 0.09945366531610489,
1590
+ "kl": 0.262237548828125,
1591
+ "learning_rate": 1e-06,
1592
+ "loss": 0.038,
1593
+ "num_tokens": 47054931.0,
1594
+ "reward": 0.8715664744377136,
1595
+ "reward_std": 0.4346109131971995,
1596
+ "rewards/get_embedding_sim/mean": 0.549517830212911,
1597
+ "rewards/get_embedding_sim/std": 0.11452717334032059,
1598
+ "rewards/reward_num_unique_chars/mean": 0.3220486094554265,
1599
+ "rewards/reward_num_unique_chars/std": 0.4634987811247508,
1600
+ "step": 174
1601
+ },
1602
+ {
1603
+ "clip_ratio/high_max": 0.0,
1604
+ "clip_ratio/high_mean": 0.0,
1605
+ "clip_ratio/low_mean": 0.0,
1606
+ "clip_ratio/low_min": 0.0,
1607
+ "clip_ratio/region_mean": 0.0,
1608
+ "completions/clipped_ratio": 0.033854166666666685,
1609
+ "completions/max_length": 1024.0,
1610
+ "completions/max_terminated_length": 918.0,
1611
+ "completions/mean_length": 155.64192962646484,
1612
+ "completions/mean_terminated_length": 125.11021041870117,
1613
+ "completions/min_length": 6.0,
1614
+ "completions/min_terminated_length": 6.0,
1615
+ "epoch": 2.6805293005671076,
1616
+ "grad_norm": 0.09938167780637741,
1617
+ "kl": 0.2503814697265625,
1618
+ "learning_rate": 1e-06,
1619
+ "loss": 0.054,
1620
+ "num_tokens": 47795091.0,
1621
+ "reward": 0.7676738500595093,
1622
+ "reward_std": 0.39470958709716797,
1623
+ "rewards/get_embedding_sim/mean": 0.5736633539199829,
1624
+ "rewards/get_embedding_sim/std": 0.09976038336753845,
1625
+ "rewards/reward_num_unique_chars/mean": 0.1940104141831398,
1626
+ "rewards/reward_num_unique_chars/std": 0.3958670049905777,
1627
+ "step": 177
1628
+ },
1629
+ {
1630
+ "clip_ratio/high_max": 0.0,
1631
+ "clip_ratio/high_mean": 0.0,
1632
+ "clip_ratio/low_mean": 0.0,
1633
+ "clip_ratio/low_min": 0.0,
1634
+ "clip_ratio/region_mean": 0.0,
1635
+ "completions/clipped_ratio": 0.017361111111111122,
1636
+ "completions/max_length": 1024.0,
1637
+ "completions/max_terminated_length": 878.6666666666666,
1638
+ "completions/mean_length": 116.89757283528645,
1639
+ "completions/mean_terminated_length": 100.84752400716145,
1640
+ "completions/min_length": 6.333333333333333,
1641
+ "completions/min_terminated_length": 6.333333333333333,
1642
+ "epoch": 2.7258979206049148,
1643
+ "grad_norm": 0.1425255984067917,
1644
+ "kl": 0.2775370279947917,
1645
+ "learning_rate": 1e-06,
1646
+ "loss": 0.0481,
1647
+ "num_tokens": 48511037.0,
1648
+ "reward": 0.863362193107605,
1649
+ "reward_std": 0.4587005575497945,
1650
+ "rewards/get_embedding_sim/mean": 0.5473899245262146,
1651
+ "rewards/get_embedding_sim/std": 0.09922760476668675,
1652
+ "rewards/reward_num_unique_chars/mean": 0.3159722288449605,
1653
+ "rewards/reward_num_unique_chars/std": 0.4650394419829051,
1654
+ "step": 180
1655
+ },
1656
+ {
1657
+ "clip_ratio/high_max": 0.0,
1658
+ "clip_ratio/high_mean": 0.0,
1659
+ "clip_ratio/low_mean": 0.0,
1660
+ "clip_ratio/low_min": 0.0,
1661
+ "clip_ratio/region_mean": 0.0,
1662
+ "completions/clipped_ratio": 0.014756944444444456,
1663
+ "completions/max_length": 1024.0,
1664
+ "completions/max_terminated_length": 891.3333333333334,
1665
+ "completions/mean_length": 102.27864837646484,
1666
+ "completions/mean_terminated_length": 88.46848042805989,
1667
+ "completions/min_length": 7.0,
1668
+ "completions/min_terminated_length": 7.0,
1669
+ "epoch": 2.7712665406427224,
1670
+ "grad_norm": 0.09843874722719193,
1671
+ "kl": 0.34393310546875,
1672
+ "learning_rate": 1e-06,
1673
+ "loss": 0.0436,
1674
+ "num_tokens": 49204478.0,
1675
+ "reward": 0.8661341269810995,
1676
+ "reward_std": 0.46143727501233417,
1677
+ "rewards/get_embedding_sim/mean": 0.5727312763532003,
1678
+ "rewards/get_embedding_sim/std": 0.11564485480388005,
1679
+ "rewards/reward_num_unique_chars/mean": 0.2934027711550395,
1680
+ "rewards/reward_num_unique_chars/std": 0.4531017243862152,
1681
+ "step": 183
1682
+ },
1683
+ {
1684
+ "clip_ratio/high_max": 0.0,
1685
+ "clip_ratio/high_mean": 0.0,
1686
+ "clip_ratio/low_mean": 0.0,
1687
+ "clip_ratio/low_min": 0.0,
1688
+ "clip_ratio/region_mean": 0.0,
1689
+ "completions/clipped_ratio": 0.01996527777777779,
1690
+ "completions/max_length": 1024.0,
1691
+ "completions/max_terminated_length": 754.6666666666666,
1692
+ "completions/mean_length": 122.11806233723958,
1693
+ "completions/mean_terminated_length": 103.76323954264323,
1694
+ "completions/min_length": 5.666666666666667,
1695
+ "completions/min_terminated_length": 5.666666666666667,
1696
+ "epoch": 2.816635160680529,
1697
+ "grad_norm": 0.15066391229629517,
1698
+ "kl": 0.3179728190104167,
1699
+ "learning_rate": 1e-06,
1700
+ "loss": 0.0582,
1701
+ "num_tokens": 49927110.0,
1702
+ "reward": 0.892190178235372,
1703
+ "reward_std": 0.4511215090751648,
1704
+ "rewards/get_embedding_sim/mean": 0.5527804295221964,
1705
+ "rewards/get_embedding_sim/std": 0.1083058441678683,
1706
+ "rewards/reward_num_unique_chars/mean": 0.3394097238779068,
1707
+ "rewards/reward_num_unique_chars/std": 0.46636247634887695,
1708
+ "step": 186
1709
+ },
1710
+ {
1711
+ "clip_ratio/high_max": 0.0,
1712
+ "clip_ratio/high_mean": 0.0,
1713
+ "clip_ratio/low_mean": 0.0,
1714
+ "clip_ratio/low_min": 0.0,
1715
+ "clip_ratio/region_mean": 0.0,
1716
+ "completions/clipped_ratio": 0.022569444444444458,
1717
+ "completions/max_length": 1024.0,
1718
+ "completions/max_terminated_length": 940.3333333333334,
1719
+ "completions/mean_length": 126.84115091959636,
1720
+ "completions/mean_terminated_length": 106.15006764729817,
1721
+ "completions/min_length": 7.333333333333333,
1722
+ "completions/min_terminated_length": 7.333333333333333,
1723
+ "epoch": 2.8620037807183367,
1724
+ "grad_norm": 2.990046739578247,
1725
+ "kl": 0.47100830078125,
1726
+ "learning_rate": 1e-06,
1727
+ "loss": 0.0551,
1728
+ "num_tokens": 50663055.0,
1729
+ "reward": 0.8623983860015869,
1730
+ "reward_std": 0.4631191889444987,
1731
+ "rewards/get_embedding_sim/mean": 0.5533705353736877,
1732
+ "rewards/get_embedding_sim/std": 0.11140244205792744,
1733
+ "rewards/reward_num_unique_chars/mean": 0.3090277810891469,
1734
+ "rewards/reward_num_unique_chars/std": 0.4615551829338074,
1735
+ "step": 189
1736
+ },
1737
+ {
1738
+ "clip_ratio/high_max": 0.0,
1739
+ "clip_ratio/high_mean": 0.0,
1740
+ "clip_ratio/low_mean": 0.0,
1741
+ "clip_ratio/low_min": 0.0,
1742
+ "clip_ratio/region_mean": 0.0,
1743
+ "completions/clipped_ratio": 0.01649305555555558,
1744
+ "completions/max_length": 1024.0,
1745
+ "completions/max_terminated_length": 891.0,
1746
+ "completions/mean_length": 111.4730936686198,
1747
+ "completions/mean_terminated_length": 96.25564575195312,
1748
+ "completions/min_length": 5.333333333333333,
1749
+ "completions/min_terminated_length": 5.333333333333333,
1750
+ "epoch": 2.9073724007561434,
1751
+ "grad_norm": 0.11676046997308731,
1752
+ "kl": 0.4471232096354167,
1753
+ "learning_rate": 1e-06,
1754
+ "loss": 0.0481,
1755
+ "num_tokens": 51373952.0,
1756
+ "reward": 0.9203431606292725,
1757
+ "reward_std": 0.47053369879722595,
1758
+ "rewards/get_embedding_sim/mean": 0.5444750587145487,
1759
+ "rewards/get_embedding_sim/std": 0.1073705404996872,
1760
+ "rewards/reward_num_unique_chars/mean": 0.3758680522441864,
1761
+ "rewards/reward_num_unique_chars/std": 0.4811862111091614,
1762
+ "step": 192
1763
+ },
1764
+ {
1765
+ "clip_ratio/high_max": 0.0,
1766
+ "clip_ratio/high_mean": 0.0,
1767
+ "clip_ratio/low_mean": 0.0,
1768
+ "clip_ratio/low_min": 0.0,
1769
+ "clip_ratio/region_mean": 0.0,
1770
+ "completions/clipped_ratio": 0.016493055555555542,
1771
+ "completions/max_length": 1024.0,
1772
+ "completions/max_terminated_length": 776.3333333333334,
1773
+ "completions/mean_length": 113.12673950195312,
1774
+ "completions/mean_terminated_length": 97.83474731445312,
1775
+ "completions/min_length": 8.666666666666666,
1776
+ "completions/min_terminated_length": 8.666666666666666,
1777
+ "epoch": 2.952741020793951,
1778
+ "grad_norm": 0.09854816645383835,
1779
+ "kl": 0.285675048828125,
1780
+ "learning_rate": 1e-06,
1781
+ "loss": 0.0465,
1782
+ "num_tokens": 52094098.0,
1783
+ "reward": 0.888769249121348,
1784
+ "reward_std": 0.46734312176704407,
1785
+ "rewards/get_embedding_sim/mean": 0.5519636472066244,
1786
+ "rewards/get_embedding_sim/std": 0.11934416989485423,
1787
+ "rewards/reward_num_unique_chars/mean": 0.3368055522441864,
1788
+ "rewards/reward_num_unique_chars/std": 0.4713793396949768,
1789
+ "step": 195
1790
+ },
1791
+ {
1792
+ "clip_ratio/high_max": 0.0,
1793
+ "clip_ratio/high_mean": 0.0,
1794
+ "clip_ratio/low_mean": 0.0,
1795
+ "clip_ratio/low_min": 0.0,
1796
+ "clip_ratio/region_mean": 0.0,
1797
+ "completions/clipped_ratio": 0.013888888888888876,
1798
+ "completions/max_length": 1024.0,
1799
+ "completions/max_terminated_length": 927.3333333333334,
1800
+ "completions/mean_length": 112.50087229410808,
1801
+ "completions/mean_terminated_length": 99.5953369140625,
1802
+ "completions/min_length": 7.0,
1803
+ "completions/min_terminated_length": 7.0,
1804
+ "epoch": 2.998109640831758,
1805
+ "grad_norm": 0.08575434237718582,
1806
+ "kl": 0.42242431640625,
1807
+ "learning_rate": 1e-06,
1808
+ "loss": 0.0494,
1809
+ "num_tokens": 52800707.0,
1810
+ "reward": 0.9310129086176554,
1811
+ "reward_std": 0.4663335382938385,
1812
+ "rewards/get_embedding_sim/mean": 0.5603530804316202,
1813
+ "rewards/get_embedding_sim/std": 0.10822075108687083,
1814
+ "rewards/reward_num_unique_chars/mean": 0.3706597288449605,
1815
+ "rewards/reward_num_unique_chars/std": 0.4820249378681183,
1816
+ "step": 198
1817
+ }
1818
+ ],
1819
+ "logging_steps": 3,
1820
+ "max_steps": 198,
1821
+ "num_input_tokens_seen": 52800707,
1822
+ "num_train_epochs": 3,
1823
+ "save_steps": 25,
1824
+ "stateful_callbacks": {
1825
+ "TrainerControl": {
1826
+ "args": {
1827
+ "should_epoch_stop": false,
1828
+ "should_evaluate": false,
1829
+ "should_log": false,
1830
+ "should_save": true,
1831
+ "should_training_stop": true
1832
+ },
1833
+ "attributes": {}
1834
+ }
1835
+ },
1836
+ "total_flos": 0.0,
1837
+ "train_batch_size": 8,
1838
+ "trial_name": null,
1839
+ "trial_params": null
1840
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0e5392c215500566e7a8d9555c9b76802dc16443b9b8ee6f2f9c208e70fe2fbc
3
+ size 8056
vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
zero_to_fp32.py ADDED
@@ -0,0 +1,760 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python
2
+
3
+ # Copyright (c) Microsoft Corporation.
4
+ # SPDX-License-Identifier: Apache-2.0
5
+
6
+ # DeepSpeed Team
7
+
8
+ # This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
9
+ # copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
10
+ # the future. Once extracted, the weights don't require DeepSpeed and can be used in any
11
+ # application.
12
+ #
13
+ # example:
14
+ # python zero_to_fp32.py . output_dir/
15
+ # or
16
+ # python zero_to_fp32.py . output_dir/ --safe_serialization
17
+
18
+ import argparse
19
+ import torch
20
+ import glob
21
+ import math
22
+ import os
23
+ import re
24
+ import gc
25
+ import json
26
+ import numpy as np
27
+ from tqdm import tqdm
28
+ from collections import OrderedDict
29
+ from dataclasses import dataclass
30
+
31
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
32
+ # DeepSpeed data structures it has to be available in the current python environment.
33
+ from deepspeed.utils import logger
34
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
35
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
36
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
37
+
38
+
39
+ @dataclass
40
+ class zero_model_state:
41
+ buffers: dict()
42
+ param_shapes: dict()
43
+ shared_params: list
44
+ ds_version: int
45
+ frozen_param_shapes: dict()
46
+ frozen_param_fragments: dict()
47
+
48
+
49
+ debug = 0
50
+
51
+ # load to cpu
52
+ device = torch.device('cpu')
53
+
54
+
55
+ def atoi(text):
56
+ return int(text) if text.isdigit() else text
57
+
58
+
59
+ def natural_keys(text):
60
+ '''
61
+ alist.sort(key=natural_keys) sorts in human order
62
+ http://nedbatchelder.com/blog/200712/human_sorting.html
63
+ (See Toothy's implementation in the comments)
64
+ '''
65
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
66
+
67
+
68
+ def get_model_state_file(checkpoint_dir, zero_stage):
69
+ if not os.path.isdir(checkpoint_dir):
70
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
71
+
72
+ # there should be only one file
73
+ if zero_stage <= 2:
74
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
75
+ elif zero_stage == 3:
76
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
77
+
78
+ if not os.path.exists(file):
79
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
80
+
81
+ return file
82
+
83
+
84
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
85
+ # XXX: need to test that this simple glob rule works for multi-node setup too
86
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
87
+
88
+ if len(ckpt_files) == 0:
89
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
90
+
91
+ return ckpt_files
92
+
93
+
94
+ def get_optim_files(checkpoint_dir):
95
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
96
+
97
+
98
+ def get_model_state_files(checkpoint_dir):
99
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
100
+
101
+
102
+ def parse_model_states(files):
103
+ zero_model_states = []
104
+ for file in files:
105
+ state_dict = torch.load(file, map_location=device, weights_only=False)
106
+
107
+ if BUFFER_NAMES not in state_dict:
108
+ raise ValueError(f"{file} is not a model state checkpoint")
109
+ buffer_names = state_dict[BUFFER_NAMES]
110
+ if debug:
111
+ print("Found buffers:", buffer_names)
112
+
113
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
114
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
115
+ param_shapes = state_dict[PARAM_SHAPES]
116
+
117
+ # collect parameters that are included in param_shapes
118
+ param_names = []
119
+ for s in param_shapes:
120
+ for name in s.keys():
121
+ param_names.append(name)
122
+
123
+ # update with frozen parameters
124
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
125
+ if frozen_param_shapes is not None:
126
+ if debug:
127
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
128
+ param_names += list(frozen_param_shapes.keys())
129
+
130
+ # handle shared params
131
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
132
+
133
+ ds_version = state_dict.get(DS_VERSION, None)
134
+
135
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
136
+
137
+ z_model_state = zero_model_state(buffers=buffers,
138
+ param_shapes=param_shapes,
139
+ shared_params=shared_params,
140
+ ds_version=ds_version,
141
+ frozen_param_shapes=frozen_param_shapes,
142
+ frozen_param_fragments=frozen_param_fragments)
143
+ zero_model_states.append(z_model_state)
144
+
145
+ return zero_model_states
146
+
147
+
148
+ def parse_optim_states(files, ds_checkpoint_dir):
149
+ total_files = len(files)
150
+ state_dicts = []
151
+ for f in tqdm(files, desc='Loading checkpoint shards'):
152
+ state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
153
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
154
+ # and also handle the case where it was already removed by another helper script
155
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
156
+ state_dicts.append(state_dict)
157
+
158
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
159
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
160
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
161
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
162
+
163
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
164
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
165
+ # use the max of the partition_count to get the dp world_size.
166
+
167
+ if type(world_size) is list:
168
+ world_size = max(world_size)
169
+
170
+ if world_size != total_files:
171
+ raise ValueError(
172
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
173
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
174
+ )
175
+
176
+ # the groups are named differently in each stage
177
+ if zero_stage <= 2:
178
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
179
+ elif zero_stage == 3:
180
+ fp32_groups_key = FP32_FLAT_GROUPS
181
+ else:
182
+ raise ValueError(f"unknown zero stage {zero_stage}")
183
+
184
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
185
+ return zero_stage, world_size, fp32_flat_groups
186
+
187
+
188
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
189
+ """
190
+ Returns fp32 state_dict reconstructed from ds checkpoint
191
+
192
+ Args:
193
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
194
+
195
+ """
196
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
197
+
198
+ optim_files = get_optim_files(ds_checkpoint_dir)
199
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
200
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
201
+
202
+ model_files = get_model_state_files(ds_checkpoint_dir)
203
+
204
+ zero_model_states = parse_model_states(model_files)
205
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
206
+
207
+ if zero_stage <= 2:
208
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
209
+ exclude_frozen_parameters)
210
+ elif zero_stage == 3:
211
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
212
+ exclude_frozen_parameters)
213
+
214
+
215
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
216
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
217
+ return
218
+
219
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
220
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
221
+
222
+ if debug:
223
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
224
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
225
+
226
+ wanted_params = len(frozen_param_shapes)
227
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
228
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
229
+ print(f'Frozen params: Have {avail_numel} numels to process.')
230
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
231
+
232
+ total_params = 0
233
+ total_numel = 0
234
+ for name, shape in frozen_param_shapes.items():
235
+ total_params += 1
236
+ unpartitioned_numel = shape.numel()
237
+ total_numel += unpartitioned_numel
238
+
239
+ state_dict[name] = frozen_param_fragments[name]
240
+
241
+ if debug:
242
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
243
+
244
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
245
+
246
+
247
+ def _has_callable(obj, fn):
248
+ attr = getattr(obj, fn, None)
249
+ return callable(attr)
250
+
251
+
252
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
253
+ param_shapes = zero_model_states[0].param_shapes
254
+
255
+ # Reconstruction protocol:
256
+ #
257
+ # XXX: document this
258
+
259
+ if debug:
260
+ for i in range(world_size):
261
+ for j in range(len(fp32_flat_groups[0])):
262
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
263
+
264
+ # XXX: memory usage doubles here (zero2)
265
+ num_param_groups = len(fp32_flat_groups[0])
266
+ merged_single_partition_of_fp32_groups = []
267
+ for i in range(num_param_groups):
268
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
269
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
270
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
271
+ avail_numel = sum(
272
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
273
+
274
+ if debug:
275
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
276
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
277
+ # not asserting if there is a mismatch due to possible padding
278
+ print(f"Have {avail_numel} numels to process.")
279
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
280
+
281
+ # params
282
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
283
+ # out-of-core computing solution
284
+ total_numel = 0
285
+ total_params = 0
286
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
287
+ offset = 0
288
+ avail_numel = full_single_fp32_vector.numel()
289
+ for name, shape in shapes.items():
290
+
291
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
292
+ total_numel += unpartitioned_numel
293
+ total_params += 1
294
+
295
+ if debug:
296
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
297
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
298
+ offset += unpartitioned_numel
299
+
300
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
301
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
302
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
303
+ # live optimizer object, so we are checking that the numbers are within the right range
304
+ align_to = 2 * world_size
305
+
306
+ def zero2_align(x):
307
+ return align_to * math.ceil(x / align_to)
308
+
309
+ if debug:
310
+ print(f"original offset={offset}, avail_numel={avail_numel}")
311
+
312
+ offset = zero2_align(offset)
313
+ avail_numel = zero2_align(avail_numel)
314
+
315
+ if debug:
316
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
317
+
318
+ # Sanity check
319
+ if offset != avail_numel:
320
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
321
+
322
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
323
+
324
+
325
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
326
+ exclude_frozen_parameters):
327
+ state_dict = OrderedDict()
328
+
329
+ # buffers
330
+ buffers = zero_model_states[0].buffers
331
+ state_dict.update(buffers)
332
+ if debug:
333
+ print(f"added {len(buffers)} buffers")
334
+
335
+ if not exclude_frozen_parameters:
336
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
337
+
338
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
339
+
340
+ # recover shared parameters
341
+ for pair in zero_model_states[0].shared_params:
342
+ if pair[1] in state_dict:
343
+ state_dict[pair[0]] = state_dict[pair[1]]
344
+
345
+ return state_dict
346
+
347
+
348
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
349
+ remainder = unpartitioned_numel % world_size
350
+ padding_numel = (world_size - remainder) if remainder else 0
351
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
352
+ return partitioned_numel, padding_numel
353
+
354
+
355
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
356
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
357
+ return
358
+
359
+ if debug:
360
+ for i in range(world_size):
361
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
362
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
363
+
364
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
365
+ wanted_params = len(frozen_param_shapes)
366
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
367
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
368
+ print(f'Frozen params: Have {avail_numel} numels to process.')
369
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
370
+
371
+ total_params = 0
372
+ total_numel = 0
373
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
374
+ total_params += 1
375
+ unpartitioned_numel = shape.numel()
376
+ total_numel += unpartitioned_numel
377
+
378
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
379
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
380
+
381
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
382
+
383
+ if debug:
384
+ print(
385
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
386
+ )
387
+
388
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
389
+
390
+
391
+ class GatheredTensor:
392
+ """
393
+ A pseudo tensor that collects partitioned weights.
394
+ It is more memory efficient when there are multiple groups.
395
+ """
396
+
397
+ def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
398
+ self.flat_groups = flat_groups
399
+ self.flat_groups_offset = flat_groups_offset
400
+ self.offset = offset
401
+ self.partitioned_numel = partitioned_numel
402
+ self.shape = shape
403
+ self.dtype = self.flat_groups[0][0].dtype
404
+
405
+ def contiguous(self):
406
+ """
407
+ Merge partitioned weights from flat_groups into a single tensor.
408
+ """
409
+ end_idx = self.offset + self.partitioned_numel
410
+ world_size = len(self.flat_groups)
411
+ pad_flat_param_chunks = []
412
+
413
+ for rank_i in range(world_size):
414
+ # for each rank, we need to collect weights from related group/groups
415
+ flat_groups_at_rank_i = self.flat_groups[rank_i]
416
+ start_group_id = None
417
+ end_group_id = None
418
+ for group_id in range(len(self.flat_groups_offset)):
419
+ if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
420
+ start_group_id = group_id
421
+ if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
422
+ end_group_id = group_id
423
+ break
424
+ # collect weights from related group/groups
425
+ for group_id in range(start_group_id, end_group_id + 1):
426
+ flat_tensor = flat_groups_at_rank_i[group_id]
427
+ start_offset = self.offset - self.flat_groups_offset[group_id]
428
+ end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
429
+ pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
430
+
431
+ # collect weights from all ranks
432
+ pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
433
+ param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
434
+ return param
435
+
436
+
437
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
438
+ param_shapes = zero_model_states[0].param_shapes
439
+ avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
440
+
441
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
442
+ # param, re-consolidating each param, while dealing with padding if any
443
+
444
+ # merge list of dicts, preserving order
445
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
446
+
447
+ if debug:
448
+ for i in range(world_size):
449
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
450
+
451
+ wanted_params = len(param_shapes)
452
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
453
+ # not asserting if there is a mismatch due to possible padding
454
+ avail_numel = fp32_flat_groups[0].numel() * world_size
455
+ print(f"Trainable params: Have {avail_numel} numels to process.")
456
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
457
+
458
+ # params
459
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
460
+ # out-of-core computing solution
461
+ offset = 0
462
+ total_numel = 0
463
+ total_params = 0
464
+ flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
465
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
466
+ unpartitioned_numel = shape.numel()
467
+ total_numel += unpartitioned_numel
468
+ total_params += 1
469
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
470
+
471
+ if debug:
472
+ print(
473
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
474
+ )
475
+
476
+ # memory efficient tensor
477
+ tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
478
+ state_dict[name] = tensor
479
+ offset += partitioned_numel
480
+
481
+ offset *= world_size
482
+
483
+ # Sanity check
484
+ if offset != avail_numel:
485
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
486
+
487
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
488
+
489
+
490
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
491
+ exclude_frozen_parameters):
492
+ state_dict = OrderedDict()
493
+
494
+ # buffers
495
+ buffers = zero_model_states[0].buffers
496
+ state_dict.update(buffers)
497
+ if debug:
498
+ print(f"added {len(buffers)} buffers")
499
+
500
+ if not exclude_frozen_parameters:
501
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
502
+
503
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
504
+
505
+ # recover shared parameters
506
+ for pair in zero_model_states[0].shared_params:
507
+ if pair[1] in state_dict:
508
+ state_dict[pair[0]] = state_dict[pair[1]]
509
+
510
+ return state_dict
511
+
512
+
513
+ def to_torch_tensor(state_dict, return_empty_tensor=False):
514
+ """
515
+ Convert state_dict of GatheredTensor to torch tensor
516
+ """
517
+ torch_state_dict = {}
518
+ converted_tensors = {}
519
+ for name, tensor in state_dict.items():
520
+ tensor_id = id(tensor)
521
+ if tensor_id in converted_tensors: # shared tensors
522
+ shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
523
+ torch_state_dict[name] = shared_tensor
524
+ else:
525
+ converted_tensors[tensor_id] = name
526
+ if return_empty_tensor:
527
+ torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
528
+ else:
529
+ torch_state_dict[name] = tensor.contiguous()
530
+ return torch_state_dict
531
+
532
+
533
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
534
+ tag=None,
535
+ exclude_frozen_parameters=False,
536
+ lazy_mode=False):
537
+ """
538
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
539
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
540
+ via a model hub.
541
+
542
+ Args:
543
+ - ``checkpoint_dir``: path to the desired checkpoint folder
544
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
545
+ - ``exclude_frozen_parameters``: exclude frozen parameters
546
+ - ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
547
+ Convert the pesduo tensor to torch tensor by ``.contiguous()``
548
+
549
+ Returns:
550
+ - pytorch ``state_dict``
551
+
552
+ A typical usage might be ::
553
+
554
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
555
+ # do the training and checkpoint saving
556
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
557
+ model = model.cpu() # move to cpu
558
+ model.load_state_dict(state_dict)
559
+ # submit to model hub or save the model to share with others
560
+
561
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
562
+ application. i.e. you will need to re-initialize the deepspeed engine, since
563
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
564
+
565
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
566
+
567
+ Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
568
+ You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
569
+ the checkpoint. Or you can load state_dict in lazy mode ::
570
+
571
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
572
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
573
+ for name, lazy_tensor in state_dict.item():
574
+ tensor = lazy_tensor.contiguous() # to cpu
575
+ print(name, tensor)
576
+ # del tensor to release memory if it no longer in use
577
+ """
578
+ if tag is None:
579
+ latest_path = os.path.join(checkpoint_dir, 'latest')
580
+ if os.path.isfile(latest_path):
581
+ with open(latest_path, 'r') as fd:
582
+ tag = fd.read().strip()
583
+ else:
584
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
585
+
586
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
587
+
588
+ if not os.path.isdir(ds_checkpoint_dir):
589
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
590
+
591
+ state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
592
+ if lazy_mode:
593
+ return state_dict
594
+ else:
595
+ return to_torch_tensor(state_dict)
596
+
597
+
598
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
599
+ output_dir,
600
+ max_shard_size="5GB",
601
+ safe_serialization=False,
602
+ tag=None,
603
+ exclude_frozen_parameters=False):
604
+ """
605
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
606
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
607
+
608
+ Args:
609
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
610
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
611
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
612
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
613
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
614
+ - ``exclude_frozen_parameters``: exclude frozen parameters
615
+ """
616
+
617
+ # Dependency pre-check
618
+ if safe_serialization:
619
+ try:
620
+ from safetensors.torch import save_file
621
+ except ImportError:
622
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
623
+ raise
624
+ if max_shard_size is not None:
625
+ try:
626
+ from huggingface_hub import split_torch_state_dict_into_shards
627
+ except ImportError:
628
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
629
+ raise
630
+
631
+ # Convert zero checkpoint to state_dict
632
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
633
+ tag,
634
+ exclude_frozen_parameters,
635
+ lazy_mode=True)
636
+
637
+ # Shard the model if it is too big.
638
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
639
+ if max_shard_size is not None:
640
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
641
+ # an memory-efficient approach for sharding
642
+ empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
643
+ state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
644
+ filename_pattern=filename_pattern,
645
+ max_shard_size=max_shard_size)
646
+ else:
647
+ from collections import namedtuple
648
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
649
+ state_dict_split = StateDictSplit(is_sharded=False,
650
+ filename_to_tensors={weights_name: list(state_dict.keys())})
651
+
652
+ # Save the model by shard
653
+ os.makedirs(output_dir, exist_ok=True)
654
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
655
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
656
+ shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
657
+ shard_state_dict = to_torch_tensor(shard_state_dict)
658
+ output_path = os.path.join(output_dir, shard_file)
659
+ if safe_serialization:
660
+ save_file(shard_state_dict, output_path, metadata={"format": "pt"})
661
+ else:
662
+ torch.save(shard_state_dict, output_path)
663
+ # release the memory of current shard
664
+ for tensor_name in list(shard_state_dict.keys()):
665
+ del state_dict[tensor_name]
666
+ del shard_state_dict[tensor_name]
667
+ del shard_state_dict
668
+ gc.collect()
669
+
670
+ # Save index if sharded
671
+ if state_dict_split.is_sharded:
672
+ index = {
673
+ "metadata": state_dict_split.metadata,
674
+ "weight_map": state_dict_split.tensor_to_filename,
675
+ }
676
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
677
+ save_index_file = os.path.join(output_dir, save_index_file)
678
+ with open(save_index_file, "w", encoding="utf-8") as f:
679
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
680
+ f.write(content)
681
+
682
+
683
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
684
+ """
685
+ 1. Put the provided model to cpu
686
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
687
+ 3. Load it into the provided model
688
+
689
+ Args:
690
+ - ``model``: the model object to update
691
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
692
+ - ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
693
+
694
+ Returns:
695
+ - ``model`: modified model
696
+
697
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
698
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
699
+ conveniently placed for you in the checkpoint folder.
700
+
701
+ A typical usage might be ::
702
+
703
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
704
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
705
+ # submit to model hub or save the model to share with others
706
+
707
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
708
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
709
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
710
+
711
+ """
712
+ logger.info(f"Extracting fp32 weights")
713
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
714
+
715
+ logger.info(f"Overwriting model with fp32 weights")
716
+ model = model.cpu()
717
+ model.load_state_dict(state_dict, strict=False)
718
+
719
+ return model
720
+
721
+
722
+ if __name__ == "__main__":
723
+ parser = argparse.ArgumentParser()
724
+ parser.add_argument("checkpoint_dir",
725
+ type=str,
726
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
727
+ parser.add_argument("output_dir",
728
+ type=str,
729
+ help="directory to the pytorch fp32 state_dict output files"
730
+ "(e.g. path/checkpoint-12-output/)")
731
+ parser.add_argument(
732
+ "--max_shard_size",
733
+ type=str,
734
+ default="5GB",
735
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
736
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
737
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
738
+ "without CPU OOM issues.")
739
+ parser.add_argument(
740
+ "--safe_serialization",
741
+ default=False,
742
+ action='store_true',
743
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
744
+ parser.add_argument("-t",
745
+ "--tag",
746
+ type=str,
747
+ default=None,
748
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
749
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
750
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
751
+ args = parser.parse_args()
752
+
753
+ debug = args.debug
754
+
755
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
756
+ args.output_dir,
757
+ max_shard_size=args.max_shard_size,
758
+ safe_serialization=args.safe_serialization,
759
+ tag=args.tag,
760
+ exclude_frozen_parameters=args.exclude_frozen_parameters)