sydqiang commited on
Commit
560151f
·
0 Parent(s):

Super-squash branch 'main' using huggingface_hub

Browse files
.gitattributes ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/root/autodl-tmp/data/Qwen2.5-1.5B",
3
+ "architectures": [
4
+ "Qwen2ForCausalLM"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "eos_token_id": 151643,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 1536,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 8960,
13
+ "max_position_embeddings": 131072,
14
+ "max_window_layers": 28,
15
+ "model_type": "qwen2",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 28,
18
+ "num_key_value_heads": 2,
19
+ "rms_norm_eps": 1e-06,
20
+ "rope_scaling": null,
21
+ "rope_theta": 1000000.0,
22
+ "sliding_window": null,
23
+ "tie_word_embeddings": true,
24
+ "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.48.2",
26
+ "use_cache": true,
27
+ "use_mrope": false,
28
+ "use_sliding_window": false,
29
+ "vocab_size": 151936
30
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 151643,
3
+ "eos_token_id": 151643,
4
+ "max_new_tokens": 2048,
5
+ "transformers_version": "4.48.2"
6
+ }
latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step186
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:83841278bf2e82d6af1731656d3f2e577a670467068a68bc5d18ac0039234387
3
+ size 3087467144
rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:019b7804a3a4a467904bc75028b63b0ec49f669082bf56ada01121f4987a53d3
3
+ size 14960
rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ecd010a86fd576fcd29315fc3a11d52719bd00ffa884e166f0be898f8838904d
3
+ size 14960
rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4dcaaaf463d3940cee4cc80fe5010ffb143ff956ebdf8094b13819faf9882797
3
+ size 14960
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6f5308a34b7da0a854159e6617cbc02f5f9ef52bb388ea98bd5f2bcf1e12ea5d
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": "<|endoftext|>",
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 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 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": "<|endoftext|>",
201
+ "errors": "replace",
202
+ "extra_special_tokens": {},
203
+ "model_max_length": 131072,
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,2637 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.992,
5
+ "eval_steps": 10,
6
+ "global_step": 186,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "clip_ratio": 0.0,
13
+ "completion_length": 444.66667556762695,
14
+ "epoch": 0.010666666666666666,
15
+ "grad_norm": 0.13749803602695465,
16
+ "kl": 0.0,
17
+ "learning_rate": 1.0714285714285714e-07,
18
+ "loss": -0.0439,
19
+ "reward": 0.10416666977107525,
20
+ "reward_std": 0.1801304928958416,
21
+ "rewards/accuracy_reward": 0.10416666977107525,
22
+ "rewards/format_reward": 0.0,
23
+ "step": 1
24
+ },
25
+ {
26
+ "clip_ratio": 0.0,
27
+ "completion_length": 438.5625114440918,
28
+ "epoch": 0.021333333333333333,
29
+ "grad_norm": 0.10789892077445984,
30
+ "kl": 0.0,
31
+ "learning_rate": 2.1428571428571428e-07,
32
+ "loss": 0.0387,
33
+ "reward": 0.0833333358168602,
34
+ "reward_std": 0.20412414520978928,
35
+ "rewards/accuracy_reward": 0.06250000186264515,
36
+ "rewards/format_reward": 0.02083333395421505,
37
+ "step": 2
38
+ },
39
+ {
40
+ "clip_ratio": 0.0,
41
+ "completion_length": 440.7083549499512,
42
+ "epoch": 0.032,
43
+ "grad_norm": 0.1401524692773819,
44
+ "kl": 0.00017404556274414062,
45
+ "learning_rate": 3.214285714285714e-07,
46
+ "loss": -0.0602,
47
+ "reward": 0.1250000037252903,
48
+ "reward_std": 0.23116153478622437,
49
+ "rewards/accuracy_reward": 0.1250000037252903,
50
+ "rewards/format_reward": 0.0,
51
+ "step": 3
52
+ },
53
+ {
54
+ "clip_ratio": 0.0,
55
+ "completion_length": 588.8125152587891,
56
+ "epoch": 0.042666666666666665,
57
+ "grad_norm": 0.06724399328231812,
58
+ "kl": 0.00015866756439208984,
59
+ "learning_rate": 4.2857142857142857e-07,
60
+ "loss": -0.0222,
61
+ "reward": 0.0833333358168602,
62
+ "reward_std": 0.12909945845603943,
63
+ "rewards/accuracy_reward": 0.0833333358168602,
64
+ "rewards/format_reward": 0.0,
65
+ "step": 4
66
+ },
67
+ {
68
+ "clip_ratio": 0.0,
69
+ "completion_length": 495.20834732055664,
70
+ "epoch": 0.05333333333333334,
71
+ "grad_norm": 0.08458305150270462,
72
+ "kl": 0.00021141767501831055,
73
+ "learning_rate": 5.357142857142858e-07,
74
+ "loss": -0.0194,
75
+ "reward": 0.14583333767950535,
76
+ "reward_std": 0.28219256177544594,
77
+ "rewards/accuracy_reward": 0.14583333767950535,
78
+ "rewards/format_reward": 0.0,
79
+ "step": 5
80
+ },
81
+ {
82
+ "clip_ratio": 0.0,
83
+ "completion_length": 476.8333435058594,
84
+ "epoch": 0.064,
85
+ "grad_norm": 0.10098902881145477,
86
+ "kl": 0.00014531612396240234,
87
+ "learning_rate": 6.428571428571428e-07,
88
+ "loss": -0.0519,
89
+ "reward": 0.06250000186264515,
90
+ "reward_std": 0.1530931107699871,
91
+ "rewards/accuracy_reward": 0.06250000186264515,
92
+ "rewards/format_reward": 0.0,
93
+ "step": 6
94
+ },
95
+ {
96
+ "clip_ratio": 0.0,
97
+ "completion_length": 556.3125152587891,
98
+ "epoch": 0.07466666666666667,
99
+ "grad_norm": 0.08065751940011978,
100
+ "kl": 0.00015625357627868652,
101
+ "learning_rate": 7.5e-07,
102
+ "loss": 0.0062,
103
+ "reward": 0.1250000037252903,
104
+ "reward_std": 0.23116153106093407,
105
+ "rewards/accuracy_reward": 0.1250000037252903,
106
+ "rewards/format_reward": 0.0,
107
+ "step": 7
108
+ },
109
+ {
110
+ "clip_ratio": 0.0,
111
+ "completion_length": 487.5000114440918,
112
+ "epoch": 0.08533333333333333,
113
+ "grad_norm": 0.07614883035421371,
114
+ "kl": 0.00019866228103637695,
115
+ "learning_rate": 8.571428571428571e-07,
116
+ "loss": -0.0199,
117
+ "reward": 0.08333333395421505,
118
+ "reward_std": 0.11949635669589043,
119
+ "rewards/accuracy_reward": 0.08333333395421505,
120
+ "rewards/format_reward": 0.0,
121
+ "step": 8
122
+ },
123
+ {
124
+ "clip_ratio": 0.0,
125
+ "completion_length": 511.70834732055664,
126
+ "epoch": 0.096,
127
+ "grad_norm": 0.09461379051208496,
128
+ "kl": 0.00015351176261901855,
129
+ "learning_rate": 9.642857142857145e-07,
130
+ "loss": 0.0476,
131
+ "reward": 0.1458333358168602,
132
+ "reward_std": 0.2350771278142929,
133
+ "rewards/accuracy_reward": 0.1458333358168602,
134
+ "rewards/format_reward": 0.0,
135
+ "step": 9
136
+ },
137
+ {
138
+ "clip_ratio": 0.0,
139
+ "completion_length": 441.1250114440918,
140
+ "epoch": 0.10666666666666667,
141
+ "grad_norm": 0.09255574643611908,
142
+ "kl": 0.00015854835510253906,
143
+ "learning_rate": 1.0714285714285716e-06,
144
+ "loss": -0.0865,
145
+ "reward": 0.14583333767950535,
146
+ "reward_std": 0.2446802258491516,
147
+ "rewards/accuracy_reward": 0.14583333767950535,
148
+ "rewards/format_reward": 0.0,
149
+ "step": 10
150
+ },
151
+ {
152
+ "clip_ratio": 0.0,
153
+ "completion_length": 540.2916831970215,
154
+ "epoch": 0.11733333333333333,
155
+ "grad_norm": 0.12472786009311676,
156
+ "kl": 0.00023055076599121094,
157
+ "learning_rate": 1.1785714285714285e-06,
158
+ "loss": 0.0267,
159
+ "reward": 0.2083333395421505,
160
+ "reward_std": 0.3602609857916832,
161
+ "rewards/accuracy_reward": 0.2083333395421505,
162
+ "rewards/format_reward": 0.0,
163
+ "step": 11
164
+ },
165
+ {
166
+ "clip_ratio": 0.0,
167
+ "completion_length": 487.60418128967285,
168
+ "epoch": 0.128,
169
+ "grad_norm": 0.029079366475343704,
170
+ "kl": 0.00019365549087524414,
171
+ "learning_rate": 1.2857142857142856e-06,
172
+ "loss": 0.0049,
173
+ "reward": 0.02083333395421505,
174
+ "reward_std": 0.05103103443980217,
175
+ "rewards/accuracy_reward": 0.02083333395421505,
176
+ "rewards/format_reward": 0.0,
177
+ "step": 12
178
+ },
179
+ {
180
+ "clip_ratio": 0.0,
181
+ "completion_length": 469.1250114440918,
182
+ "epoch": 0.13866666666666666,
183
+ "grad_norm": 0.12546207010746002,
184
+ "kl": 0.00028073787689208984,
185
+ "learning_rate": 1.392857142857143e-06,
186
+ "loss": -0.0073,
187
+ "reward": 0.1875000037252903,
188
+ "reward_std": 0.2996268533170223,
189
+ "rewards/accuracy_reward": 0.16666666977107525,
190
+ "rewards/format_reward": 0.02083333395421505,
191
+ "step": 13
192
+ },
193
+ {
194
+ "clip_ratio": 0.0,
195
+ "completion_length": 413.56250762939453,
196
+ "epoch": 0.14933333333333335,
197
+ "grad_norm": 0.19048571586608887,
198
+ "kl": 0.0003783702850341797,
199
+ "learning_rate": 1.5e-06,
200
+ "loss": -0.0698,
201
+ "reward": 0.25000000558793545,
202
+ "reward_std": 0.4152076207101345,
203
+ "rewards/accuracy_reward": 0.25000000558793545,
204
+ "rewards/format_reward": 0.0,
205
+ "step": 14
206
+ },
207
+ {
208
+ "clip_ratio": 0.0,
209
+ "completion_length": 498.3958511352539,
210
+ "epoch": 0.16,
211
+ "grad_norm": 0.08490169793367386,
212
+ "kl": 0.0004260540008544922,
213
+ "learning_rate": 1.6071428571428572e-06,
214
+ "loss": -0.0216,
215
+ "reward": 0.06250000186264515,
216
+ "reward_std": 0.1530931107699871,
217
+ "rewards/accuracy_reward": 0.06250000186264515,
218
+ "rewards/format_reward": 0.0,
219
+ "step": 15
220
+ },
221
+ {
222
+ "clip_ratio": 0.0,
223
+ "completion_length": 496.1250114440918,
224
+ "epoch": 0.17066666666666666,
225
+ "grad_norm": 0.07948283106088638,
226
+ "kl": 0.0011513233184814453,
227
+ "learning_rate": 1.7142857142857143e-06,
228
+ "loss": 0.0709,
229
+ "reward": 0.1458333358168602,
230
+ "reward_std": 0.2350771240890026,
231
+ "rewards/accuracy_reward": 0.1458333358168602,
232
+ "rewards/format_reward": 0.0,
233
+ "step": 16
234
+ },
235
+ {
236
+ "clip_ratio": 0.0,
237
+ "completion_length": 489.4583568572998,
238
+ "epoch": 0.18133333333333335,
239
+ "grad_norm": 0.11512169986963272,
240
+ "kl": 0.000606536865234375,
241
+ "learning_rate": 1.8214285714285714e-06,
242
+ "loss": -0.0082,
243
+ "reward": 0.18750000186264515,
244
+ "reward_std": 0.2900237552821636,
245
+ "rewards/accuracy_reward": 0.18750000186264515,
246
+ "rewards/format_reward": 0.0,
247
+ "step": 17
248
+ },
249
+ {
250
+ "clip_ratio": 0.0,
251
+ "completion_length": 510.60418701171875,
252
+ "epoch": 0.192,
253
+ "grad_norm": 0.1316482424736023,
254
+ "kl": 0.0010819435119628906,
255
+ "learning_rate": 1.928571428571429e-06,
256
+ "loss": 0.0295,
257
+ "reward": 0.1458333358168602,
258
+ "reward_std": 0.2350771203637123,
259
+ "rewards/accuracy_reward": 0.1458333358168602,
260
+ "rewards/format_reward": 0.0,
261
+ "step": 18
262
+ },
263
+ {
264
+ "clip_ratio": 0.0,
265
+ "completion_length": 464.7708435058594,
266
+ "epoch": 0.20266666666666666,
267
+ "grad_norm": 0.12288669496774673,
268
+ "kl": 0.0012531280517578125,
269
+ "learning_rate": 2.035714285714286e-06,
270
+ "loss": 0.0104,
271
+ "reward": 0.27083333767950535,
272
+ "reward_std": 0.41912321001291275,
273
+ "rewards/accuracy_reward": 0.27083333767950535,
274
+ "rewards/format_reward": 0.0,
275
+ "step": 19
276
+ },
277
+ {
278
+ "clip_ratio": 0.0,
279
+ "completion_length": 443.0208435058594,
280
+ "epoch": 0.21333333333333335,
281
+ "grad_norm": 0.114227794110775,
282
+ "kl": 0.0019593238830566406,
283
+ "learning_rate": 2.142857142857143e-06,
284
+ "loss": -0.0525,
285
+ "reward": 0.2083333358168602,
286
+ "reward_std": 0.16661179810762405,
287
+ "rewards/accuracy_reward": 0.2083333358168602,
288
+ "rewards/format_reward": 0.0,
289
+ "step": 20
290
+ },
291
+ {
292
+ "clip_ratio": 0.0,
293
+ "completion_length": 532.5833473205566,
294
+ "epoch": 0.224,
295
+ "grad_norm": 0.10986621677875519,
296
+ "kl": 0.0016994476318359375,
297
+ "learning_rate": 2.25e-06,
298
+ "loss": -0.0249,
299
+ "reward": 0.14583333767950535,
300
+ "reward_std": 0.31970490515232086,
301
+ "rewards/accuracy_reward": 0.14583333767950535,
302
+ "rewards/format_reward": 0.0,
303
+ "step": 21
304
+ },
305
+ {
306
+ "clip_ratio": 0.0,
307
+ "completion_length": 492.1875057220459,
308
+ "epoch": 0.23466666666666666,
309
+ "grad_norm": 0.0868026539683342,
310
+ "kl": 0.0018286705017089844,
311
+ "learning_rate": 2.357142857142857e-06,
312
+ "loss": -0.0081,
313
+ "reward": 0.16666666977107525,
314
+ "reward_std": 0.2861081548035145,
315
+ "rewards/accuracy_reward": 0.16666666977107525,
316
+ "rewards/format_reward": 0.0,
317
+ "step": 22
318
+ },
319
+ {
320
+ "clip_ratio": 0.0,
321
+ "completion_length": 492.72918701171875,
322
+ "epoch": 0.24533333333333332,
323
+ "grad_norm": 0.10867961496114731,
324
+ "kl": 0.0030241012573242188,
325
+ "learning_rate": 2.4642857142857143e-06,
326
+ "loss": -0.0295,
327
+ "reward": 0.2916666753590107,
328
+ "reward_std": 0.3506578840315342,
329
+ "rewards/accuracy_reward": 0.2916666753590107,
330
+ "rewards/format_reward": 0.0,
331
+ "step": 23
332
+ },
333
+ {
334
+ "clip_ratio": 0.0,
335
+ "completion_length": 555.1875228881836,
336
+ "epoch": 0.256,
337
+ "grad_norm": 0.08439142256975174,
338
+ "kl": 0.0024747848510742188,
339
+ "learning_rate": 2.571428571428571e-06,
340
+ "loss": -0.0001,
341
+ "reward": 0.1875000037252903,
342
+ "reward_std": 0.2996268533170223,
343
+ "rewards/accuracy_reward": 0.1875000037252903,
344
+ "rewards/format_reward": 0.0,
345
+ "step": 24
346
+ },
347
+ {
348
+ "clip_ratio": 0.0,
349
+ "completion_length": 569.3125152587891,
350
+ "epoch": 0.26666666666666666,
351
+ "grad_norm": 0.10544775426387787,
352
+ "kl": 0.0042171478271484375,
353
+ "learning_rate": 2.678571428571429e-06,
354
+ "loss": -0.0134,
355
+ "reward": 0.1875000037252903,
356
+ "reward_std": 0.2350771203637123,
357
+ "rewards/accuracy_reward": 0.1875000037252903,
358
+ "rewards/format_reward": 0.0,
359
+ "step": 25
360
+ },
361
+ {
362
+ "clip_ratio": 0.0,
363
+ "completion_length": 481.45834732055664,
364
+ "epoch": 0.2773333333333333,
365
+ "grad_norm": 0.10559644550085068,
366
+ "kl": 0.0049877166748046875,
367
+ "learning_rate": 2.785714285714286e-06,
368
+ "loss": -0.0202,
369
+ "reward": 0.3333333395421505,
370
+ "reward_std": 0.39512956142425537,
371
+ "rewards/accuracy_reward": 0.3333333395421505,
372
+ "rewards/format_reward": 0.0,
373
+ "step": 26
374
+ },
375
+ {
376
+ "clip_ratio": 0.0,
377
+ "completion_length": 549.7916870117188,
378
+ "epoch": 0.288,
379
+ "grad_norm": 0.09459959715604782,
380
+ "kl": 0.00540924072265625,
381
+ "learning_rate": 2.892857142857143e-06,
382
+ "loss": 0.0228,
383
+ "reward": 0.1875000074505806,
384
+ "reward_std": 0.21764283999800682,
385
+ "rewards/accuracy_reward": 0.1875000074505806,
386
+ "rewards/format_reward": 0.0,
387
+ "step": 27
388
+ },
389
+ {
390
+ "clip_ratio": 0.0,
391
+ "completion_length": 565.3958473205566,
392
+ "epoch": 0.2986666666666667,
393
+ "grad_norm": 0.09324613213539124,
394
+ "kl": 0.00745844841003418,
395
+ "learning_rate": 3e-06,
396
+ "loss": 0.0506,
397
+ "reward": 0.25000000931322575,
398
+ "reward_std": 0.3332235999405384,
399
+ "rewards/accuracy_reward": 0.2291666753590107,
400
+ "rewards/format_reward": 0.02083333395421505,
401
+ "step": 28
402
+ },
403
+ {
404
+ "clip_ratio": 0.0,
405
+ "completion_length": 515.1041831970215,
406
+ "epoch": 0.30933333333333335,
407
+ "grad_norm": 0.07702303677797318,
408
+ "kl": 0.009542465209960938,
409
+ "learning_rate": 2.999882508108334e-06,
410
+ "loss": 0.0352,
411
+ "reward": 0.3333333432674408,
412
+ "reward_std": 0.24859581515192986,
413
+ "rewards/accuracy_reward": 0.3333333432674408,
414
+ "rewards/format_reward": 0.0,
415
+ "step": 29
416
+ },
417
+ {
418
+ "clip_ratio": 0.0,
419
+ "completion_length": 558.8125190734863,
420
+ "epoch": 0.32,
421
+ "grad_norm": 0.14078065752983093,
422
+ "kl": 0.009675979614257812,
423
+ "learning_rate": 2.9995300508391286e-06,
424
+ "loss": 0.0497,
425
+ "reward": 0.29166666977107525,
426
+ "reward_std": 0.4230388030409813,
427
+ "rewards/accuracy_reward": 0.29166666977107525,
428
+ "rewards/format_reward": 0.0,
429
+ "step": 30
430
+ },
431
+ {
432
+ "clip_ratio": 0.0,
433
+ "completion_length": 514.6875114440918,
434
+ "epoch": 0.33066666666666666,
435
+ "grad_norm": 0.10777795314788818,
436
+ "kl": 0.00920867919921875,
437
+ "learning_rate": 2.998942683406879e-06,
438
+ "loss": -0.0089,
439
+ "reward": 0.25000000558793545,
440
+ "reward_std": 0.31314554437994957,
441
+ "rewards/accuracy_reward": 0.25000000558793545,
442
+ "rewards/format_reward": 0.0,
443
+ "step": 31
444
+ },
445
+ {
446
+ "clip_ratio": 0.0,
447
+ "completion_length": 541.7708511352539,
448
+ "epoch": 0.3413333333333333,
449
+ "grad_norm": 0.07520294934511185,
450
+ "kl": 0.008222579956054688,
451
+ "learning_rate": 2.998120497826133e-06,
452
+ "loss": -0.0195,
453
+ "reward": 0.35416667349636555,
454
+ "reward_std": 0.34674229100346565,
455
+ "rewards/accuracy_reward": 0.35416667349636555,
456
+ "rewards/format_reward": 0.0,
457
+ "step": 32
458
+ },
459
+ {
460
+ "clip_ratio": 0.0,
461
+ "completion_length": 512.0833435058594,
462
+ "epoch": 0.352,
463
+ "grad_norm": 0.0903107300400734,
464
+ "kl": 0.01560211181640625,
465
+ "learning_rate": 2.9970636228970757e-06,
466
+ "loss": 0.0039,
467
+ "reward": 0.3333333358168602,
468
+ "reward_std": 0.33841101825237274,
469
+ "rewards/accuracy_reward": 0.3333333358168602,
470
+ "rewards/format_reward": 0.0,
471
+ "step": 33
472
+ },
473
+ {
474
+ "clip_ratio": 0.0,
475
+ "completion_length": 396.4583435058594,
476
+ "epoch": 0.3626666666666667,
477
+ "grad_norm": 0.13230890035629272,
478
+ "kl": 0.0174560546875,
479
+ "learning_rate": 2.995772224185354e-06,
480
+ "loss": 0.0103,
481
+ "reward": 0.41666667722165585,
482
+ "reward_std": 0.4326419048011303,
483
+ "rewards/accuracy_reward": 0.41666667722165585,
484
+ "rewards/format_reward": 0.0,
485
+ "step": 34
486
+ },
487
+ {
488
+ "clip_ratio": 0.0,
489
+ "completion_length": 536.2083473205566,
490
+ "epoch": 0.37333333333333335,
491
+ "grad_norm": 0.1084352657198906,
492
+ "kl": 0.01836395263671875,
493
+ "learning_rate": 2.9942465039961373e-06,
494
+ "loss": 0.0301,
495
+ "reward": 0.4583333432674408,
496
+ "reward_std": 0.23899271339178085,
497
+ "rewards/accuracy_reward": 0.4583333432674408,
498
+ "rewards/format_reward": 0.0,
499
+ "step": 35
500
+ },
501
+ {
502
+ "clip_ratio": 0.0,
503
+ "completion_length": 508.3750190734863,
504
+ "epoch": 0.384,
505
+ "grad_norm": 0.11348140239715576,
506
+ "kl": 0.016246795654296875,
507
+ "learning_rate": 2.992486701342427e-06,
508
+ "loss": 0.0617,
509
+ "reward": 0.5416666809469461,
510
+ "reward_std": 0.4971916303038597,
511
+ "rewards/accuracy_reward": 0.5416666809469461,
512
+ "rewards/format_reward": 0.0,
513
+ "step": 36
514
+ },
515
+ {
516
+ "clip_ratio": 0.0,
517
+ "completion_length": 428.7708492279053,
518
+ "epoch": 0.39466666666666667,
519
+ "grad_norm": 0.09864811599254608,
520
+ "kl": 0.01728057861328125,
521
+ "learning_rate": 2.9904930919076145e-06,
522
+ "loss": -0.0272,
523
+ "reward": 0.6250000149011612,
524
+ "reward_std": 0.2957112565636635,
525
+ "rewards/accuracy_reward": 0.6250000149011612,
526
+ "rewards/format_reward": 0.0,
527
+ "step": 37
528
+ },
529
+ {
530
+ "clip_ratio": 0.0,
531
+ "completion_length": 519.5833473205566,
532
+ "epoch": 0.4053333333333333,
533
+ "grad_norm": 0.08879904448986053,
534
+ "kl": 0.0256500244140625,
535
+ "learning_rate": 2.9882659880022905e-06,
536
+ "loss": 0.0216,
537
+ "reward": 0.35416667349636555,
538
+ "reward_std": 0.34674229472875595,
539
+ "rewards/accuracy_reward": 0.35416667349636555,
540
+ "rewards/format_reward": 0.0,
541
+ "step": 38
542
+ },
543
+ {
544
+ "clip_ratio": 0.0,
545
+ "completion_length": 462.75001525878906,
546
+ "epoch": 0.416,
547
+ "grad_norm": 0.0630691796541214,
548
+ "kl": 0.01651763916015625,
549
+ "learning_rate": 2.985805738515323e-06,
550
+ "loss": 0.0325,
551
+ "reward": 0.8125000186264515,
552
+ "reward_std": 0.28219256550073624,
553
+ "rewards/accuracy_reward": 0.8125000186264515,
554
+ "rewards/format_reward": 0.0,
555
+ "step": 39
556
+ },
557
+ {
558
+ "clip_ratio": 0.0,
559
+ "completion_length": 522.7916831970215,
560
+ "epoch": 0.4266666666666667,
561
+ "grad_norm": 0.08862201869487762,
562
+ "kl": 0.01795196533203125,
563
+ "learning_rate": 2.9831127288592004e-06,
564
+ "loss": 0.0388,
565
+ "reward": 0.5625000074505806,
566
+ "reward_std": 0.4539917819201946,
567
+ "rewards/accuracy_reward": 0.5625000074505806,
568
+ "rewards/format_reward": 0.0,
569
+ "step": 40
570
+ },
571
+ {
572
+ "clip_ratio": 0.0,
573
+ "completion_length": 448.2916793823242,
574
+ "epoch": 0.43733333333333335,
575
+ "grad_norm": 0.09053761512041092,
576
+ "kl": 0.01364898681640625,
577
+ "learning_rate": 2.9801873809096543e-06,
578
+ "loss": -0.0464,
579
+ "reward": 0.6875000018626451,
580
+ "reward_std": 0.2525114081799984,
581
+ "rewards/accuracy_reward": 0.6875000018626451,
582
+ "rewards/format_reward": 0.0,
583
+ "step": 41
584
+ },
585
+ {
586
+ "clip_ratio": 0.0,
587
+ "completion_length": 431.5625114440918,
588
+ "epoch": 0.448,
589
+ "grad_norm": 0.11968156695365906,
590
+ "kl": 0.02625274658203125,
591
+ "learning_rate": 2.97703015293957e-06,
592
+ "loss": 0.0643,
593
+ "reward": 0.6875000279396772,
594
+ "reward_std": 0.4488043636083603,
595
+ "rewards/accuracy_reward": 0.6875000279396772,
596
+ "rewards/format_reward": 0.0,
597
+ "step": 42
598
+ },
599
+ {
600
+ "clip_ratio": 0.0,
601
+ "completion_length": 488.56250762939453,
602
+ "epoch": 0.45866666666666667,
603
+ "grad_norm": 0.1140248030424118,
604
+ "kl": 0.027557373046875,
605
+ "learning_rate": 2.9736415395471975e-06,
606
+ "loss": 0.026,
607
+ "reward": 0.6250000223517418,
608
+ "reward_std": 0.4152076132595539,
609
+ "rewards/accuracy_reward": 0.6250000223517418,
610
+ "rewards/format_reward": 0.0,
611
+ "step": 43
612
+ },
613
+ {
614
+ "clip_ratio": 0.0,
615
+ "completion_length": 411.1875190734863,
616
+ "epoch": 0.4693333333333333,
617
+ "grad_norm": 0.07253677397966385,
618
+ "kl": 0.0226898193359375,
619
+ "learning_rate": 2.970022071578666e-06,
620
+ "loss": 0.076,
621
+ "reward": 0.8125000149011612,
622
+ "reward_std": 0.299626849591732,
623
+ "rewards/accuracy_reward": 0.8125000149011612,
624
+ "rewards/format_reward": 0.0,
625
+ "step": 44
626
+ },
627
+ {
628
+ "clip_ratio": 0.0,
629
+ "completion_length": 503.02084732055664,
630
+ "epoch": 0.48,
631
+ "grad_norm": 0.08070115745067596,
632
+ "kl": 0.024505615234375,
633
+ "learning_rate": 2.9661723160448267e-06,
634
+ "loss": 0.0922,
635
+ "reward": 0.5625000111758709,
636
+ "reward_std": 0.41912321373820305,
637
+ "rewards/accuracy_reward": 0.5625000111758709,
638
+ "rewards/format_reward": 0.0,
639
+ "step": 45
640
+ },
641
+ {
642
+ "clip_ratio": 0.0,
643
+ "completion_length": 453.56251525878906,
644
+ "epoch": 0.49066666666666664,
645
+ "grad_norm": 0.06279083341360092,
646
+ "kl": 0.019269943237304688,
647
+ "learning_rate": 2.962092876032427e-06,
648
+ "loss": -0.034,
649
+ "reward": 0.7708333507180214,
650
+ "reward_std": 0.21764283254742622,
651
+ "rewards/accuracy_reward": 0.7708333507180214,
652
+ "rewards/format_reward": 0.0,
653
+ "step": 46
654
+ },
655
+ {
656
+ "clip_ratio": 0.0,
657
+ "completion_length": 412.5833511352539,
658
+ "epoch": 0.5013333333333333,
659
+ "grad_norm": 0.04880174994468689,
660
+ "kl": 0.033538818359375,
661
+ "learning_rate": 2.957784390609632e-06,
662
+ "loss": -0.0072,
663
+ "reward": 0.7500000074505806,
664
+ "reward_std": 0.18404608592391014,
665
+ "rewards/accuracy_reward": 0.7500000074505806,
666
+ "rewards/format_reward": 0.0,
667
+ "step": 47
668
+ },
669
+ {
670
+ "clip_ratio": 0.0,
671
+ "completion_length": 434.12501525878906,
672
+ "epoch": 0.512,
673
+ "grad_norm": 0.05984590947628021,
674
+ "kl": 0.02077484130859375,
675
+ "learning_rate": 2.9532475347259113e-06,
676
+ "loss": 0.033,
677
+ "reward": 0.8125000111758709,
678
+ "reward_std": 0.2446802221238613,
679
+ "rewards/accuracy_reward": 0.8125000111758709,
680
+ "rewards/format_reward": 0.0,
681
+ "step": 48
682
+ },
683
+ {
684
+ "clip_ratio": 0.0,
685
+ "completion_length": 477.208345413208,
686
+ "epoch": 0.5226666666666666,
687
+ "grad_norm": 0.12303212285041809,
688
+ "kl": 0.02848052978515625,
689
+ "learning_rate": 2.9484830191063057e-06,
690
+ "loss": 0.0671,
691
+ "reward": 0.6250000204890966,
692
+ "reward_std": 0.3332235962152481,
693
+ "rewards/accuracy_reward": 0.6250000204890966,
694
+ "rewards/format_reward": 0.0,
695
+ "step": 49
696
+ },
697
+ {
698
+ "clip_ratio": 0.0,
699
+ "completion_length": 582.6041831970215,
700
+ "epoch": 0.5333333333333333,
701
+ "grad_norm": 0.09904547035694122,
702
+ "kl": 0.015716552734375,
703
+ "learning_rate": 2.9434915901400857e-06,
704
+ "loss": 0.0423,
705
+ "reward": 0.6458333507180214,
706
+ "reward_std": 0.41912321001291275,
707
+ "rewards/accuracy_reward": 0.6458333507180214,
708
+ "rewards/format_reward": 0.0,
709
+ "step": 50
710
+ },
711
+ {
712
+ "clip_ratio": 0.0,
713
+ "completion_length": 409.645845413208,
714
+ "epoch": 0.544,
715
+ "grad_norm": 0.10279008746147156,
716
+ "kl": 0.04036712646484375,
717
+ "learning_rate": 2.938274029763826e-06,
718
+ "loss": 0.0204,
719
+ "reward": 0.6250000186264515,
720
+ "reward_std": 0.3506578877568245,
721
+ "rewards/accuracy_reward": 0.6250000186264515,
722
+ "rewards/format_reward": 0.0,
723
+ "step": 51
724
+ },
725
+ {
726
+ "clip_ratio": 0.0,
727
+ "completion_length": 539.9166831970215,
728
+ "epoch": 0.5546666666666666,
729
+ "grad_norm": 0.11620215326547623,
730
+ "kl": 0.03099822998046875,
731
+ "learning_rate": 2.9328311553389116e-06,
732
+ "loss": 0.0362,
733
+ "reward": 0.7500000223517418,
734
+ "reward_std": 0.4056045152246952,
735
+ "rewards/accuracy_reward": 0.7500000223517418,
736
+ "rewards/format_reward": 0.0,
737
+ "step": 52
738
+ },
739
+ {
740
+ "clip_ratio": 0.0,
741
+ "completion_length": 539.6875152587891,
742
+ "epoch": 0.5653333333333334,
743
+ "grad_norm": 0.0942852720618248,
744
+ "kl": 0.021152496337890625,
745
+ "learning_rate": 2.927163819523492e-06,
746
+ "loss": 0.0986,
747
+ "reward": 0.5625000149011612,
748
+ "reward_std": 0.2996268533170223,
749
+ "rewards/accuracy_reward": 0.5625000149011612,
750
+ "rewards/format_reward": 0.0,
751
+ "step": 53
752
+ },
753
+ {
754
+ "clip_ratio": 0.0,
755
+ "completion_length": 448.3125190734863,
756
+ "epoch": 0.576,
757
+ "grad_norm": 0.06090138480067253,
758
+ "kl": 0.026214599609375,
759
+ "learning_rate": 2.9212729101389084e-06,
760
+ "loss": 0.041,
761
+ "reward": 0.7708333395421505,
762
+ "reward_std": 0.1530931070446968,
763
+ "rewards/accuracy_reward": 0.7708333395421505,
764
+ "rewards/format_reward": 0.0,
765
+ "step": 54
766
+ },
767
+ {
768
+ "clip_ratio": 0.0,
769
+ "completion_length": 634.8750114440918,
770
+ "epoch": 0.5866666666666667,
771
+ "grad_norm": 0.10308913886547089,
772
+ "kl": 0.032123565673828125,
773
+ "learning_rate": 2.9151593500306103e-06,
774
+ "loss": 0.021,
775
+ "reward": 0.4166666753590107,
776
+ "reward_std": 0.2861081585288048,
777
+ "rewards/accuracy_reward": 0.4166666753590107,
778
+ "rewards/format_reward": 0.0,
779
+ "step": 55
780
+ },
781
+ {
782
+ "clip_ratio": 0.0,
783
+ "completion_length": 456.2708625793457,
784
+ "epoch": 0.5973333333333334,
785
+ "grad_norm": 0.09447697550058365,
786
+ "kl": 0.0720062255859375,
787
+ "learning_rate": 2.9088240969235863e-06,
788
+ "loss": 0.0148,
789
+ "reward": 0.7291666828095913,
790
+ "reward_std": 0.36417657881975174,
791
+ "rewards/accuracy_reward": 0.7291666828095913,
792
+ "rewards/format_reward": 0.0,
793
+ "step": 56
794
+ },
795
+ {
796
+ "clip_ratio": 0.0,
797
+ "completion_length": 505.68751525878906,
798
+ "epoch": 0.608,
799
+ "grad_norm": 0.09954586625099182,
800
+ "kl": 0.04242706298828125,
801
+ "learning_rate": 2.902268143272333e-06,
802
+ "loss": 0.0686,
803
+ "reward": 0.7708333395421505,
804
+ "reward_std": 0.2525114119052887,
805
+ "rewards/accuracy_reward": 0.7708333395421505,
806
+ "rewards/format_reward": 0.0,
807
+ "step": 57
808
+ },
809
+ {
810
+ "clip_ratio": 0.0,
811
+ "completion_length": 513.0208511352539,
812
+ "epoch": 0.6186666666666667,
813
+ "grad_norm": 0.07663288712501526,
814
+ "kl": 0.02385711669921875,
815
+ "learning_rate": 2.895492516105378e-06,
816
+ "loss": 0.0923,
817
+ "reward": 0.6250000167638063,
818
+ "reward_std": 0.4152076132595539,
819
+ "rewards/accuracy_reward": 0.6250000167638063,
820
+ "rewards/format_reward": 0.0,
821
+ "step": 58
822
+ },
823
+ {
824
+ "clip_ratio": 0.0,
825
+ "completion_length": 639.5625076293945,
826
+ "epoch": 0.6293333333333333,
827
+ "grad_norm": 0.1266147643327713,
828
+ "kl": 0.04524993896484375,
829
+ "learning_rate": 2.888498276864393e-06,
830
+ "loss": 0.086,
831
+ "reward": 0.4375000149011612,
832
+ "reward_std": 0.37377968057990074,
833
+ "rewards/accuracy_reward": 0.4375000149011612,
834
+ "rewards/format_reward": 0.0,
835
+ "step": 59
836
+ },
837
+ {
838
+ "clip_ratio": 0.0,
839
+ "completion_length": 570.666690826416,
840
+ "epoch": 0.64,
841
+ "grad_norm": 0.08474475890398026,
842
+ "kl": 0.02214813232421875,
843
+ "learning_rate": 2.8812865212379087e-06,
844
+ "loss": 0.0572,
845
+ "reward": 0.6666666865348816,
846
+ "reward_std": 0.3506578877568245,
847
+ "rewards/accuracy_reward": 0.6666666865348816,
848
+ "rewards/format_reward": 0.0,
849
+ "step": 60
850
+ },
851
+ {
852
+ "clip_ratio": 0.0,
853
+ "completion_length": 586.4375152587891,
854
+ "epoch": 0.6506666666666666,
855
+ "grad_norm": 0.12999482452869415,
856
+ "kl": 0.03527069091796875,
857
+ "learning_rate": 2.8738583789896743e-06,
858
+ "loss": 0.085,
859
+ "reward": 0.6666666828095913,
860
+ "reward_std": 0.43264190107584,
861
+ "rewards/accuracy_reward": 0.6666666828095913,
862
+ "rewards/format_reward": 0.0,
863
+ "step": 61
864
+ },
865
+ {
866
+ "clip_ratio": 0.0,
867
+ "completion_length": 606.8541831970215,
868
+ "epoch": 0.6613333333333333,
869
+ "grad_norm": 0.07179641723632812,
870
+ "kl": 0.03192138671875,
871
+ "learning_rate": 2.866215013781668e-06,
872
+ "loss": 0.006,
873
+ "reward": 0.5000000093132257,
874
+ "reward_std": 0.4326419048011303,
875
+ "rewards/accuracy_reward": 0.5000000093132257,
876
+ "rewards/format_reward": 0.0,
877
+ "step": 62
878
+ },
879
+ {
880
+ "clip_ratio": 0.0,
881
+ "completion_length": 473.2500190734863,
882
+ "epoch": 0.672,
883
+ "grad_norm": 0.1155165582895279,
884
+ "kl": 0.0264434814453125,
885
+ "learning_rate": 2.858357622991806e-06,
886
+ "loss": 0.0919,
887
+ "reward": 0.7500000260770321,
888
+ "reward_std": 0.3977733328938484,
889
+ "rewards/accuracy_reward": 0.7500000260770321,
890
+ "rewards/format_reward": 0.0,
891
+ "step": 63
892
+ },
893
+ {
894
+ "clip_ratio": 0.0,
895
+ "completion_length": 568.0833473205566,
896
+ "epoch": 0.6826666666666666,
897
+ "grad_norm": 0.08376800268888474,
898
+ "kl": 0.04048919677734375,
899
+ "learning_rate": 2.8502874375263646e-06,
900
+ "loss": 0.0631,
901
+ "reward": 0.5833333414047956,
902
+ "reward_std": 0.23116153106093407,
903
+ "rewards/accuracy_reward": 0.5833333414047956,
904
+ "rewards/format_reward": 0.0,
905
+ "step": 64
906
+ },
907
+ {
908
+ "clip_ratio": 0.0,
909
+ "completion_length": 440.8333435058594,
910
+ "epoch": 0.6933333333333334,
911
+ "grad_norm": 0.08705708384513855,
912
+ "kl": 0.04457855224609375,
913
+ "learning_rate": 2.8420057216271533e-06,
914
+ "loss": 0.0036,
915
+ "reward": 0.7083333395421505,
916
+ "reward_std": 0.32097673043608665,
917
+ "rewards/accuracy_reward": 0.7083333395421505,
918
+ "rewards/format_reward": 0.0,
919
+ "step": 65
920
+ },
921
+ {
922
+ "clip_ratio": 0.0,
923
+ "completion_length": 592.3125228881836,
924
+ "epoch": 0.704,
925
+ "grad_norm": 0.1033933237195015,
926
+ "kl": 0.0416717529296875,
927
+ "learning_rate": 2.8335137726734607e-06,
928
+ "loss": 0.1093,
929
+ "reward": 0.625000013038516,
930
+ "reward_std": 0.3602609857916832,
931
+ "rewards/accuracy_reward": 0.625000013038516,
932
+ "rewards/format_reward": 0.0,
933
+ "step": 66
934
+ },
935
+ {
936
+ "clip_ratio": 0.0,
937
+ "completion_length": 426.91667556762695,
938
+ "epoch": 0.7146666666666667,
939
+ "grad_norm": 0.13923761248588562,
940
+ "kl": 0.04537200927734375,
941
+ "learning_rate": 2.8248129209788164e-06,
942
+ "loss": 0.0978,
943
+ "reward": 0.7291666865348816,
944
+ "reward_std": 0.34674229100346565,
945
+ "rewards/accuracy_reward": 0.7291666865348816,
946
+ "rewards/format_reward": 0.0,
947
+ "step": 67
948
+ },
949
+ {
950
+ "clip_ratio": 0.0,
951
+ "completion_length": 488.93752670288086,
952
+ "epoch": 0.7253333333333334,
953
+ "grad_norm": 0.08182822912931442,
954
+ "kl": 0.0292205810546875,
955
+ "learning_rate": 2.8159045295825857e-06,
956
+ "loss": -0.0328,
957
+ "reward": 0.5833333469927311,
958
+ "reward_std": 0.4152076207101345,
959
+ "rewards/accuracy_reward": 0.5833333469927311,
960
+ "rewards/format_reward": 0.0,
961
+ "step": 68
962
+ },
963
+ {
964
+ "clip_ratio": 0.0,
965
+ "completion_length": 485.5625114440918,
966
+ "epoch": 0.736,
967
+ "grad_norm": 0.07835296541452408,
968
+ "kl": 0.03786468505859375,
969
+ "learning_rate": 2.806789994036445e-06,
970
+ "loss": 0.0566,
971
+ "reward": 0.6875000074505806,
972
+ "reward_std": 0.3266642391681671,
973
+ "rewards/accuracy_reward": 0.6875000074505806,
974
+ "rewards/format_reward": 0.0,
975
+ "step": 69
976
+ },
977
+ {
978
+ "clip_ratio": 0.0,
979
+ "completion_length": 507.75001525878906,
980
+ "epoch": 0.7466666666666667,
981
+ "grad_norm": 0.1188604012131691,
982
+ "kl": 0.0541534423828125,
983
+ "learning_rate": 2.7974707421857584e-06,
984
+ "loss": 0.0698,
985
+ "reward": 0.5625000055879354,
986
+ "reward_std": 0.3170611374080181,
987
+ "rewards/accuracy_reward": 0.5625000055879354,
988
+ "rewards/format_reward": 0.0,
989
+ "step": 70
990
+ },
991
+ {
992
+ "clip_ratio": 0.0,
993
+ "completion_length": 556.2708511352539,
994
+ "epoch": 0.7573333333333333,
995
+ "grad_norm": 0.07966376841068268,
996
+ "kl": 0.04036712646484375,
997
+ "learning_rate": 2.7879482339458973e-06,
998
+ "loss": 0.0448,
999
+ "reward": 0.6458333488553762,
1000
+ "reward_std": 0.27258946001529694,
1001
+ "rewards/accuracy_reward": 0.6458333488553762,
1002
+ "rewards/format_reward": 0.0,
1003
+ "step": 71
1004
+ },
1005
+ {
1006
+ "clip_ratio": 0.0,
1007
+ "completion_length": 532.9583511352539,
1008
+ "epoch": 0.768,
1009
+ "grad_norm": 0.08758682757616043,
1010
+ "kl": 0.038604736328125,
1011
+ "learning_rate": 2.778223961073537e-06,
1012
+ "loss": 0.0497,
1013
+ "reward": 0.5208333469927311,
1014
+ "reward_std": 0.33713919669389725,
1015
+ "rewards/accuracy_reward": 0.5208333469927311,
1016
+ "rewards/format_reward": 0.0,
1017
+ "step": 72
1018
+ },
1019
+ {
1020
+ "clip_ratio": 0.0,
1021
+ "completion_length": 396.0208435058594,
1022
+ "epoch": 0.7786666666666666,
1023
+ "grad_norm": 0.08768614381551743,
1024
+ "kl": 0.0446929931640625,
1025
+ "learning_rate": 2.7682994469329646e-06,
1026
+ "loss": 0.0424,
1027
+ "reward": 0.8333333414047956,
1028
+ "reward_std": 0.16661180183291435,
1029
+ "rewards/accuracy_reward": 0.8333333414047956,
1030
+ "rewards/format_reward": 0.0,
1031
+ "step": 73
1032
+ },
1033
+ {
1034
+ "clip_ratio": 0.0,
1035
+ "completion_length": 467.0833549499512,
1036
+ "epoch": 0.7893333333333333,
1037
+ "grad_norm": 0.06757903844118118,
1038
+ "kl": 0.032470703125,
1039
+ "learning_rate": 2.7581762462574334e-06,
1040
+ "loss": 0.0046,
1041
+ "reward": 0.6666666753590107,
1042
+ "reward_std": 0.2861081622540951,
1043
+ "rewards/accuracy_reward": 0.6666666753590107,
1044
+ "rewards/format_reward": 0.0,
1045
+ "step": 74
1046
+ },
1047
+ {
1048
+ "clip_ratio": 0.0,
1049
+ "completion_length": 694.7291793823242,
1050
+ "epoch": 0.8,
1051
+ "grad_norm": 0.08728935569524765,
1052
+ "kl": 0.0474700927734375,
1053
+ "learning_rate": 2.747855944905606e-06,
1054
+ "loss": 0.0407,
1055
+ "reward": 0.4375000149011612,
1056
+ "reward_std": 0.36417657881975174,
1057
+ "rewards/accuracy_reward": 0.4375000149011612,
1058
+ "rewards/format_reward": 0.0,
1059
+ "step": 75
1060
+ },
1061
+ {
1062
+ "clip_ratio": 0.0,
1063
+ "completion_length": 500.8333549499512,
1064
+ "epoch": 0.8106666666666666,
1065
+ "grad_norm": 0.12662656605243683,
1066
+ "kl": 0.0447845458984375,
1067
+ "learning_rate": 2.73734015961312e-06,
1068
+ "loss": 0.0734,
1069
+ "reward": 0.7291666939854622,
1070
+ "reward_std": 0.4662386514246464,
1071
+ "rewards/accuracy_reward": 0.7291666939854622,
1072
+ "rewards/format_reward": 0.0,
1073
+ "step": 76
1074
+ },
1075
+ {
1076
+ "clip_ratio": 0.0,
1077
+ "completion_length": 530.729190826416,
1078
+ "epoch": 0.8213333333333334,
1079
+ "grad_norm": 0.11303848773241043,
1080
+ "kl": 0.0428314208984375,
1081
+ "learning_rate": 2.7266305377393183e-06,
1082
+ "loss": 0.092,
1083
+ "reward": 0.7500000186264515,
1084
+ "reward_std": 0.3506578840315342,
1085
+ "rewards/accuracy_reward": 0.7500000186264515,
1086
+ "rewards/format_reward": 0.0,
1087
+ "step": 77
1088
+ },
1089
+ {
1090
+ "clip_ratio": 0.0,
1091
+ "completion_length": 542.1875190734863,
1092
+ "epoch": 0.832,
1093
+ "grad_norm": 0.08298168331384659,
1094
+ "kl": 0.051544189453125,
1095
+ "learning_rate": 2.7157287570091765e-06,
1096
+ "loss": -0.0051,
1097
+ "reward": 0.645833358168602,
1098
+ "reward_std": 0.4758417494595051,
1099
+ "rewards/accuracy_reward": 0.645833358168602,
1100
+ "rewards/format_reward": 0.0,
1101
+ "step": 78
1102
+ },
1103
+ {
1104
+ "clip_ratio": 0.0,
1105
+ "completion_length": 609.291675567627,
1106
+ "epoch": 0.8426666666666667,
1107
+ "grad_norm": 0.13366347551345825,
1108
+ "kl": 0.07353973388671875,
1109
+ "learning_rate": 2.7046365252504835e-06,
1110
+ "loss": 0.1406,
1111
+ "reward": 0.6666666865348816,
1112
+ "reward_std": 0.3506578952074051,
1113
+ "rewards/accuracy_reward": 0.6666666865348816,
1114
+ "rewards/format_reward": 0.0,
1115
+ "step": 79
1116
+ },
1117
+ {
1118
+ "clip_ratio": 0.0,
1119
+ "completion_length": 436.02084732055664,
1120
+ "epoch": 0.8533333333333334,
1121
+ "grad_norm": 0.07604128122329712,
1122
+ "kl": 0.0461883544921875,
1123
+ "learning_rate": 2.693355580126295e-06,
1124
+ "loss": 0.0742,
1125
+ "reward": 0.8333333432674408,
1126
+ "reward_std": 0.25819891691207886,
1127
+ "rewards/accuracy_reward": 0.8333333432674408,
1128
+ "rewards/format_reward": 0.0,
1129
+ "step": 80
1130
+ },
1131
+ {
1132
+ "clip_ratio": 0.0,
1133
+ "completion_length": 544.1458511352539,
1134
+ "epoch": 0.864,
1135
+ "grad_norm": 0.0864926278591156,
1136
+ "kl": 0.08890533447265625,
1137
+ "learning_rate": 2.6818876888627203e-06,
1138
+ "loss": 0.0639,
1139
+ "reward": 0.6875000149011612,
1140
+ "reward_std": 0.290023747831583,
1141
+ "rewards/accuracy_reward": 0.6875000149011612,
1142
+ "rewards/format_reward": 0.0,
1143
+ "step": 81
1144
+ },
1145
+ {
1146
+ "clip_ratio": 0.0,
1147
+ "completion_length": 499.02084732055664,
1148
+ "epoch": 0.8746666666666667,
1149
+ "grad_norm": 0.12025976926088333,
1150
+ "kl": 0.0964202880859375,
1151
+ "learning_rate": 2.6702346479720777e-06,
1152
+ "loss": 0.0518,
1153
+ "reward": 0.5833333395421505,
1154
+ "reward_std": 0.22155842930078506,
1155
+ "rewards/accuracy_reward": 0.5833333395421505,
1156
+ "rewards/format_reward": 0.0,
1157
+ "step": 82
1158
+ },
1159
+ {
1160
+ "clip_ratio": 0.0,
1161
+ "completion_length": 565.2083549499512,
1162
+ "epoch": 0.8853333333333333,
1163
+ "grad_norm": 0.10178246349096298,
1164
+ "kl": 0.06887054443359375,
1165
+ "learning_rate": 2.6583982829714576e-06,
1166
+ "loss": 0.1361,
1167
+ "reward": 0.6458333488553762,
1168
+ "reward_std": 0.28219256550073624,
1169
+ "rewards/accuracy_reward": 0.6458333488553762,
1170
+ "rewards/format_reward": 0.0,
1171
+ "step": 83
1172
+ },
1173
+ {
1174
+ "clip_ratio": 0.0,
1175
+ "completion_length": 551.5833396911621,
1176
+ "epoch": 0.896,
1177
+ "grad_norm": 0.05114445462822914,
1178
+ "kl": 0.0851898193359375,
1179
+ "learning_rate": 2.6463804480967447e-06,
1180
+ "loss": 0.0434,
1181
+ "reward": 0.6875000055879354,
1182
+ "reward_std": 0.2446802221238613,
1183
+ "rewards/accuracy_reward": 0.6875000055879354,
1184
+ "rewards/format_reward": 0.0,
1185
+ "step": 84
1186
+ },
1187
+ {
1188
+ "clip_ratio": 0.0,
1189
+ "completion_length": 572.8750190734863,
1190
+ "epoch": 0.9066666666666666,
1191
+ "grad_norm": 0.05700259283185005,
1192
+ "kl": 0.092803955078125,
1193
+ "learning_rate": 2.6341830260121445e-06,
1194
+ "loss": 0.0154,
1195
+ "reward": 0.583333333954215,
1196
+ "reward_std": 0.25642700120806694,
1197
+ "rewards/accuracy_reward": 0.583333333954215,
1198
+ "rewards/format_reward": 0.0,
1199
+ "step": 85
1200
+ },
1201
+ {
1202
+ "clip_ratio": 0.0,
1203
+ "completion_length": 571.4791870117188,
1204
+ "epoch": 0.9173333333333333,
1205
+ "grad_norm": 0.10524018853902817,
1206
+ "kl": 0.10492706298828125,
1207
+ "learning_rate": 2.6218079275152485e-06,
1208
+ "loss": 0.0464,
1209
+ "reward": 0.5416666734963655,
1210
+ "reward_std": 0.30354244634509087,
1211
+ "rewards/accuracy_reward": 0.5416666734963655,
1212
+ "rewards/format_reward": 0.0,
1213
+ "step": 86
1214
+ },
1215
+ {
1216
+ "clip_ratio": 0.0,
1217
+ "completion_length": 640.2291870117188,
1218
+ "epoch": 0.928,
1219
+ "grad_norm": 0.09200317412614822,
1220
+ "kl": 0.1671142578125,
1221
+ "learning_rate": 2.609257091237699e-06,
1222
+ "loss": 0.0551,
1223
+ "reward": 0.5208333395421505,
1224
+ "reward_std": 0.43655749410390854,
1225
+ "rewards/accuracy_reward": 0.5208333395421505,
1226
+ "rewards/format_reward": 0.0,
1227
+ "step": 87
1228
+ },
1229
+ {
1230
+ "clip_ratio": 0.0,
1231
+ "completion_length": 571.8125190734863,
1232
+ "epoch": 0.9386666666666666,
1233
+ "grad_norm": 0.07907970249652863,
1234
+ "kl": 0.14947509765625,
1235
+ "learning_rate": 2.5965324833414926e-06,
1236
+ "loss": 0.0074,
1237
+ "reward": 0.5416666734963655,
1238
+ "reward_std": 0.3410547934472561,
1239
+ "rewards/accuracy_reward": 0.5416666734963655,
1240
+ "rewards/format_reward": 0.0,
1241
+ "step": 88
1242
+ },
1243
+ {
1244
+ "clip_ratio": 0.0,
1245
+ "completion_length": 658.6458511352539,
1246
+ "epoch": 0.9493333333333334,
1247
+ "grad_norm": 0.07123763114213943,
1248
+ "kl": 0.1113739013671875,
1249
+ "learning_rate": 2.5836360972109642e-06,
1250
+ "loss": 0.0316,
1251
+ "reward": 0.5000000093132257,
1252
+ "reward_std": 0.23116152733564377,
1253
+ "rewards/accuracy_reward": 0.5000000093132257,
1254
+ "rewards/format_reward": 0.0,
1255
+ "step": 89
1256
+ },
1257
+ {
1258
+ "clip_ratio": 0.0,
1259
+ "completion_length": 558.2916831970215,
1260
+ "epoch": 0.96,
1261
+ "grad_norm": 0.09730823338031769,
1262
+ "kl": 0.18788909912109375,
1263
+ "learning_rate": 2.5705699531405174e-06,
1264
+ "loss": 0.0815,
1265
+ "reward": 0.7083333395421505,
1266
+ "reward_std": 0.33057983219623566,
1267
+ "rewards/accuracy_reward": 0.7083333395421505,
1268
+ "rewards/format_reward": 0.0,
1269
+ "step": 90
1270
+ },
1271
+ {
1272
+ "clip_ratio": 0.0,
1273
+ "completion_length": 599.0208587646484,
1274
+ "epoch": 0.9706666666666667,
1275
+ "grad_norm": 0.07070768624544144,
1276
+ "kl": 0.12865447998046875,
1277
+ "learning_rate": 2.55733609801813e-06,
1278
+ "loss": 0.0396,
1279
+ "reward": 0.5000000111758709,
1280
+ "reward_std": 0.3410547822713852,
1281
+ "rewards/accuracy_reward": 0.5000000111758709,
1282
+ "rewards/format_reward": 0.0,
1283
+ "step": 91
1284
+ },
1285
+ {
1286
+ "clip_ratio": 0.0,
1287
+ "completion_length": 516.7916774749756,
1288
+ "epoch": 0.9813333333333333,
1289
+ "grad_norm": 0.06625442951917648,
1290
+ "kl": 0.0931243896484375,
1291
+ "learning_rate": 2.5439366050046985e-06,
1292
+ "loss": -0.0295,
1293
+ "reward": 0.5000000074505806,
1294
+ "reward_std": 0.2957112602889538,
1295
+ "rewards/accuracy_reward": 0.5000000074505806,
1296
+ "rewards/format_reward": 0.0,
1297
+ "step": 92
1298
+ },
1299
+ {
1300
+ "clip_ratio": 0.0,
1301
+ "completion_length": 580.8125076293945,
1302
+ "epoch": 0.992,
1303
+ "grad_norm": 0.15040598809719086,
1304
+ "kl": 0.15094757080078125,
1305
+ "learning_rate": 2.5303735732092655e-06,
1306
+ "loss": 0.1105,
1307
+ "reward": 0.5416666772216558,
1308
+ "reward_std": 0.23116153478622437,
1309
+ "rewards/accuracy_reward": 0.5416666772216558,
1310
+ "rewards/format_reward": 0.0,
1311
+ "step": 93
1312
+ },
1313
+ {
1314
+ "clip_ratio": 0.0,
1315
+ "completion_length": 569.8125190734863,
1316
+ "epoch": 1.0106666666666666,
1317
+ "grad_norm": 0.11118441075086594,
1318
+ "kl": 0.1716766357421875,
1319
+ "learning_rate": 2.51664912736018e-06,
1320
+ "loss": 0.0783,
1321
+ "reward": 0.583333345130086,
1322
+ "reward_std": 0.2861081622540951,
1323
+ "rewards/accuracy_reward": 0.583333345130086,
1324
+ "rewards/format_reward": 0.0,
1325
+ "step": 94
1326
+ },
1327
+ {
1328
+ "clip_ratio": 0.0,
1329
+ "completion_length": 465.70834732055664,
1330
+ "epoch": 1.0213333333333334,
1331
+ "grad_norm": 0.08838524669408798,
1332
+ "kl": 0.093017578125,
1333
+ "learning_rate": 2.5027654174722495e-06,
1334
+ "loss": 0.0275,
1335
+ "reward": 0.6875000186264515,
1336
+ "reward_std": 0.28219257295131683,
1337
+ "rewards/accuracy_reward": 0.6875000186264515,
1338
+ "rewards/format_reward": 0.0,
1339
+ "step": 95
1340
+ },
1341
+ {
1342
+ "clip_ratio": 0.0,
1343
+ "completion_length": 432.81251335144043,
1344
+ "epoch": 1.032,
1345
+ "grad_norm": 0.08520545810461044,
1346
+ "kl": 0.07879638671875,
1347
+ "learning_rate": 2.4887246185099237e-06,
1348
+ "loss": 0.0379,
1349
+ "reward": 0.7083333358168602,
1350
+ "reward_std": 0.26603010296821594,
1351
+ "rewards/accuracy_reward": 0.7083333358168602,
1352
+ "rewards/format_reward": 0.0,
1353
+ "step": 96
1354
+ },
1355
+ {
1356
+ "clip_ratio": 0.0,
1357
+ "completion_length": 499.9791793823242,
1358
+ "epoch": 1.0426666666666666,
1359
+ "grad_norm": 0.07848313450813293,
1360
+ "kl": 0.0831756591796875,
1361
+ "learning_rate": 2.474528930046578e-06,
1362
+ "loss": 0.0461,
1363
+ "reward": 0.6666666772216558,
1364
+ "reward_std": 0.22155842557549477,
1365
+ "rewards/accuracy_reward": 0.6666666772216558,
1366
+ "rewards/format_reward": 0.0,
1367
+ "step": 97
1368
+ },
1369
+ {
1370
+ "clip_ratio": 0.0,
1371
+ "completion_length": 449.45834732055664,
1372
+ "epoch": 1.0533333333333332,
1373
+ "grad_norm": 0.14378738403320312,
1374
+ "kl": 0.0985260009765625,
1375
+ "learning_rate": 2.4601805759199317e-06,
1376
+ "loss": 0.0735,
1377
+ "reward": 0.7708333507180214,
1378
+ "reward_std": 0.35457348078489304,
1379
+ "rewards/accuracy_reward": 0.7708333507180214,
1380
+ "rewards/format_reward": 0.0,
1381
+ "step": 98
1382
+ },
1383
+ {
1384
+ "clip_ratio": 0.0,
1385
+ "completion_length": 703.0625114440918,
1386
+ "epoch": 1.064,
1387
+ "grad_norm": 0.2360164374113083,
1388
+ "kl": 0.1814422607421875,
1389
+ "learning_rate": 2.445681803883678e-06,
1390
+ "loss": 0.0771,
1391
+ "reward": 0.6250000204890966,
1392
+ "reward_std": 0.3332235962152481,
1393
+ "rewards/accuracy_reward": 0.6250000204890966,
1394
+ "rewards/format_reward": 0.0,
1395
+ "step": 99
1396
+ },
1397
+ {
1398
+ "clip_ratio": 0.0,
1399
+ "completion_length": 486.9166889190674,
1400
+ "epoch": 1.0746666666666667,
1401
+ "grad_norm": 0.13772936165332794,
1402
+ "kl": 0.12012481689453125,
1403
+ "learning_rate": 2.4310348852553554e-06,
1404
+ "loss": 0.1204,
1405
+ "reward": 0.6666666772216558,
1406
+ "reward_std": 0.3680921718478203,
1407
+ "rewards/accuracy_reward": 0.6666666772216558,
1408
+ "rewards/format_reward": 0.0,
1409
+ "step": 100
1410
+ },
1411
+ {
1412
+ "clip_ratio": 0.0,
1413
+ "completion_length": 480.7708396911621,
1414
+ "epoch": 1.0853333333333333,
1415
+ "grad_norm": 0.15142787992954254,
1416
+ "kl": 0.169891357421875,
1417
+ "learning_rate": 2.4162421145605308e-06,
1418
+ "loss": 0.033,
1419
+ "reward": 0.7291666753590107,
1420
+ "reward_std": 0.21764283254742622,
1421
+ "rewards/accuracy_reward": 0.7291666753590107,
1422
+ "rewards/format_reward": 0.0,
1423
+ "step": 101
1424
+ },
1425
+ {
1426
+ "clip_ratio": 0.0,
1427
+ "completion_length": 586.4375114440918,
1428
+ "epoch": 1.096,
1429
+ "grad_norm": 0.27943626046180725,
1430
+ "kl": 0.2178497314453125,
1431
+ "learning_rate": 2.4013058091733546e-06,
1432
+ "loss": 0.0708,
1433
+ "reward": 0.541666679084301,
1434
+ "reward_std": 0.23116152733564377,
1435
+ "rewards/accuracy_reward": 0.541666679084301,
1436
+ "rewards/format_reward": 0.0,
1437
+ "step": 102
1438
+ },
1439
+ {
1440
+ "clip_ratio": 0.0,
1441
+ "completion_length": 508.4583396911621,
1442
+ "epoch": 1.1066666666666667,
1443
+ "grad_norm": 0.8309665322303772,
1444
+ "kl": 0.48883056640625,
1445
+ "learning_rate": 2.3862283089535265e-06,
1446
+ "loss": 0.1714,
1447
+ "reward": 0.6250000242143869,
1448
+ "reward_std": 0.45271996036171913,
1449
+ "rewards/accuracy_reward": 0.6250000242143869,
1450
+ "rewards/format_reward": 0.0,
1451
+ "step": 103
1452
+ },
1453
+ {
1454
+ "clip_ratio": 0.0,
1455
+ "completion_length": 552.9583473205566,
1456
+ "epoch": 1.1173333333333333,
1457
+ "grad_norm": 32.438201904296875,
1458
+ "kl": 7.4153289794921875,
1459
+ "learning_rate": 2.371011975879742e-06,
1460
+ "loss": 0.4224,
1461
+ "reward": 0.7291666753590107,
1462
+ "reward_std": 0.21764283627271652,
1463
+ "rewards/accuracy_reward": 0.7291666753590107,
1464
+ "rewards/format_reward": 0.0,
1465
+ "step": 104
1466
+ },
1467
+ {
1468
+ "clip_ratio": 0.0,
1469
+ "completion_length": 584.7708473205566,
1470
+ "epoch": 1.1280000000000001,
1471
+ "grad_norm": 0.9769695401191711,
1472
+ "kl": 1.2292022705078125,
1473
+ "learning_rate": 2.3556591936796777e-06,
1474
+ "loss": 0.2518,
1475
+ "reward": 0.645833345130086,
1476
+ "reward_std": 0.36417657881975174,
1477
+ "rewards/accuracy_reward": 0.645833345130086,
1478
+ "rewards/format_reward": 0.0,
1479
+ "step": 105
1480
+ },
1481
+ {
1482
+ "clip_ratio": 0.0,
1483
+ "completion_length": 521.3333511352539,
1484
+ "epoch": 1.1386666666666667,
1485
+ "grad_norm": 0.9792843461036682,
1486
+ "kl": 0.8870162963867188,
1487
+ "learning_rate": 2.340172367456564e-06,
1488
+ "loss": 0.1476,
1489
+ "reward": 0.7083333469927311,
1490
+ "reward_std": 0.3776952736079693,
1491
+ "rewards/accuracy_reward": 0.7083333469927311,
1492
+ "rewards/format_reward": 0.0,
1493
+ "step": 106
1494
+ },
1495
+ {
1496
+ "clip_ratio": 0.0,
1497
+ "completion_length": 547.5000190734863,
1498
+ "epoch": 1.1493333333333333,
1499
+ "grad_norm": 168.53076171875,
1500
+ "kl": 22.269760131835938,
1501
+ "learning_rate": 2.3245539233124133e-06,
1502
+ "loss": 1.5006,
1503
+ "reward": 0.6041666846722364,
1504
+ "reward_std": 0.33713918924331665,
1505
+ "rewards/accuracy_reward": 0.6041666846722364,
1506
+ "rewards/format_reward": 0.0,
1507
+ "step": 107
1508
+ },
1509
+ {
1510
+ "clip_ratio": 0.0,
1511
+ "completion_length": 455.93750953674316,
1512
+ "epoch": 1.16,
1513
+ "grad_norm": 10.638311386108398,
1514
+ "kl": 8.11297607421875,
1515
+ "learning_rate": 2.308806307967955e-06,
1516
+ "loss": 0.4543,
1517
+ "reward": 0.7291666772216558,
1518
+ "reward_std": 0.2900237515568733,
1519
+ "rewards/accuracy_reward": 0.7291666772216558,
1520
+ "rewards/format_reward": 0.0,
1521
+ "step": 108
1522
+ },
1523
+ {
1524
+ "clip_ratio": 0.0,
1525
+ "completion_length": 600.3958549499512,
1526
+ "epoch": 1.1706666666666667,
1527
+ "grad_norm": 11.44261646270752,
1528
+ "kl": 7.8447265625,
1529
+ "learning_rate": 2.2929319883793442e-06,
1530
+ "loss": 0.5332,
1531
+ "reward": 0.666666679084301,
1532
+ "reward_std": 0.23116152733564377,
1533
+ "rewards/accuracy_reward": 0.666666679084301,
1534
+ "rewards/format_reward": 0.0,
1535
+ "step": 109
1536
+ },
1537
+ {
1538
+ "clip_ratio": 0.0,
1539
+ "completion_length": 565.8333530426025,
1540
+ "epoch": 1.1813333333333333,
1541
+ "grad_norm": 1.495950698852539,
1542
+ "kl": 2.2734375,
1543
+ "learning_rate": 2.276933451351696e-06,
1544
+ "loss": 0.1701,
1545
+ "reward": 0.6666666809469461,
1546
+ "reward_std": 0.3506578840315342,
1547
+ "rewards/accuracy_reward": 0.6666666809469461,
1548
+ "rewards/format_reward": 0.0,
1549
+ "step": 110
1550
+ },
1551
+ {
1552
+ "clip_ratio": 0.0,
1553
+ "completion_length": 545.2083549499512,
1554
+ "epoch": 1.192,
1555
+ "grad_norm": 2.101208448410034,
1556
+ "kl": 2.087677001953125,
1557
+ "learning_rate": 2.2608132031495184e-06,
1558
+ "loss": 0.1528,
1559
+ "reward": 0.5833333488553762,
1560
+ "reward_std": 0.20412414520978928,
1561
+ "rewards/accuracy_reward": 0.5833333488553762,
1562
+ "rewards/format_reward": 0.0,
1563
+ "step": 111
1564
+ },
1565
+ {
1566
+ "clip_ratio": 0.0,
1567
+ "completion_length": 518.5000171661377,
1568
+ "epoch": 1.2026666666666666,
1569
+ "grad_norm": 1.4472161531448364,
1570
+ "kl": 0.91241455078125,
1571
+ "learning_rate": 2.244573769104084e-06,
1572
+ "loss": 0.1028,
1573
+ "reward": 0.6875000204890966,
1574
+ "reward_std": 0.40168891847133636,
1575
+ "rewards/accuracy_reward": 0.6875000204890966,
1576
+ "rewards/format_reward": 0.0,
1577
+ "step": 112
1578
+ },
1579
+ {
1580
+ "clip_ratio": 0.0,
1581
+ "completion_length": 516.2083435058594,
1582
+ "epoch": 1.2133333333333334,
1583
+ "grad_norm": 0.677949845790863,
1584
+ "kl": 0.6656951904296875,
1585
+ "learning_rate": 2.228217693217826e-06,
1586
+ "loss": 0.0863,
1587
+ "reward": 0.6875000149011612,
1588
+ "reward_std": 0.2996268570423126,
1589
+ "rewards/accuracy_reward": 0.6875000149011612,
1590
+ "rewards/format_reward": 0.0,
1591
+ "step": 113
1592
+ },
1593
+ {
1594
+ "clip_ratio": 0.0,
1595
+ "completion_length": 509.60418128967285,
1596
+ "epoch": 1.224,
1597
+ "grad_norm": 0.534664511680603,
1598
+ "kl": 0.5305023193359375,
1599
+ "learning_rate": 2.211747537765808e-06,
1600
+ "loss": 0.0607,
1601
+ "reward": 0.6875000186264515,
1602
+ "reward_std": 0.31970490142703056,
1603
+ "rewards/accuracy_reward": 0.6875000186264515,
1604
+ "rewards/format_reward": 0.0,
1605
+ "step": 114
1606
+ },
1607
+ {
1608
+ "clip_ratio": 0.0,
1609
+ "completion_length": 477.6666793823242,
1610
+ "epoch": 1.2346666666666666,
1611
+ "grad_norm": 0.6869253516197205,
1612
+ "kl": 1.214813232421875,
1613
+ "learning_rate": 2.195165882894322e-06,
1614
+ "loss": 0.0821,
1615
+ "reward": 0.8541666865348816,
1616
+ "reward_std": 0.28219256550073624,
1617
+ "rewards/accuracy_reward": 0.8541666865348816,
1618
+ "rewards/format_reward": 0.0,
1619
+ "step": 115
1620
+ },
1621
+ {
1622
+ "clip_ratio": 0.0,
1623
+ "completion_length": 644.3958587646484,
1624
+ "epoch": 1.2453333333333334,
1625
+ "grad_norm": 0.5632476210594177,
1626
+ "kl": 1.506103515625,
1627
+ "learning_rate": 2.1784753262166986e-06,
1628
+ "loss": 0.1124,
1629
+ "reward": 0.416666679084301,
1630
+ "reward_std": 0.31314554810523987,
1631
+ "rewards/accuracy_reward": 0.416666679084301,
1632
+ "rewards/format_reward": 0.0,
1633
+ "step": 116
1634
+ },
1635
+ {
1636
+ "clip_ratio": 0.0,
1637
+ "completion_length": 519.7500152587891,
1638
+ "epoch": 1.256,
1639
+ "grad_norm": 0.8980614542961121,
1640
+ "kl": 1.355926513671875,
1641
+ "learning_rate": 2.161678482406374e-06,
1642
+ "loss": 0.1538,
1643
+ "reward": 0.6666666753590107,
1644
+ "reward_std": 0.24859581515192986,
1645
+ "rewards/accuracy_reward": 0.6666666753590107,
1646
+ "rewards/format_reward": 0.0,
1647
+ "step": 117
1648
+ },
1649
+ {
1650
+ "clip_ratio": 0.0,
1651
+ "completion_length": 610.4375152587891,
1652
+ "epoch": 1.2666666666666666,
1653
+ "grad_norm": 0.5385753512382507,
1654
+ "kl": 0.8503570556640625,
1655
+ "learning_rate": 2.144777982787286e-06,
1656
+ "loss": 0.0987,
1657
+ "reward": 0.5625000223517418,
1658
+ "reward_std": 0.34674229472875595,
1659
+ "rewards/accuracy_reward": 0.5625000223517418,
1660
+ "rewards/format_reward": 0.0,
1661
+ "step": 118
1662
+ },
1663
+ {
1664
+ "clip_ratio": 0.0,
1665
+ "completion_length": 460.2708435058594,
1666
+ "epoch": 1.2773333333333334,
1667
+ "grad_norm": 0.40609875321388245,
1668
+ "kl": 0.885009765625,
1669
+ "learning_rate": 2.127776474921661e-06,
1670
+ "loss": 0.1355,
1671
+ "reward": 0.8958333432674408,
1672
+ "reward_std": 0.1801304928958416,
1673
+ "rewards/accuracy_reward": 0.8958333432674408,
1674
+ "rewards/format_reward": 0.0,
1675
+ "step": 119
1676
+ },
1677
+ {
1678
+ "clip_ratio": 0.0,
1679
+ "completion_length": 682.7500152587891,
1680
+ "epoch": 1.288,
1681
+ "grad_norm": 1.9950181245803833,
1682
+ "kl": 2.8668365478515625,
1683
+ "learning_rate": 2.1106766221952607e-06,
1684
+ "loss": 0.2645,
1685
+ "reward": 0.5208333507180214,
1686
+ "reward_std": 0.37377968057990074,
1687
+ "rewards/accuracy_reward": 0.5208333507180214,
1688
+ "rewards/format_reward": 0.0,
1689
+ "step": 120
1690
+ },
1691
+ {
1692
+ "clip_ratio": 0.0,
1693
+ "completion_length": 571.6875152587891,
1694
+ "epoch": 1.2986666666666666,
1695
+ "grad_norm": 4.098674297332764,
1696
+ "kl": 2.38665771484375,
1697
+ "learning_rate": 2.0934811034001427e-06,
1698
+ "loss": 0.2873,
1699
+ "reward": 0.7083333563059568,
1700
+ "reward_std": 0.3881702311336994,
1701
+ "rewards/accuracy_reward": 0.7083333563059568,
1702
+ "rewards/format_reward": 0.0,
1703
+ "step": 121
1704
+ },
1705
+ {
1706
+ "clip_ratio": 0.0,
1707
+ "completion_length": 525.354190826416,
1708
+ "epoch": 1.3093333333333335,
1709
+ "grad_norm": 0.361176073551178,
1710
+ "kl": 1.3050384521484375,
1711
+ "learning_rate": 2.0761926123150166e-06,
1712
+ "loss": 0.0896,
1713
+ "reward": 0.6250000223517418,
1714
+ "reward_std": 0.2686738707125187,
1715
+ "rewards/accuracy_reward": 0.6250000223517418,
1716
+ "rewards/format_reward": 0.0,
1717
+ "step": 122
1718
+ },
1719
+ {
1720
+ "clip_ratio": 0.0,
1721
+ "completion_length": 679.2500152587891,
1722
+ "epoch": 1.32,
1723
+ "grad_norm": 0.4487684965133667,
1724
+ "kl": 1.046875,
1725
+ "learning_rate": 2.058813857283244e-06,
1726
+ "loss": 0.159,
1727
+ "reward": 0.5416666809469461,
1728
+ "reward_std": 0.3506578877568245,
1729
+ "rewards/accuracy_reward": 0.5416666809469461,
1730
+ "rewards/format_reward": 0.0,
1731
+ "step": 123
1732
+ },
1733
+ {
1734
+ "clip_ratio": 0.0,
1735
+ "completion_length": 574.8958435058594,
1736
+ "epoch": 1.3306666666666667,
1737
+ "grad_norm": 1.1202152967453003,
1738
+ "kl": 1.6433334350585938,
1739
+ "learning_rate": 2.041347560788562e-06,
1740
+ "loss": 0.2923,
1741
+ "reward": 0.6041666902601719,
1742
+ "reward_std": 0.40168892592191696,
1743
+ "rewards/accuracy_reward": 0.6041666902601719,
1744
+ "rewards/format_reward": 0.0,
1745
+ "step": 124
1746
+ },
1747
+ {
1748
+ "clip_ratio": 0.0,
1749
+ "completion_length": 678.3333511352539,
1750
+ "epoch": 1.3413333333333333,
1751
+ "grad_norm": 1.3484364748001099,
1752
+ "kl": 3.1891632080078125,
1753
+ "learning_rate": 2.0237964590285924e-06,
1754
+ "loss": 0.1732,
1755
+ "reward": 0.604166679084301,
1756
+ "reward_std": 0.309229951351881,
1757
+ "rewards/accuracy_reward": 0.604166679084301,
1758
+ "rewards/format_reward": 0.0,
1759
+ "step": 125
1760
+ },
1761
+ {
1762
+ "clip_ratio": 0.0,
1763
+ "completion_length": 569.7708435058594,
1764
+ "epoch": 1.3519999999999999,
1765
+ "grad_norm": 0.6488833427429199,
1766
+ "kl": 3.36163330078125,
1767
+ "learning_rate": 2.0061633014861975e-06,
1768
+ "loss": 0.3744,
1769
+ "reward": 0.5625000204890966,
1770
+ "reward_std": 0.40168892592191696,
1771
+ "rewards/accuracy_reward": 0.5625000204890966,
1772
+ "rewards/format_reward": 0.0,
1773
+ "step": 126
1774
+ },
1775
+ {
1776
+ "clip_ratio": 0.0,
1777
+ "completion_length": 544.5416870117188,
1778
+ "epoch": 1.3626666666666667,
1779
+ "grad_norm": 0.911536455154419,
1780
+ "kl": 2.595245361328125,
1781
+ "learning_rate": 1.988450850498758e-06,
1782
+ "loss": 0.1733,
1783
+ "reward": 0.5208333432674408,
1784
+ "reward_std": 0.1705273948609829,
1785
+ "rewards/accuracy_reward": 0.5208333432674408,
1786
+ "rewards/format_reward": 0.0,
1787
+ "step": 127
1788
+ },
1789
+ {
1790
+ "clip_ratio": 0.0,
1791
+ "completion_length": 692.4375152587891,
1792
+ "epoch": 1.3733333333333333,
1793
+ "grad_norm": 0.41733741760253906,
1794
+ "kl": 1.950531005859375,
1795
+ "learning_rate": 1.970661880825437e-06,
1796
+ "loss": 0.138,
1797
+ "reward": 0.29166667349636555,
1798
+ "reward_std": 0.31314554810523987,
1799
+ "rewards/accuracy_reward": 0.29166667349636555,
1800
+ "rewards/format_reward": 0.0,
1801
+ "step": 128
1802
+ },
1803
+ {
1804
+ "clip_ratio": 0.0,
1805
+ "completion_length": 605.8541870117188,
1806
+ "epoch": 1.384,
1807
+ "grad_norm": 0.48099005222320557,
1808
+ "kl": 1.07232666015625,
1809
+ "learning_rate": 1.952799179212498e-06,
1810
+ "loss": 0.1656,
1811
+ "reward": 0.5833333469927311,
1812
+ "reward_std": 0.4152076169848442,
1813
+ "rewards/accuracy_reward": 0.5833333469927311,
1814
+ "rewards/format_reward": 0.0,
1815
+ "step": 129
1816
+ },
1817
+ {
1818
+ "clip_ratio": 0.0,
1819
+ "completion_length": 450.8333435058594,
1820
+ "epoch": 1.3946666666666667,
1821
+ "grad_norm": 1.2475286722183228,
1822
+ "kl": 0.4179840087890625,
1823
+ "learning_rate": 1.934865543956745e-06,
1824
+ "loss": 0.0396,
1825
+ "reward": 0.6666666772216558,
1826
+ "reward_std": 0.3680921755731106,
1827
+ "rewards/accuracy_reward": 0.6666666772216558,
1828
+ "rewards/format_reward": 0.0,
1829
+ "step": 130
1830
+ },
1831
+ {
1832
+ "clip_ratio": 0.0,
1833
+ "completion_length": 664.2708549499512,
1834
+ "epoch": 1.4053333333333333,
1835
+ "grad_norm": 1.1826740503311157,
1836
+ "kl": 1.00048828125,
1837
+ "learning_rate": 1.916863784467152e-06,
1838
+ "loss": 0.1431,
1839
+ "reward": 0.500000013038516,
1840
+ "reward_std": 0.4326419048011303,
1841
+ "rewards/accuracy_reward": 0.500000013038516,
1842
+ "rewards/format_reward": 0.0,
1843
+ "step": 131
1844
+ },
1845
+ {
1846
+ "clip_ratio": 0.0,
1847
+ "completion_length": 739.3750228881836,
1848
+ "epoch": 1.416,
1849
+ "grad_norm": 1.281339168548584,
1850
+ "kl": 1.94189453125,
1851
+ "learning_rate": 1.8987967208247542e-06,
1852
+ "loss": 0.2172,
1853
+ "reward": 0.5625000093132257,
1854
+ "reward_std": 0.43655749410390854,
1855
+ "rewards/accuracy_reward": 0.5625000093132257,
1856
+ "rewards/format_reward": 0.0,
1857
+ "step": 132
1858
+ },
1859
+ {
1860
+ "clip_ratio": 0.0,
1861
+ "completion_length": 547.166690826416,
1862
+ "epoch": 1.4266666666666667,
1863
+ "grad_norm": 0.7654764652252197,
1864
+ "kl": 2.1027374267578125,
1865
+ "learning_rate": 1.8806671833408633e-06,
1866
+ "loss": 0.2557,
1867
+ "reward": 0.7083333507180214,
1868
+ "reward_std": 0.2861081548035145,
1869
+ "rewards/accuracy_reward": 0.7083333507180214,
1870
+ "rewards/format_reward": 0.0,
1871
+ "step": 133
1872
+ },
1873
+ {
1874
+ "clip_ratio": 0.0,
1875
+ "completion_length": 580.0833511352539,
1876
+ "epoch": 1.4373333333333334,
1877
+ "grad_norm": 1.4135154485702515,
1878
+ "kl": 4.193695068359375,
1879
+ "learning_rate": 1.8624780121136837e-06,
1880
+ "loss": 0.3781,
1881
+ "reward": 0.6250000111758709,
1882
+ "reward_std": 0.3506578877568245,
1883
+ "rewards/accuracy_reward": 0.6250000111758709,
1884
+ "rewards/format_reward": 0.0,
1885
+ "step": 134
1886
+ },
1887
+ {
1888
+ "clip_ratio": 0.0,
1889
+ "completion_length": 592.7916870117188,
1890
+ "epoch": 1.448,
1891
+ "grad_norm": 3.319873094558716,
1892
+ "kl": 4.4842376708984375,
1893
+ "learning_rate": 1.8442320565833972e-06,
1894
+ "loss": 0.2485,
1895
+ "reward": 0.5833333469927311,
1896
+ "reward_std": 0.2686738781630993,
1897
+ "rewards/accuracy_reward": 0.5833333469927311,
1898
+ "rewards/format_reward": 0.0,
1899
+ "step": 135
1900
+ },
1901
+ {
1902
+ "clip_ratio": 0.0,
1903
+ "completion_length": 589.5416831970215,
1904
+ "epoch": 1.4586666666666668,
1905
+ "grad_norm": 1.7027231454849243,
1906
+ "kl": 3.660552978515625,
1907
+ "learning_rate": 1.8259321750857772e-06,
1908
+ "loss": 0.2412,
1909
+ "reward": 0.6041666772216558,
1910
+ "reward_std": 0.2996268533170223,
1911
+ "rewards/accuracy_reward": 0.6041666772216558,
1912
+ "rewards/format_reward": 0.0,
1913
+ "step": 136
1914
+ },
1915
+ {
1916
+ "clip_ratio": 0.0,
1917
+ "completion_length": 615.9791831970215,
1918
+ "epoch": 1.4693333333333334,
1919
+ "grad_norm": 0.6865854859352112,
1920
+ "kl": 2.9984588623046875,
1921
+ "learning_rate": 1.8075812344044163e-06,
1922
+ "loss": 0.3306,
1923
+ "reward": 0.5000000167638063,
1924
+ "reward_std": 0.4893604479730129,
1925
+ "rewards/accuracy_reward": 0.5000000167638063,
1926
+ "rewards/format_reward": 0.0,
1927
+ "step": 137
1928
+ },
1929
+ {
1930
+ "clip_ratio": 0.0,
1931
+ "completion_length": 529.458345413208,
1932
+ "epoch": 1.48,
1933
+ "grad_norm": 0.3792395293712616,
1934
+ "kl": 1.3320465087890625,
1935
+ "learning_rate": 1.7891821093216275e-06,
1936
+ "loss": 0.1501,
1937
+ "reward": 0.6875000111758709,
1938
+ "reward_std": 0.2350771203637123,
1939
+ "rewards/accuracy_reward": 0.6875000111758709,
1940
+ "rewards/format_reward": 0.0,
1941
+ "step": 138
1942
+ },
1943
+ {
1944
+ "clip_ratio": 0.0,
1945
+ "completion_length": 693.7708473205566,
1946
+ "epoch": 1.4906666666666666,
1947
+ "grad_norm": 0.5869024991989136,
1948
+ "kl": 1.708587646484375,
1949
+ "learning_rate": 1.770737682168091e-06,
1950
+ "loss": 0.1275,
1951
+ "reward": 0.5833333414047956,
1952
+ "reward_std": 0.30354244634509087,
1953
+ "rewards/accuracy_reward": 0.5833333414047956,
1954
+ "rewards/format_reward": 0.0,
1955
+ "step": 139
1956
+ },
1957
+ {
1958
+ "clip_ratio": 0.0,
1959
+ "completion_length": 493.7291831970215,
1960
+ "epoch": 1.5013333333333332,
1961
+ "grad_norm": 0.7076964378356934,
1962
+ "kl": 0.84979248046875,
1963
+ "learning_rate": 1.7522508423713243e-06,
1964
+ "loss": 0.1598,
1965
+ "reward": 0.7083333432674408,
1966
+ "reward_std": 0.24859581887722015,
1967
+ "rewards/accuracy_reward": 0.7083333432674408,
1968
+ "rewards/format_reward": 0.0,
1969
+ "step": 140
1970
+ },
1971
+ {
1972
+ "clip_ratio": 0.0,
1973
+ "completion_length": 595.916690826416,
1974
+ "epoch": 1.512,
1975
+ "grad_norm": 1.1425637006759644,
1976
+ "kl": 0.530303955078125,
1977
+ "learning_rate": 1.7337244860030312e-06,
1978
+ "loss": 0.1132,
1979
+ "reward": 0.5833333432674408,
1980
+ "reward_std": 0.25819891691207886,
1981
+ "rewards/accuracy_reward": 0.5833333432674408,
1982
+ "rewards/format_reward": 0.0,
1983
+ "step": 141
1984
+ },
1985
+ {
1986
+ "clip_ratio": 0.0,
1987
+ "completion_length": 609.1041831970215,
1988
+ "epoch": 1.5226666666666666,
1989
+ "grad_norm": 0.8295446634292603,
1990
+ "kl": 1.3100128173828125,
1991
+ "learning_rate": 1.7151615153254192e-06,
1992
+ "loss": 0.193,
1993
+ "reward": 0.645833345130086,
1994
+ "reward_std": 0.37377968430519104,
1995
+ "rewards/accuracy_reward": 0.645833345130086,
1996
+ "rewards/format_reward": 0.0,
1997
+ "step": 142
1998
+ },
1999
+ {
2000
+ "clip_ratio": 0.0,
2001
+ "completion_length": 575.9791870117188,
2002
+ "epoch": 1.5333333333333332,
2003
+ "grad_norm": 1.1884087324142456,
2004
+ "kl": 1.55706787109375,
2005
+ "learning_rate": 1.6965648383365416e-06,
2006
+ "loss": 0.1849,
2007
+ "reward": 0.7500000186264515,
2008
+ "reward_std": 0.3506578840315342,
2009
+ "rewards/accuracy_reward": 0.7500000186264515,
2010
+ "rewards/format_reward": 0.0,
2011
+ "step": 143
2012
+ },
2013
+ {
2014
+ "clip_ratio": 0.0,
2015
+ "completion_length": 521.9166831970215,
2016
+ "epoch": 1.544,
2017
+ "grad_norm": 0.3929750621318817,
2018
+ "kl": 1.7193450927734375,
2019
+ "learning_rate": 1.6779373683147423e-06,
2020
+ "loss": 0.1654,
2021
+ "reward": 0.6666666734963655,
2022
+ "reward_std": 0.30354244634509087,
2023
+ "rewards/accuracy_reward": 0.6666666734963655,
2024
+ "rewards/format_reward": 0.0,
2025
+ "step": 144
2026
+ },
2027
+ {
2028
+ "clip_ratio": 0.0,
2029
+ "completion_length": 621.5625152587891,
2030
+ "epoch": 1.5546666666666666,
2031
+ "grad_norm": 0.9022945165634155,
2032
+ "kl": 3.4391937255859375,
2033
+ "learning_rate": 1.6592820233622743e-06,
2034
+ "loss": 0.269,
2035
+ "reward": 0.5416666883975267,
2036
+ "reward_std": 0.3977733254432678,
2037
+ "rewards/accuracy_reward": 0.5416666883975267,
2038
+ "rewards/format_reward": 0.0,
2039
+ "step": 145
2040
+ },
2041
+ {
2042
+ "clip_ratio": 0.0,
2043
+ "completion_length": 637.4583435058594,
2044
+ "epoch": 1.5653333333333332,
2045
+ "grad_norm": 3.3849687576293945,
2046
+ "kl": 6.964111328125,
2047
+ "learning_rate": 1.6406017259481624e-06,
2048
+ "loss": 0.5442,
2049
+ "reward": 0.6041666809469461,
2050
+ "reward_std": 0.41912321373820305,
2051
+ "rewards/accuracy_reward": 0.6041666809469461,
2052
+ "rewards/format_reward": 0.0,
2053
+ "step": 146
2054
+ },
2055
+ {
2056
+ "clip_ratio": 0.0,
2057
+ "completion_length": 619.9583587646484,
2058
+ "epoch": 1.576,
2059
+ "grad_norm": 1.0483787059783936,
2060
+ "kl": 2.7703628540039062,
2061
+ "learning_rate": 1.621899402450379e-06,
2062
+ "loss": 0.2715,
2063
+ "reward": 0.708333358168602,
2064
+ "reward_std": 0.3332235962152481,
2065
+ "rewards/accuracy_reward": 0.708333358168602,
2066
+ "rewards/format_reward": 0.0,
2067
+ "step": 147
2068
+ },
2069
+ {
2070
+ "clip_ratio": 0.0,
2071
+ "completion_length": 568.8750152587891,
2072
+ "epoch": 1.5866666666666667,
2073
+ "grad_norm": 1.4388060569763184,
2074
+ "kl": 3.212860107421875,
2075
+ "learning_rate": 1.6031779826974138e-06,
2076
+ "loss": 0.2381,
2077
+ "reward": 0.6458333358168602,
2078
+ "reward_std": 0.19756478071212769,
2079
+ "rewards/accuracy_reward": 0.6458333358168602,
2080
+ "rewards/format_reward": 0.0,
2081
+ "step": 148
2082
+ },
2083
+ {
2084
+ "clip_ratio": 0.0,
2085
+ "completion_length": 632.5416793823242,
2086
+ "epoch": 1.5973333333333333,
2087
+ "grad_norm": 0.9448708295822144,
2088
+ "kl": 3.631927490234375,
2089
+ "learning_rate": 1.5844403995092944e-06,
2090
+ "loss": 0.3215,
2091
+ "reward": 0.500000013038516,
2092
+ "reward_std": 0.49719163402915,
2093
+ "rewards/accuracy_reward": 0.500000013038516,
2094
+ "rewards/format_reward": 0.0,
2095
+ "step": 149
2096
+ },
2097
+ {
2098
+ "clip_ratio": 0.0,
2099
+ "completion_length": 613.2500114440918,
2100
+ "epoch": 1.608,
2101
+ "grad_norm": 0.7443394660949707,
2102
+ "kl": 2.036407470703125,
2103
+ "learning_rate": 1.5656895882381465e-06,
2104
+ "loss": 0.1928,
2105
+ "reward": 0.5000000093132257,
2106
+ "reward_std": 0.23116153106093407,
2107
+ "rewards/accuracy_reward": 0.5000000093132257,
2108
+ "rewards/format_reward": 0.0,
2109
+ "step": 150
2110
+ },
2111
+ {
2112
+ "clip_ratio": 0.0,
2113
+ "completion_length": 672.9583511352539,
2114
+ "epoch": 1.6186666666666667,
2115
+ "grad_norm": 0.6227521300315857,
2116
+ "kl": 2.090057373046875,
2117
+ "learning_rate": 1.5469284863083523e-06,
2118
+ "loss": 0.1868,
2119
+ "reward": 0.5625000167638063,
2120
+ "reward_std": 0.34674230217933655,
2121
+ "rewards/accuracy_reward": 0.5625000167638063,
2122
+ "rewards/format_reward": 0.0,
2123
+ "step": 151
2124
+ },
2125
+ {
2126
+ "clip_ratio": 0.0,
2127
+ "completion_length": 473.458345413208,
2128
+ "epoch": 1.6293333333333333,
2129
+ "grad_norm": 1.2505531311035156,
2130
+ "kl": 0.9958038330078125,
2131
+ "learning_rate": 1.5281600327563853e-06,
2132
+ "loss": 0.2341,
2133
+ "reward": 0.7500000223517418,
2134
+ "reward_std": 0.2686738707125187,
2135
+ "rewards/accuracy_reward": 0.7500000223517418,
2136
+ "rewards/format_reward": 0.0,
2137
+ "step": 152
2138
+ },
2139
+ {
2140
+ "clip_ratio": 0.0,
2141
+ "completion_length": 602.1250228881836,
2142
+ "epoch": 1.6400000000000001,
2143
+ "grad_norm": 0.2619081139564514,
2144
+ "kl": 0.5251922607421875,
2145
+ "learning_rate": 1.5093871677703947e-06,
2146
+ "loss": 0.0727,
2147
+ "reward": 0.6458333469927311,
2148
+ "reward_std": 0.2996268533170223,
2149
+ "rewards/accuracy_reward": 0.6458333469927311,
2150
+ "rewards/format_reward": 0.0,
2151
+ "step": 153
2152
+ },
2153
+ {
2154
+ "clip_ratio": 0.0,
2155
+ "completion_length": 698.1250190734863,
2156
+ "epoch": 1.6506666666666665,
2157
+ "grad_norm": 0.3198845386505127,
2158
+ "kl": 1.6552276611328125,
2159
+ "learning_rate": 1.4906128322296056e-06,
2160
+ "loss": 0.1584,
2161
+ "reward": 0.45833333767950535,
2162
+ "reward_std": 0.31314554810523987,
2163
+ "rewards/accuracy_reward": 0.45833333767950535,
2164
+ "rewards/format_reward": 0.0,
2165
+ "step": 154
2166
+ },
2167
+ {
2168
+ "clip_ratio": 0.0,
2169
+ "completion_length": 616.2916793823242,
2170
+ "epoch": 1.6613333333333333,
2171
+ "grad_norm": 0.6926825046539307,
2172
+ "kl": 1.0956878662109375,
2173
+ "learning_rate": 1.471839967243615e-06,
2174
+ "loss": 0.1899,
2175
+ "reward": 0.43750000931322575,
2176
+ "reward_std": 0.2996268570423126,
2177
+ "rewards/accuracy_reward": 0.43750000931322575,
2178
+ "rewards/format_reward": 0.0,
2179
+ "step": 155
2180
+ },
2181
+ {
2182
+ "clip_ratio": 0.0,
2183
+ "completion_length": 627.5208511352539,
2184
+ "epoch": 1.6720000000000002,
2185
+ "grad_norm": 0.5720909237861633,
2186
+ "kl": 1.5909881591796875,
2187
+ "learning_rate": 1.453071513691648e-06,
2188
+ "loss": 0.115,
2189
+ "reward": 0.4375000074505806,
2190
+ "reward_std": 0.2621145099401474,
2191
+ "rewards/accuracy_reward": 0.4375000074505806,
2192
+ "rewards/format_reward": 0.0,
2193
+ "step": 156
2194
+ },
2195
+ {
2196
+ "clip_ratio": 0.0,
2197
+ "completion_length": 598.5625114440918,
2198
+ "epoch": 1.6826666666666665,
2199
+ "grad_norm": 1.2804419994354248,
2200
+ "kl": 2.0683746337890625,
2201
+ "learning_rate": 1.4343104117618536e-06,
2202
+ "loss": 0.1199,
2203
+ "reward": 0.5000000037252903,
2204
+ "reward_std": 0.16661180183291435,
2205
+ "rewards/accuracy_reward": 0.5000000037252903,
2206
+ "rewards/format_reward": 0.0,
2207
+ "step": 157
2208
+ },
2209
+ {
2210
+ "clip_ratio": 0.0,
2211
+ "completion_length": 465.5833435058594,
2212
+ "epoch": 1.6933333333333334,
2213
+ "grad_norm": 0.46794331073760986,
2214
+ "kl": 1.4733734130859375,
2215
+ "learning_rate": 1.415559600490706e-06,
2216
+ "loss": 0.103,
2217
+ "reward": 0.750000013038516,
2218
+ "reward_std": 0.2861081548035145,
2219
+ "rewards/accuracy_reward": 0.750000013038516,
2220
+ "rewards/format_reward": 0.0,
2221
+ "step": 158
2222
+ },
2223
+ {
2224
+ "clip_ratio": 0.0,
2225
+ "completion_length": 636.3958549499512,
2226
+ "epoch": 1.704,
2227
+ "grad_norm": 0.5448073744773865,
2228
+ "kl": 1.9481201171875,
2229
+ "learning_rate": 1.3968220173025865e-06,
2230
+ "loss": 0.1902,
2231
+ "reward": 0.5000000037252903,
2232
+ "reward_std": 0.19364918768405914,
2233
+ "rewards/accuracy_reward": 0.5000000037252903,
2234
+ "rewards/format_reward": 0.0,
2235
+ "step": 159
2236
+ },
2237
+ {
2238
+ "clip_ratio": 0.0,
2239
+ "completion_length": 693.0833473205566,
2240
+ "epoch": 1.7146666666666666,
2241
+ "grad_norm": 0.9531773328781128,
2242
+ "kl": 1.371734619140625,
2243
+ "learning_rate": 1.3781005975496212e-06,
2244
+ "loss": 0.1587,
2245
+ "reward": 0.5208333469927311,
2246
+ "reward_std": 0.3092299550771713,
2247
+ "rewards/accuracy_reward": 0.5208333469927311,
2248
+ "rewards/format_reward": 0.0,
2249
+ "step": 160
2250
+ },
2251
+ {
2252
+ "clip_ratio": 0.0,
2253
+ "completion_length": 582.9583549499512,
2254
+ "epoch": 1.7253333333333334,
2255
+ "grad_norm": 0.9278988242149353,
2256
+ "kl": 1.347991943359375,
2257
+ "learning_rate": 1.359398274051838e-06,
2258
+ "loss": 0.2244,
2259
+ "reward": 0.4583333432674408,
2260
+ "reward_std": 0.4248107150197029,
2261
+ "rewards/accuracy_reward": 0.4583333432674408,
2262
+ "rewards/format_reward": 0.0,
2263
+ "step": 161
2264
+ },
2265
+ {
2266
+ "clip_ratio": 0.0,
2267
+ "completion_length": 503.5833396911621,
2268
+ "epoch": 1.736,
2269
+ "grad_norm": 0.31701967120170593,
2270
+ "kl": 0.50714111328125,
2271
+ "learning_rate": 1.340717976637726e-06,
2272
+ "loss": 0.0906,
2273
+ "reward": 0.7500000149011612,
2274
+ "reward_std": 0.23116153106093407,
2275
+ "rewards/accuracy_reward": 0.7500000149011612,
2276
+ "rewards/format_reward": 0.0,
2277
+ "step": 162
2278
+ },
2279
+ {
2280
+ "clip_ratio": 0.0,
2281
+ "completion_length": 508.7916793823242,
2282
+ "epoch": 1.7466666666666666,
2283
+ "grad_norm": 1.6528522968292236,
2284
+ "kl": 0.932525634765625,
2285
+ "learning_rate": 1.3220626316852584e-06,
2286
+ "loss": 0.2641,
2287
+ "reward": 0.7291666902601719,
2288
+ "reward_std": 0.41129202768206596,
2289
+ "rewards/accuracy_reward": 0.7291666902601719,
2290
+ "rewards/format_reward": 0.0,
2291
+ "step": 163
2292
+ },
2293
+ {
2294
+ "clip_ratio": 0.0,
2295
+ "completion_length": 621.0625190734863,
2296
+ "epoch": 1.7573333333333334,
2297
+ "grad_norm": 0.36313435435295105,
2298
+ "kl": 1.24462890625,
2299
+ "learning_rate": 1.303435161663459e-06,
2300
+ "loss": 0.0799,
2301
+ "reward": 0.5416666846722364,
2302
+ "reward_std": 0.2686738669872284,
2303
+ "rewards/accuracy_reward": 0.5416666846722364,
2304
+ "rewards/format_reward": 0.0,
2305
+ "step": 164
2306
+ },
2307
+ {
2308
+ "clip_ratio": 0.0,
2309
+ "completion_length": 525.8333435058594,
2310
+ "epoch": 1.768,
2311
+ "grad_norm": 0.7368504405021667,
2312
+ "kl": 0.7718505859375,
2313
+ "learning_rate": 1.2848384846745813e-06,
2314
+ "loss": 0.1392,
2315
+ "reward": 0.7500000204890966,
2316
+ "reward_std": 0.333223607391119,
2317
+ "rewards/accuracy_reward": 0.7500000204890966,
2318
+ "rewards/format_reward": 0.0,
2319
+ "step": 165
2320
+ },
2321
+ {
2322
+ "clip_ratio": 0.0,
2323
+ "completion_length": 575.8125190734863,
2324
+ "epoch": 1.7786666666666666,
2325
+ "grad_norm": 0.316484659910202,
2326
+ "kl": 0.6610794067382812,
2327
+ "learning_rate": 1.2662755139969693e-06,
2328
+ "loss": 0.1046,
2329
+ "reward": 0.7291666716337204,
2330
+ "reward_std": 0.3344954252243042,
2331
+ "rewards/accuracy_reward": 0.7291666716337204,
2332
+ "rewards/format_reward": 0.0,
2333
+ "step": 166
2334
+ },
2335
+ {
2336
+ "clip_ratio": 0.0,
2337
+ "completion_length": 553.8541793823242,
2338
+ "epoch": 1.7893333333333334,
2339
+ "grad_norm": 0.5553821325302124,
2340
+ "kl": 1.3211212158203125,
2341
+ "learning_rate": 1.2477491576286764e-06,
2342
+ "loss": 0.0911,
2343
+ "reward": 0.6666666772216558,
2344
+ "reward_std": 0.23116153478622437,
2345
+ "rewards/accuracy_reward": 0.6666666772216558,
2346
+ "rewards/format_reward": 0.0,
2347
+ "step": 167
2348
+ },
2349
+ {
2350
+ "clip_ratio": 0.0,
2351
+ "completion_length": 554.4166851043701,
2352
+ "epoch": 1.8,
2353
+ "grad_norm": 0.6969295740127563,
2354
+ "kl": 1.73931884765625,
2355
+ "learning_rate": 1.2292623178319094e-06,
2356
+ "loss": 0.1884,
2357
+ "reward": 0.6458333376795053,
2358
+ "reward_std": 0.3170611411333084,
2359
+ "rewards/accuracy_reward": 0.6458333376795053,
2360
+ "rewards/format_reward": 0.0,
2361
+ "step": 168
2362
+ },
2363
+ {
2364
+ "clip_ratio": 0.0,
2365
+ "completion_length": 548.1666870117188,
2366
+ "epoch": 1.8106666666666666,
2367
+ "grad_norm": 0.6913095116615295,
2368
+ "kl": 1.616729736328125,
2369
+ "learning_rate": 1.2108178906783732e-06,
2370
+ "loss": 0.2069,
2371
+ "reward": 0.5000000149011612,
2372
+ "reward_std": 0.4701542444527149,
2373
+ "rewards/accuracy_reward": 0.5000000149011612,
2374
+ "rewards/format_reward": 0.0,
2375
+ "step": 169
2376
+ },
2377
+ {
2378
+ "clip_ratio": 0.0,
2379
+ "completion_length": 618.916690826416,
2380
+ "epoch": 1.8213333333333335,
2381
+ "grad_norm": 0.9999569058418274,
2382
+ "kl": 3.020416259765625,
2383
+ "learning_rate": 1.1924187655955838e-06,
2384
+ "loss": 0.3262,
2385
+ "reward": 0.5000000149011612,
2386
+ "reward_std": 0.4326419048011303,
2387
+ "rewards/accuracy_reward": 0.5000000149011612,
2388
+ "rewards/format_reward": 0.0,
2389
+ "step": 170
2390
+ },
2391
+ {
2392
+ "clip_ratio": 0.0,
2393
+ "completion_length": 509.9791851043701,
2394
+ "epoch": 1.8319999999999999,
2395
+ "grad_norm": 0.4520111382007599,
2396
+ "kl": 0.9397735595703125,
2397
+ "learning_rate": 1.1740678249142229e-06,
2398
+ "loss": 0.1257,
2399
+ "reward": 0.6875000111758709,
2400
+ "reward_std": 0.2350771240890026,
2401
+ "rewards/accuracy_reward": 0.6875000111758709,
2402
+ "rewards/format_reward": 0.0,
2403
+ "step": 171
2404
+ },
2405
+ {
2406
+ "clip_ratio": 0.0,
2407
+ "completion_length": 648.6875114440918,
2408
+ "epoch": 1.8426666666666667,
2409
+ "grad_norm": 1.3455004692077637,
2410
+ "kl": 3.2716064453125,
2411
+ "learning_rate": 1.1557679434166027e-06,
2412
+ "loss": 0.2844,
2413
+ "reward": 0.47916667349636555,
2414
+ "reward_std": 0.2350771203637123,
2415
+ "rewards/accuracy_reward": 0.47916667349636555,
2416
+ "rewards/format_reward": 0.0,
2417
+ "step": 172
2418
+ },
2419
+ {
2420
+ "clip_ratio": 0.0,
2421
+ "completion_length": 433.7708377838135,
2422
+ "epoch": 1.8533333333333335,
2423
+ "grad_norm": 0.22631153464317322,
2424
+ "kl": 0.7077484130859375,
2425
+ "learning_rate": 1.1375219878863162e-06,
2426
+ "loss": 0.034,
2427
+ "reward": 0.7083333358168602,
2428
+ "reward_std": 0.20148037374019623,
2429
+ "rewards/accuracy_reward": 0.7083333358168602,
2430
+ "rewards/format_reward": 0.0,
2431
+ "step": 173
2432
+ },
2433
+ {
2434
+ "clip_ratio": 0.0,
2435
+ "completion_length": 619.8333473205566,
2436
+ "epoch": 1.8639999999999999,
2437
+ "grad_norm": 0.30306950211524963,
2438
+ "kl": 1.13690185546875,
2439
+ "learning_rate": 1.1193328166591372e-06,
2440
+ "loss": 0.1185,
2441
+ "reward": 0.4583333432674408,
2442
+ "reward_std": 0.3776952773332596,
2443
+ "rewards/accuracy_reward": 0.4583333432674408,
2444
+ "rewards/format_reward": 0.0,
2445
+ "step": 174
2446
+ },
2447
+ {
2448
+ "clip_ratio": 0.0,
2449
+ "completion_length": 592.5208473205566,
2450
+ "epoch": 1.8746666666666667,
2451
+ "grad_norm": 0.39582908153533936,
2452
+ "kl": 1.418182373046875,
2453
+ "learning_rate": 1.1012032791752457e-06,
2454
+ "loss": 0.1603,
2455
+ "reward": 0.4791666753590107,
2456
+ "reward_std": 0.36417657881975174,
2457
+ "rewards/accuracy_reward": 0.4791666753590107,
2458
+ "rewards/format_reward": 0.0,
2459
+ "step": 175
2460
+ },
2461
+ {
2462
+ "clip_ratio": 0.0,
2463
+ "completion_length": 501.5000114440918,
2464
+ "epoch": 1.8853333333333333,
2465
+ "grad_norm": 0.9711954593658447,
2466
+ "kl": 0.571441650390625,
2467
+ "learning_rate": 1.0831362155328477e-06,
2468
+ "loss": 0.166,
2469
+ "reward": 0.833333358168602,
2470
+ "reward_std": 0.3332235962152481,
2471
+ "rewards/accuracy_reward": 0.833333358168602,
2472
+ "rewards/format_reward": 0.0,
2473
+ "step": 176
2474
+ },
2475
+ {
2476
+ "clip_ratio": 0.0,
2477
+ "completion_length": 570.8541831970215,
2478
+ "epoch": 1.896,
2479
+ "grad_norm": 0.6740026473999023,
2480
+ "kl": 1.3124847412109375,
2481
+ "learning_rate": 1.0651344560432548e-06,
2482
+ "loss": 0.1433,
2483
+ "reward": 0.645833345130086,
2484
+ "reward_std": 0.36417658254504204,
2485
+ "rewards/accuracy_reward": 0.645833345130086,
2486
+ "rewards/format_reward": 0.0,
2487
+ "step": 177
2488
+ },
2489
+ {
2490
+ "clip_ratio": 0.0,
2491
+ "completion_length": 560.0416870117188,
2492
+ "epoch": 1.9066666666666667,
2493
+ "grad_norm": 0.29950958490371704,
2494
+ "kl": 1.2054367065429688,
2495
+ "learning_rate": 1.0472008207875023e-06,
2496
+ "loss": 0.1039,
2497
+ "reward": 0.6041666753590107,
2498
+ "reward_std": 0.1801304966211319,
2499
+ "rewards/accuracy_reward": 0.6041666753590107,
2500
+ "rewards/format_reward": 0.0,
2501
+ "step": 178
2502
+ },
2503
+ {
2504
+ "clip_ratio": 0.0,
2505
+ "completion_length": 551.6875228881836,
2506
+ "epoch": 1.9173333333333333,
2507
+ "grad_norm": 0.4891541302204132,
2508
+ "kl": 1.02886962890625,
2509
+ "learning_rate": 1.0293381191745637e-06,
2510
+ "loss": 0.17,
2511
+ "reward": 0.5833333469927311,
2512
+ "reward_std": 0.3332235999405384,
2513
+ "rewards/accuracy_reward": 0.5833333469927311,
2514
+ "rewards/format_reward": 0.0,
2515
+ "step": 179
2516
+ },
2517
+ {
2518
+ "clip_ratio": 0.0,
2519
+ "completion_length": 604.8958473205566,
2520
+ "epoch": 1.928,
2521
+ "grad_norm": 0.6707997918128967,
2522
+ "kl": 1.073486328125,
2523
+ "learning_rate": 1.0115491495012424e-06,
2524
+ "loss": 0.1305,
2525
+ "reward": 0.5625000149011612,
2526
+ "reward_std": 0.299626849591732,
2527
+ "rewards/accuracy_reward": 0.5625000149011612,
2528
+ "rewards/format_reward": 0.0,
2529
+ "step": 180
2530
+ },
2531
+ {
2532
+ "clip_ratio": 0.0,
2533
+ "completion_length": 538.8750152587891,
2534
+ "epoch": 1.9386666666666668,
2535
+ "grad_norm": 0.7848038673400879,
2536
+ "kl": 1.063873291015625,
2537
+ "learning_rate": 9.938366985138028e-07,
2538
+ "loss": 0.1507,
2539
+ "reward": 0.6250000167638063,
2540
+ "reward_std": 0.2686738707125187,
2541
+ "rewards/accuracy_reward": 0.6250000167638063,
2542
+ "rewards/format_reward": 0.0,
2543
+ "step": 181
2544
+ },
2545
+ {
2546
+ "clip_ratio": 0.0,
2547
+ "completion_length": 523.9166812896729,
2548
+ "epoch": 1.9493333333333334,
2549
+ "grad_norm": 0.38517096638679504,
2550
+ "kl": 1.3513946533203125,
2551
+ "learning_rate": 9.762035409714077e-07,
2552
+ "loss": 0.141,
2553
+ "reward": 0.583333345130086,
2554
+ "reward_std": 0.2957112565636635,
2555
+ "rewards/accuracy_reward": 0.583333345130086,
2556
+ "rewards/format_reward": 0.0,
2557
+ "step": 182
2558
+ },
2559
+ {
2560
+ "clip_ratio": 0.0,
2561
+ "completion_length": 481.4791717529297,
2562
+ "epoch": 1.96,
2563
+ "grad_norm": 0.7527852058410645,
2564
+ "kl": 1.50286865234375,
2565
+ "learning_rate": 9.586524392114385e-07,
2566
+ "loss": 0.1278,
2567
+ "reward": 0.6250000037252903,
2568
+ "reward_std": 0.26603010296821594,
2569
+ "rewards/accuracy_reward": 0.6250000037252903,
2570
+ "rewards/format_reward": 0.0,
2571
+ "step": 183
2572
+ },
2573
+ {
2574
+ "clip_ratio": 0.0,
2575
+ "completion_length": 446.2083435058594,
2576
+ "epoch": 1.9706666666666668,
2577
+ "grad_norm": 0.22020579874515533,
2578
+ "kl": 0.7943267822265625,
2579
+ "learning_rate": 9.411861427167567e-07,
2580
+ "loss": 0.0756,
2581
+ "reward": 0.729166679084301,
2582
+ "reward_std": 0.2350771240890026,
2583
+ "rewards/accuracy_reward": 0.729166679084301,
2584
+ "rewards/format_reward": 0.0,
2585
+ "step": 184
2586
+ },
2587
+ {
2588
+ "clip_ratio": 0.0,
2589
+ "completion_length": 653.5625114440918,
2590
+ "epoch": 1.9813333333333332,
2591
+ "grad_norm": 0.4303428828716278,
2592
+ "kl": 2.3649749755859375,
2593
+ "learning_rate": 9.238073876849837e-07,
2594
+ "loss": 0.2236,
2595
+ "reward": 0.5416666883975267,
2596
+ "reward_std": 0.3881702274084091,
2597
+ "rewards/accuracy_reward": 0.5416666883975267,
2598
+ "rewards/format_reward": 0.0,
2599
+ "step": 185
2600
+ },
2601
+ {
2602
+ "clip_ratio": 0.0,
2603
+ "completion_length": 599.3750152587891,
2604
+ "epoch": 1.992,
2605
+ "grad_norm": 2.4530301094055176,
2606
+ "kl": 3.55426025390625,
2607
+ "learning_rate": 9.065188965998574e-07,
2608
+ "loss": 0.3119,
2609
+ "reward": 0.6250000186264515,
2610
+ "reward_std": 0.3602609895169735,
2611
+ "rewards/accuracy_reward": 0.6250000186264515,
2612
+ "rewards/format_reward": 0.0,
2613
+ "step": 186
2614
+ }
2615
+ ],
2616
+ "logging_steps": 1,
2617
+ "max_steps": 279,
2618
+ "num_input_tokens_seen": 0,
2619
+ "num_train_epochs": 3,
2620
+ "save_steps": 500,
2621
+ "stateful_callbacks": {
2622
+ "TrainerControl": {
2623
+ "args": {
2624
+ "should_epoch_stop": false,
2625
+ "should_evaluate": false,
2626
+ "should_log": false,
2627
+ "should_save": true,
2628
+ "should_training_stop": false
2629
+ },
2630
+ "attributes": {}
2631
+ }
2632
+ },
2633
+ "total_flos": 0.0,
2634
+ "train_batch_size": 2,
2635
+ "trial_name": null,
2636
+ "trial_params": null
2637
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0fdd25831a6977850bf19f892f870a0f9dde2616344ff9cb57c3ec17851adc79
3
+ size 7672
vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
zero_to_fp32.py ADDED
@@ -0,0 +1,674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 json
25
+ from tqdm import tqdm
26
+ from collections import OrderedDict
27
+ from dataclasses import dataclass
28
+
29
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
30
+ # DeepSpeed data structures it has to be available in the current python environment.
31
+ from deepspeed.utils import logger
32
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
33
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
34
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
35
+
36
+
37
+ @dataclass
38
+ class zero_model_state:
39
+ buffers: dict()
40
+ param_shapes: dict()
41
+ shared_params: list
42
+ ds_version: int
43
+ frozen_param_shapes: dict()
44
+ frozen_param_fragments: dict()
45
+
46
+
47
+ debug = 0
48
+
49
+ # load to cpu
50
+ device = torch.device('cpu')
51
+
52
+
53
+ def atoi(text):
54
+ return int(text) if text.isdigit() else text
55
+
56
+
57
+ def natural_keys(text):
58
+ '''
59
+ alist.sort(key=natural_keys) sorts in human order
60
+ http://nedbatchelder.com/blog/200712/human_sorting.html
61
+ (See Toothy's implementation in the comments)
62
+ '''
63
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
64
+
65
+
66
+ def get_model_state_file(checkpoint_dir, zero_stage):
67
+ if not os.path.isdir(checkpoint_dir):
68
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
69
+
70
+ # there should be only one file
71
+ if zero_stage <= 2:
72
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
73
+ elif zero_stage == 3:
74
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
75
+
76
+ if not os.path.exists(file):
77
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
78
+
79
+ return file
80
+
81
+
82
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
83
+ # XXX: need to test that this simple glob rule works for multi-node setup too
84
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
85
+
86
+ if len(ckpt_files) == 0:
87
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
88
+
89
+ return ckpt_files
90
+
91
+
92
+ def get_optim_files(checkpoint_dir):
93
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
94
+
95
+
96
+ def get_model_state_files(checkpoint_dir):
97
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
98
+
99
+
100
+ def parse_model_states(files):
101
+ zero_model_states = []
102
+ for file in files:
103
+ state_dict = torch.load(file, map_location=device)
104
+
105
+ if BUFFER_NAMES not in state_dict:
106
+ raise ValueError(f"{file} is not a model state checkpoint")
107
+ buffer_names = state_dict[BUFFER_NAMES]
108
+ if debug:
109
+ print("Found buffers:", buffer_names)
110
+
111
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
112
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
113
+ param_shapes = state_dict[PARAM_SHAPES]
114
+
115
+ # collect parameters that are included in param_shapes
116
+ param_names = []
117
+ for s in param_shapes:
118
+ for name in s.keys():
119
+ param_names.append(name)
120
+
121
+ # update with frozen parameters
122
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
123
+ if frozen_param_shapes is not None:
124
+ if debug:
125
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
126
+ param_names += list(frozen_param_shapes.keys())
127
+
128
+ # handle shared params
129
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
130
+
131
+ ds_version = state_dict.get(DS_VERSION, None)
132
+
133
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
134
+
135
+ z_model_state = zero_model_state(buffers=buffers,
136
+ param_shapes=param_shapes,
137
+ shared_params=shared_params,
138
+ ds_version=ds_version,
139
+ frozen_param_shapes=frozen_param_shapes,
140
+ frozen_param_fragments=frozen_param_fragments)
141
+ zero_model_states.append(z_model_state)
142
+
143
+ return zero_model_states
144
+
145
+
146
+ def parse_optim_states(files, ds_checkpoint_dir):
147
+ total_files = len(files)
148
+ state_dicts = []
149
+ for f in files:
150
+ state_dict = torch.load(f, map_location=device)
151
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
152
+ # and also handle the case where it was already removed by another helper script
153
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
154
+ state_dicts.append(state_dict)
155
+
156
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
157
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
158
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
159
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
160
+
161
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
162
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
163
+ # use the max of the partition_count to get the dp world_size.
164
+
165
+ if type(world_size) is list:
166
+ world_size = max(world_size)
167
+
168
+ if world_size != total_files:
169
+ raise ValueError(
170
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
171
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
172
+ )
173
+
174
+ # the groups are named differently in each stage
175
+ if zero_stage <= 2:
176
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
177
+ elif zero_stage == 3:
178
+ fp32_groups_key = FP32_FLAT_GROUPS
179
+ else:
180
+ raise ValueError(f"unknown zero stage {zero_stage}")
181
+
182
+ if zero_stage <= 2:
183
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
184
+ elif zero_stage == 3:
185
+ # if there is more than one param group, there will be multiple flattened tensors - one
186
+ # flattened tensor per group - for simplicity merge them into a single tensor
187
+ #
188
+ # XXX: could make the script more memory efficient for when there are multiple groups - it
189
+ # will require matching the sub-lists of param_shapes for each param group flattened tensor
190
+
191
+ fp32_flat_groups = [
192
+ torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
193
+ ]
194
+
195
+ return zero_stage, world_size, fp32_flat_groups
196
+
197
+
198
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
199
+ """
200
+ Returns fp32 state_dict reconstructed from ds checkpoint
201
+
202
+ Args:
203
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
204
+
205
+ """
206
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
207
+
208
+ optim_files = get_optim_files(ds_checkpoint_dir)
209
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
210
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
211
+
212
+ model_files = get_model_state_files(ds_checkpoint_dir)
213
+
214
+ zero_model_states = parse_model_states(model_files)
215
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
216
+
217
+ if zero_stage <= 2:
218
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
219
+ exclude_frozen_parameters)
220
+ elif zero_stage == 3:
221
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
222
+ exclude_frozen_parameters)
223
+
224
+
225
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
226
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
227
+ return
228
+
229
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
230
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
231
+
232
+ if debug:
233
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
234
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
235
+
236
+ wanted_params = len(frozen_param_shapes)
237
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
238
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
239
+ print(f'Frozen params: Have {avail_numel} numels to process.')
240
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
241
+
242
+ total_params = 0
243
+ total_numel = 0
244
+ for name, shape in frozen_param_shapes.items():
245
+ total_params += 1
246
+ unpartitioned_numel = shape.numel()
247
+ total_numel += unpartitioned_numel
248
+
249
+ state_dict[name] = frozen_param_fragments[name]
250
+
251
+ if debug:
252
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
253
+
254
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
255
+
256
+
257
+ def _has_callable(obj, fn):
258
+ attr = getattr(obj, fn, None)
259
+ return callable(attr)
260
+
261
+
262
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
263
+ param_shapes = zero_model_states[0].param_shapes
264
+
265
+ # Reconstruction protocol:
266
+ #
267
+ # XXX: document this
268
+
269
+ if debug:
270
+ for i in range(world_size):
271
+ for j in range(len(fp32_flat_groups[0])):
272
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
273
+
274
+ # XXX: memory usage doubles here (zero2)
275
+ num_param_groups = len(fp32_flat_groups[0])
276
+ merged_single_partition_of_fp32_groups = []
277
+ for i in range(num_param_groups):
278
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
279
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
280
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
281
+ avail_numel = sum(
282
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
283
+
284
+ if debug:
285
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
286
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
287
+ # not asserting if there is a mismatch due to possible padding
288
+ print(f"Have {avail_numel} numels to process.")
289
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
290
+
291
+ # params
292
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
293
+ # out-of-core computing solution
294
+ total_numel = 0
295
+ total_params = 0
296
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
297
+ offset = 0
298
+ avail_numel = full_single_fp32_vector.numel()
299
+ for name, shape in shapes.items():
300
+
301
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
302
+ total_numel += unpartitioned_numel
303
+ total_params += 1
304
+
305
+ if debug:
306
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
307
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
308
+ offset += unpartitioned_numel
309
+
310
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
311
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
312
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
313
+ # live optimizer object, so we are checking that the numbers are within the right range
314
+ align_to = 2 * world_size
315
+
316
+ def zero2_align(x):
317
+ return align_to * math.ceil(x / align_to)
318
+
319
+ if debug:
320
+ print(f"original offset={offset}, avail_numel={avail_numel}")
321
+
322
+ offset = zero2_align(offset)
323
+ avail_numel = zero2_align(avail_numel)
324
+
325
+ if debug:
326
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
327
+
328
+ # Sanity check
329
+ if offset != avail_numel:
330
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
331
+
332
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
333
+
334
+
335
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
336
+ exclude_frozen_parameters):
337
+ state_dict = OrderedDict()
338
+
339
+ # buffers
340
+ buffers = zero_model_states[0].buffers
341
+ state_dict.update(buffers)
342
+ if debug:
343
+ print(f"added {len(buffers)} buffers")
344
+
345
+ if not exclude_frozen_parameters:
346
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
347
+
348
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
349
+
350
+ # recover shared parameters
351
+ for pair in zero_model_states[0].shared_params:
352
+ if pair[1] in state_dict:
353
+ state_dict[pair[0]] = state_dict[pair[1]]
354
+
355
+ return state_dict
356
+
357
+
358
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
359
+ remainder = unpartitioned_numel % world_size
360
+ padding_numel = (world_size - remainder) if remainder else 0
361
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
362
+ return partitioned_numel, padding_numel
363
+
364
+
365
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
366
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
367
+ return
368
+
369
+ if debug:
370
+ for i in range(world_size):
371
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
372
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
373
+
374
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
375
+ wanted_params = len(frozen_param_shapes)
376
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
377
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
378
+ print(f'Frozen params: Have {avail_numel} numels to process.')
379
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
380
+
381
+ total_params = 0
382
+ total_numel = 0
383
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
384
+ total_params += 1
385
+ unpartitioned_numel = shape.numel()
386
+ total_numel += unpartitioned_numel
387
+
388
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
389
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
390
+
391
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
392
+
393
+ if debug:
394
+ print(
395
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
396
+ )
397
+
398
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
399
+
400
+
401
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
402
+ param_shapes = zero_model_states[0].param_shapes
403
+ avail_numel = fp32_flat_groups[0].numel() * world_size
404
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
405
+ # param, re-consolidating each param, while dealing with padding if any
406
+
407
+ # merge list of dicts, preserving order
408
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
409
+
410
+ if debug:
411
+ for i in range(world_size):
412
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
413
+
414
+ wanted_params = len(param_shapes)
415
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
416
+ # not asserting if there is a mismatch due to possible padding
417
+ avail_numel = fp32_flat_groups[0].numel() * world_size
418
+ print(f"Trainable params: Have {avail_numel} numels to process.")
419
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
420
+
421
+ # params
422
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
423
+ # out-of-core computing solution
424
+ offset = 0
425
+ total_numel = 0
426
+ total_params = 0
427
+ for name, shape in tqdm(param_shapes.items(), desc='Gathering Sharded Weights'):
428
+ unpartitioned_numel = shape.numel()
429
+ total_numel += unpartitioned_numel
430
+ total_params += 1
431
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
432
+
433
+ if debug:
434
+ print(
435
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
436
+ )
437
+
438
+ # XXX: memory usage doubles here
439
+ state_dict[name] = torch.cat(
440
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
441
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
442
+ offset += partitioned_numel
443
+
444
+ offset *= world_size
445
+
446
+ # Sanity check
447
+ if offset != avail_numel:
448
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
449
+
450
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
451
+
452
+
453
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
454
+ exclude_frozen_parameters):
455
+ state_dict = OrderedDict()
456
+
457
+ # buffers
458
+ buffers = zero_model_states[0].buffers
459
+ state_dict.update(buffers)
460
+ if debug:
461
+ print(f"added {len(buffers)} buffers")
462
+
463
+ if not exclude_frozen_parameters:
464
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
465
+
466
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
467
+
468
+ # recover shared parameters
469
+ for pair in zero_model_states[0].shared_params:
470
+ if pair[1] in state_dict:
471
+ state_dict[pair[0]] = state_dict[pair[1]]
472
+
473
+ return state_dict
474
+
475
+
476
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None, exclude_frozen_parameters=False):
477
+ """
478
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
479
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
480
+ via a model hub.
481
+
482
+ Args:
483
+ - ``checkpoint_dir``: path to the desired checkpoint folder
484
+ - ``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``
485
+ - ``exclude_frozen_parameters``: exclude frozen parameters
486
+
487
+ Returns:
488
+ - pytorch ``state_dict``
489
+
490
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
491
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
492
+ the checkpoint.
493
+
494
+ A typical usage might be ::
495
+
496
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
497
+ # do the training and checkpoint saving
498
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
499
+ model = model.cpu() # move to cpu
500
+ model.load_state_dict(state_dict)
501
+ # submit to model hub or save the model to share with others
502
+
503
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
504
+ application. i.e. you will need to re-initialize the deepspeed engine, since
505
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
506
+
507
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
508
+
509
+ """
510
+ if tag is None:
511
+ latest_path = os.path.join(checkpoint_dir, 'latest')
512
+ if os.path.isfile(latest_path):
513
+ with open(latest_path, 'r') as fd:
514
+ tag = fd.read().strip()
515
+ else:
516
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
517
+
518
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
519
+
520
+ if not os.path.isdir(ds_checkpoint_dir):
521
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
522
+
523
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
524
+
525
+
526
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
527
+ output_dir,
528
+ max_shard_size="5GB",
529
+ safe_serialization=False,
530
+ tag=None,
531
+ exclude_frozen_parameters=False):
532
+ """
533
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
534
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
535
+
536
+ Args:
537
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
538
+ - ``output_dir``: directory to the pytorch fp32 state_dict output files
539
+ - ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
540
+ - ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
541
+ - ``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``
542
+ - ``exclude_frozen_parameters``: exclude frozen parameters
543
+ """
544
+ # Dependency pre-check
545
+ if safe_serialization:
546
+ try:
547
+ from safetensors.torch import save_file
548
+ except ImportError:
549
+ print('If you want to use `safe_serialization`, please `pip install safetensors`')
550
+ raise
551
+ if max_shard_size is not None:
552
+ try:
553
+ from huggingface_hub import split_torch_state_dict_into_shards
554
+ except ImportError:
555
+ print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
556
+ raise
557
+
558
+ # Convert zero checkpoint to state_dict
559
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag, exclude_frozen_parameters)
560
+
561
+ # Shard the model if it is too big.
562
+ weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
563
+ if max_shard_size is not None:
564
+ filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
565
+ state_dict_split = split_torch_state_dict_into_shards(state_dict,
566
+ filename_pattern=filename_pattern,
567
+ max_shard_size=max_shard_size)
568
+ else:
569
+ from collections import namedtuple
570
+ StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
571
+ state_dict_split = StateDictSplit(is_sharded=False,
572
+ filename_to_tensors={weights_name: list(state_dict.keys())})
573
+
574
+ # Save the model
575
+ filename_to_tensors = state_dict_split.filename_to_tensors.items()
576
+ for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
577
+ shard = {tensor: state_dict[tensor].contiguous() for tensor in tensors}
578
+ output_path = os.path.join(output_dir, shard_file)
579
+ if safe_serialization:
580
+ save_file(shard, output_path, metadata={"format": "pt"})
581
+ else:
582
+ torch.save(shard, output_path)
583
+
584
+ # Save index if sharded
585
+ if state_dict_split.is_sharded:
586
+ index = {
587
+ "metadata": state_dict_split.metadata,
588
+ "weight_map": state_dict_split.tensor_to_filename,
589
+ }
590
+ save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
591
+ save_index_file = os.path.join(output_dir, save_index_file)
592
+ with open(save_index_file, "w", encoding="utf-8") as f:
593
+ content = json.dumps(index, indent=2, sort_keys=True) + "\n"
594
+ f.write(content)
595
+
596
+
597
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
598
+ """
599
+ 1. Put the provided model to cpu
600
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
601
+ 3. Load it into the provided model
602
+
603
+ Args:
604
+ - ``model``: the model object to update
605
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
606
+ - ``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``
607
+
608
+ Returns:
609
+ - ``model`: modified model
610
+
611
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
612
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
613
+ conveniently placed for you in the checkpoint folder.
614
+
615
+ A typical usage might be ::
616
+
617
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
618
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
619
+ # submit to model hub or save the model to share with others
620
+
621
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
622
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
623
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
624
+
625
+ """
626
+ logger.info(f"Extracting fp32 weights")
627
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
628
+
629
+ logger.info(f"Overwriting model with fp32 weights")
630
+ model = model.cpu()
631
+ model.load_state_dict(state_dict, strict=False)
632
+
633
+ return model
634
+
635
+
636
+ if __name__ == "__main__":
637
+ parser = argparse.ArgumentParser()
638
+ parser.add_argument("checkpoint_dir",
639
+ type=str,
640
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
641
+ parser.add_argument("output_dir",
642
+ type=str,
643
+ help="directory to the pytorch fp32 state_dict output files"
644
+ "(e.g. path/checkpoint-12-output/)")
645
+ parser.add_argument(
646
+ "--max_shard_size",
647
+ type=str,
648
+ default="5GB",
649
+ help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
650
+ "lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
651
+ "We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
652
+ "without CPU OOM issues.")
653
+ parser.add_argument(
654
+ "--safe_serialization",
655
+ default=False,
656
+ action='store_true',
657
+ help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
658
+ parser.add_argument("-t",
659
+ "--tag",
660
+ type=str,
661
+ default=None,
662
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
663
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
664
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
665
+ args = parser.parse_args()
666
+
667
+ debug = args.debug
668
+
669
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
670
+ args.output_dir,
671
+ max_shard_size=args.max_shard_size,
672
+ safe_serialization=args.safe_serialization,
673
+ tag=args.tag,
674
+ exclude_frozen_parameters=args.exclude_frozen_parameters)