aybora commited on
Commit
3824f34
·
verified ·
1 Parent(s): 18b246a

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
added_tokens.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "<|box_end|>": 151649,
3
+ "<|box_start|>": 151648,
4
+ "<|endoftext|>": 151643,
5
+ "<|im_end|>": 151645,
6
+ "<|im_start|>": 151644,
7
+ "<|image_pad|>": 151655,
8
+ "<|object_ref_end|>": 151647,
9
+ "<|object_ref_start|>": 151646,
10
+ "<|quad_end|>": 151651,
11
+ "<|quad_start|>": 151650,
12
+ "<|video_pad|>": 151656,
13
+ "<|vision_end|>": 151653,
14
+ "<|vision_pad|>": 151654,
15
+ "<|vision_start|>": 151652
16
+ }
chat_template.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "chat_template": "{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}"
3
+ }
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/arf/scratch/aykoksal/Qwen2-VL_reasoning",
3
+ "architectures": [
4
+ "Qwen2VLForConditionalGeneration"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "eos_token_id": 151645,
9
+ "hidden_act": "silu",
10
+ "hidden_size": 1536,
11
+ "image_token_id": 151655,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 8960,
14
+ "max_position_embeddings": 32768,
15
+ "max_window_layers": 28,
16
+ "model_type": "qwen2_vl",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 28,
19
+ "num_key_value_heads": 2,
20
+ "rms_norm_eps": 1e-06,
21
+ "rope_scaling": {
22
+ "mrope_section": [
23
+ 16,
24
+ 24,
25
+ 24
26
+ ],
27
+ "rope_type": "default",
28
+ "type": "default"
29
+ },
30
+ "rope_theta": 1000000.0,
31
+ "sliding_window": 32768,
32
+ "tie_word_embeddings": true,
33
+ "tokenizer_padding_side": "right",
34
+ "torch_dtype": "bfloat16",
35
+ "transformers_version": "4.50.0.dev0",
36
+ "use_cache": false,
37
+ "use_sliding_window": false,
38
+ "video_token_id": 151656,
39
+ "vision_config": {
40
+ "hidden_size": 1536,
41
+ "in_chans": 3,
42
+ "model_type": "qwen2_vl",
43
+ "spatial_patch_size": 14,
44
+ "torch_dtype": "float32"
45
+ },
46
+ "vision_end_token_id": 151653,
47
+ "vision_lr": 2e-06,
48
+ "vision_start_token_id": 151652,
49
+ "vision_token_id": 151654,
50
+ "vocab_size": 151936
51
+ }
generation_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attn_implementation": "flash_attention_2",
3
+ "bos_token_id": 151643,
4
+ "do_sample": true,
5
+ "eos_token_id": [
6
+ 151645,
7
+ 151643
8
+ ],
9
+ "pad_token_id": 151643,
10
+ "temperature": 0.01,
11
+ "top_k": 1,
12
+ "top_p": 0.001,
13
+ "transformers_version": "4.50.0.dev0",
14
+ "use_cache": false
15
+ }
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:da359c4e881250cf326105688da5e6e743c3bf4142c21fdfe0a31472ecac7af2
3
+ size 4418050848
preprocessor_config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.48145466,
8
+ 0.4578275,
9
+ 0.40821073
10
+ ],
11
+ "image_processor_type": "Qwen2VLImageProcessor",
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "max_pixels": 2359296,
18
+ "merge_size": 2,
19
+ "min_pixels": 3136,
20
+ "patch_size": 14,
21
+ "processor_class": "Qwen2VLProcessor",
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "longest_edge": 12845056,
26
+ "shortest_edge": 3136
27
+ },
28
+ "temporal_patch_size": 2
29
+ }
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:38b1addc9198ec40e943b2c8e649fcf462019a3378ad7686f31c4f5ad3752a24
3
+ size 1064
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88a3a6fcb80132f76da8aa40cdc3fccd7e5d8468ef15421f5b0c2715e85217d2
3
+ size 11420538
tokenizer_config.json ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "151646": {
29
+ "content": "<|object_ref_start|>",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "151647": {
37
+ "content": "<|object_ref_end|>",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "151648": {
45
+ "content": "<|box_start|>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "151649": {
53
+ "content": "<|box_end|>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "151650": {
61
+ "content": "<|quad_start|>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "151651": {
69
+ "content": "<|quad_end|>",
70
+ "lstrip": false,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ },
76
+ "151652": {
77
+ "content": "<|vision_start|>",
78
+ "lstrip": false,
79
+ "normalized": false,
80
+ "rstrip": false,
81
+ "single_word": false,
82
+ "special": true
83
+ },
84
+ "151653": {
85
+ "content": "<|vision_end|>",
86
+ "lstrip": false,
87
+ "normalized": false,
88
+ "rstrip": false,
89
+ "single_word": false,
90
+ "special": true
91
+ },
92
+ "151654": {
93
+ "content": "<|vision_pad|>",
94
+ "lstrip": false,
95
+ "normalized": false,
96
+ "rstrip": false,
97
+ "single_word": false,
98
+ "special": true
99
+ },
100
+ "151655": {
101
+ "content": "<|image_pad|>",
102
+ "lstrip": false,
103
+ "normalized": false,
104
+ "rstrip": false,
105
+ "single_word": false,
106
+ "special": true
107
+ },
108
+ "151656": {
109
+ "content": "<|video_pad|>",
110
+ "lstrip": false,
111
+ "normalized": false,
112
+ "rstrip": false,
113
+ "single_word": false,
114
+ "special": true
115
+ }
116
+ },
117
+ "additional_special_tokens": [
118
+ "<|im_start|>",
119
+ "<|im_end|>",
120
+ "<|object_ref_start|>",
121
+ "<|object_ref_end|>",
122
+ "<|box_start|>",
123
+ "<|box_end|>",
124
+ "<|quad_start|>",
125
+ "<|quad_end|>",
126
+ "<|vision_start|>",
127
+ "<|vision_end|>",
128
+ "<|vision_pad|>",
129
+ "<|image_pad|>",
130
+ "<|video_pad|>"
131
+ ],
132
+ "bos_token": null,
133
+ "chat_template": "{% set image_count = namespace(value=0) %}{% set video_count = namespace(value=0) %}{% for message in messages %}{% if loop.first and message['role'] != 'system' %}<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n{% endif %}<|im_start|>{{ message['role'] }}\n{% if message['content'] is string %}{{ message['content'] }}<|im_end|>\n{% else %}{% for content in message['content'] %}{% if content['type'] == 'image' or 'image' in content or 'image_url' in content %}{% set image_count.value = image_count.value + 1 %}{% if add_vision_id %}Picture {{ image_count.value }}: {% endif %}<|vision_start|><|image_pad|><|vision_end|>{% elif content['type'] == 'video' or 'video' in content %}{% set video_count.value = video_count.value + 1 %}{% if add_vision_id %}Video {{ video_count.value }}: {% endif %}<|vision_start|><|video_pad|><|vision_end|>{% elif 'text' in content %}{{ content['text'] }}{% endif %}{% endfor %}<|im_end|>\n{% endif %}{% endfor %}{% if add_generation_prompt %}<|im_start|>assistant\n{% endif %}",
134
+ "clean_up_tokenization_spaces": false,
135
+ "eos_token": "<|im_end|>",
136
+ "errors": "replace",
137
+ "extra_special_tokens": {},
138
+ "model_max_length": 32768,
139
+ "pad_token": "<|endoftext|>",
140
+ "padding_side": "right",
141
+ "processor_class": "Qwen2VLProcessor",
142
+ "split_special_tokens": false,
143
+ "tokenizer_class": "Qwen2Tokenizer",
144
+ "unk_token": null
145
+ }
trainer_state.json ADDED
@@ -0,0 +1,2503 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 5.0,
5
+ "eval_steps": 500,
6
+ "global_step": 190,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "completion_length": 511.59375,
13
+ "epoch": 0.02631578947368421,
14
+ "grad_norm": 0.0,
15
+ "kl": 0.0,
16
+ "learning_rate": 9.973684210526315e-07,
17
+ "loss": 0.0,
18
+ "reward": 2.0,
19
+ "reward_std": 0.0,
20
+ "rewards/accuracy_reward": 1.0,
21
+ "rewards/format_reward": 1.0,
22
+ "step": 1
23
+ },
24
+ {
25
+ "completion_length": 506.4375,
26
+ "epoch": 0.05263157894736842,
27
+ "grad_norm": 1.1859753641586046,
28
+ "kl": 0.0,
29
+ "learning_rate": 9.947368421052631e-07,
30
+ "loss": 0.0,
31
+ "reward": 1.90625,
32
+ "reward_std": 0.13466878235340118,
33
+ "rewards/accuracy_reward": 0.90625,
34
+ "rewards/format_reward": 1.0,
35
+ "step": 2
36
+ },
37
+ {
38
+ "completion_length": 510.25,
39
+ "epoch": 0.07894736842105263,
40
+ "grad_norm": 0.01741859728971303,
41
+ "kl": 0.00041961669921875,
42
+ "learning_rate": 9.921052631578947e-07,
43
+ "loss": 0.0,
44
+ "reward": 1.875,
45
+ "reward_std": 0.0,
46
+ "rewards/accuracy_reward": 0.90625,
47
+ "rewards/format_reward": 0.96875,
48
+ "step": 3
49
+ },
50
+ {
51
+ "completion_length": 500.78125,
52
+ "epoch": 0.10526315789473684,
53
+ "grad_norm": 1.5842460584085565,
54
+ "kl": 0.0003948211669921875,
55
+ "learning_rate": 9.894736842105263e-07,
56
+ "loss": 0.0,
57
+ "reward": 1.75,
58
+ "reward_std": 0.19716878235340118,
59
+ "rewards/accuracy_reward": 0.75,
60
+ "rewards/format_reward": 1.0,
61
+ "step": 4
62
+ },
63
+ {
64
+ "completion_length": 513.125,
65
+ "epoch": 0.13157894736842105,
66
+ "grad_norm": 0.018266102639759176,
67
+ "kl": 0.00038909912109375,
68
+ "learning_rate": 9.868421052631579e-07,
69
+ "loss": 0.0,
70
+ "reward": 2.0,
71
+ "reward_std": 0.0,
72
+ "rewards/accuracy_reward": 1.0,
73
+ "rewards/format_reward": 1.0,
74
+ "step": 5
75
+ },
76
+ {
77
+ "completion_length": 513.5,
78
+ "epoch": 0.15789473684210525,
79
+ "grad_norm": 0.013048600742559903,
80
+ "kl": 0.0004444122314453125,
81
+ "learning_rate": 9.842105263157894e-07,
82
+ "loss": 0.0,
83
+ "reward": 1.875,
84
+ "reward_std": 0.0,
85
+ "rewards/accuracy_reward": 0.875,
86
+ "rewards/format_reward": 1.0,
87
+ "step": 6
88
+ },
89
+ {
90
+ "completion_length": 510.625,
91
+ "epoch": 0.18421052631578946,
92
+ "grad_norm": 1.2716482982161232,
93
+ "kl": 0.000408172607421875,
94
+ "learning_rate": 9.81578947368421e-07,
95
+ "loss": 0.0,
96
+ "reward": 1.90625,
97
+ "reward_std": 0.0625,
98
+ "rewards/accuracy_reward": 0.90625,
99
+ "rewards/format_reward": 1.0,
100
+ "step": 7
101
+ },
102
+ {
103
+ "completion_length": 513.0,
104
+ "epoch": 0.21052631578947367,
105
+ "grad_norm": 0.01666083229438018,
106
+ "kl": 0.0004787445068359375,
107
+ "learning_rate": 9.789473684210526e-07,
108
+ "loss": 0.0,
109
+ "reward": 2.0,
110
+ "reward_std": 0.0,
111
+ "rewards/accuracy_reward": 1.0,
112
+ "rewards/format_reward": 1.0,
113
+ "step": 8
114
+ },
115
+ {
116
+ "completion_length": 503.65625,
117
+ "epoch": 0.23684210526315788,
118
+ "grad_norm": 1.5384360001027126,
119
+ "kl": 0.0005340576171875,
120
+ "learning_rate": 9.763157894736842e-07,
121
+ "loss": 0.0,
122
+ "reward": 1.8125,
123
+ "reward_std": 0.21650634706020355,
124
+ "rewards/accuracy_reward": 0.8125,
125
+ "rewards/format_reward": 1.0,
126
+ "step": 9
127
+ },
128
+ {
129
+ "completion_length": 497.0,
130
+ "epoch": 0.2631578947368421,
131
+ "grad_norm": 0.8586709618188666,
132
+ "kl": 0.0004787445068359375,
133
+ "learning_rate": 9.736842105263158e-07,
134
+ "loss": 0.0,
135
+ "reward": 1.90625,
136
+ "reward_std": 0.0625,
137
+ "rewards/accuracy_reward": 0.90625,
138
+ "rewards/format_reward": 1.0,
139
+ "step": 10
140
+ },
141
+ {
142
+ "completion_length": 500.0,
143
+ "epoch": 0.2894736842105263,
144
+ "grad_norm": 3.3263216841342786,
145
+ "kl": 0.000499725341796875,
146
+ "learning_rate": 9.710526315789474e-07,
147
+ "loss": 0.0,
148
+ "reward": 1.9375,
149
+ "reward_std": 0.125,
150
+ "rewards/accuracy_reward": 0.9375,
151
+ "rewards/format_reward": 1.0,
152
+ "step": 11
153
+ },
154
+ {
155
+ "completion_length": 478.8125,
156
+ "epoch": 0.3157894736842105,
157
+ "grad_norm": 1.4312975247602437,
158
+ "kl": 0.000457763671875,
159
+ "learning_rate": 9.68421052631579e-07,
160
+ "loss": 0.0,
161
+ "reward": 1.96875,
162
+ "reward_std": 0.0625,
163
+ "rewards/accuracy_reward": 0.96875,
164
+ "rewards/format_reward": 1.0,
165
+ "step": 12
166
+ },
167
+ {
168
+ "completion_length": 521.71875,
169
+ "epoch": 0.34210526315789475,
170
+ "grad_norm": 0.9553780876367552,
171
+ "kl": 0.0006103515625,
172
+ "learning_rate": 9.657894736842105e-07,
173
+ "loss": 0.0,
174
+ "reward": 1.96875,
175
+ "reward_std": 0.0625,
176
+ "rewards/accuracy_reward": 0.96875,
177
+ "rewards/format_reward": 1.0,
178
+ "step": 13
179
+ },
180
+ {
181
+ "completion_length": 479.21875,
182
+ "epoch": 0.3684210526315789,
183
+ "grad_norm": 0.04637496251159502,
184
+ "kl": 0.000560760498046875,
185
+ "learning_rate": 9.63157894736842e-07,
186
+ "loss": 0.0,
187
+ "reward": 2.0,
188
+ "reward_std": 0.0,
189
+ "rewards/accuracy_reward": 1.0,
190
+ "rewards/format_reward": 1.0,
191
+ "step": 14
192
+ },
193
+ {
194
+ "completion_length": 497.9375,
195
+ "epoch": 0.39473684210526316,
196
+ "grad_norm": 0.016384627376893796,
197
+ "kl": 0.000553131103515625,
198
+ "learning_rate": 9.605263157894737e-07,
199
+ "loss": 0.0,
200
+ "reward": 1.875,
201
+ "reward_std": 0.0,
202
+ "rewards/accuracy_reward": 0.875,
203
+ "rewards/format_reward": 1.0,
204
+ "step": 15
205
+ },
206
+ {
207
+ "completion_length": 503.09375,
208
+ "epoch": 0.42105263157894735,
209
+ "grad_norm": 4.266561310972031,
210
+ "kl": 0.000637054443359375,
211
+ "learning_rate": 9.578947368421053e-07,
212
+ "loss": 0.0,
213
+ "reward": 1.875,
214
+ "reward_std": 0.125,
215
+ "rewards/accuracy_reward": 0.875,
216
+ "rewards/format_reward": 1.0,
217
+ "step": 16
218
+ },
219
+ {
220
+ "completion_length": 524.1875,
221
+ "epoch": 0.4473684210526316,
222
+ "grad_norm": 1.5312023004868032,
223
+ "kl": 0.00067901611328125,
224
+ "learning_rate": 9.552631578947368e-07,
225
+ "loss": 0.0,
226
+ "reward": 1.9375,
227
+ "reward_std": 0.07216878235340118,
228
+ "rewards/accuracy_reward": 0.9375,
229
+ "rewards/format_reward": 1.0,
230
+ "step": 17
231
+ },
232
+ {
233
+ "completion_length": 502.40625,
234
+ "epoch": 0.47368421052631576,
235
+ "grad_norm": 0.03266540421884785,
236
+ "kl": 0.00070953369140625,
237
+ "learning_rate": 9.526315789473683e-07,
238
+ "loss": 0.0,
239
+ "reward": 2.0,
240
+ "reward_std": 0.0,
241
+ "rewards/accuracy_reward": 1.0,
242
+ "rewards/format_reward": 1.0,
243
+ "step": 18
244
+ },
245
+ {
246
+ "completion_length": 492.34375,
247
+ "epoch": 0.5,
248
+ "grad_norm": 1.657170732210159,
249
+ "kl": 0.000843048095703125,
250
+ "learning_rate": 9.499999999999999e-07,
251
+ "loss": 0.0,
252
+ "reward": 1.96875,
253
+ "reward_std": 0.0625,
254
+ "rewards/accuracy_reward": 1.0,
255
+ "rewards/format_reward": 0.96875,
256
+ "step": 19
257
+ },
258
+ {
259
+ "completion_length": 490.3125,
260
+ "epoch": 0.5263157894736842,
261
+ "grad_norm": 0.026300116989117366,
262
+ "kl": 0.00086212158203125,
263
+ "learning_rate": 9.473684210526315e-07,
264
+ "loss": 0.0,
265
+ "reward": 2.0,
266
+ "reward_std": 0.0,
267
+ "rewards/accuracy_reward": 1.0,
268
+ "rewards/format_reward": 1.0,
269
+ "step": 20
270
+ },
271
+ {
272
+ "completion_length": 496.875,
273
+ "epoch": 0.5526315789473685,
274
+ "grad_norm": 1.0089214071204007,
275
+ "kl": 0.000843048095703125,
276
+ "learning_rate": 9.447368421052632e-07,
277
+ "loss": 0.0,
278
+ "reward": 1.9375,
279
+ "reward_std": 0.07216878235340118,
280
+ "rewards/accuracy_reward": 0.9375,
281
+ "rewards/format_reward": 1.0,
282
+ "step": 21
283
+ },
284
+ {
285
+ "completion_length": 505.3125,
286
+ "epoch": 0.5789473684210527,
287
+ "grad_norm": 2.2869920085637188,
288
+ "kl": 0.00106048583984375,
289
+ "learning_rate": 9.421052631578948e-07,
290
+ "loss": 0.0,
291
+ "reward": 1.84375,
292
+ "reward_std": 0.0625,
293
+ "rewards/accuracy_reward": 0.84375,
294
+ "rewards/format_reward": 1.0,
295
+ "step": 22
296
+ },
297
+ {
298
+ "completion_length": 541.65625,
299
+ "epoch": 0.6052631578947368,
300
+ "grad_norm": 0.6352260789447539,
301
+ "kl": 0.00102996826171875,
302
+ "learning_rate": 9.394736842105263e-07,
303
+ "loss": 0.0,
304
+ "reward": 1.96875,
305
+ "reward_std": 0.0625,
306
+ "rewards/accuracy_reward": 1.0,
307
+ "rewards/format_reward": 0.96875,
308
+ "step": 23
309
+ },
310
+ {
311
+ "completion_length": 514.125,
312
+ "epoch": 0.631578947368421,
313
+ "grad_norm": 0.020950649700612674,
314
+ "kl": 0.00090789794921875,
315
+ "learning_rate": 9.368421052631579e-07,
316
+ "loss": 0.0,
317
+ "reward": 2.0,
318
+ "reward_std": 0.0,
319
+ "rewards/accuracy_reward": 1.0,
320
+ "rewards/format_reward": 1.0,
321
+ "step": 24
322
+ },
323
+ {
324
+ "completion_length": 508.875,
325
+ "epoch": 0.6578947368421053,
326
+ "grad_norm": 0.02679766826877623,
327
+ "kl": 0.001007080078125,
328
+ "learning_rate": 9.342105263157895e-07,
329
+ "loss": 0.0,
330
+ "reward": 2.0,
331
+ "reward_std": 0.0,
332
+ "rewards/accuracy_reward": 1.0,
333
+ "rewards/format_reward": 1.0,
334
+ "step": 25
335
+ },
336
+ {
337
+ "completion_length": 512.8125,
338
+ "epoch": 0.6842105263157895,
339
+ "grad_norm": 0.9944506905480381,
340
+ "kl": 0.00101470947265625,
341
+ "learning_rate": 9.31578947368421e-07,
342
+ "loss": 0.0,
343
+ "reward": 1.96875,
344
+ "reward_std": 0.0625,
345
+ "rewards/accuracy_reward": 0.96875,
346
+ "rewards/format_reward": 1.0,
347
+ "step": 26
348
+ },
349
+ {
350
+ "completion_length": 506.875,
351
+ "epoch": 0.7105263157894737,
352
+ "grad_norm": 0.968143218853605,
353
+ "kl": 0.00107574462890625,
354
+ "learning_rate": 9.289473684210526e-07,
355
+ "loss": 0.0,
356
+ "reward": 1.90625,
357
+ "reward_std": 0.0625,
358
+ "rewards/accuracy_reward": 0.90625,
359
+ "rewards/format_reward": 1.0,
360
+ "step": 27
361
+ },
362
+ {
363
+ "completion_length": 485.5,
364
+ "epoch": 0.7368421052631579,
365
+ "grad_norm": 1.0987810816945758,
366
+ "kl": 0.001129150390625,
367
+ "learning_rate": 9.263157894736841e-07,
368
+ "loss": 0.0,
369
+ "reward": 1.96875,
370
+ "reward_std": 0.0625,
371
+ "rewards/accuracy_reward": 0.96875,
372
+ "rewards/format_reward": 1.0,
373
+ "step": 28
374
+ },
375
+ {
376
+ "completion_length": 502.09375,
377
+ "epoch": 0.7631578947368421,
378
+ "grad_norm": 0.027645198038216884,
379
+ "kl": 0.00115203857421875,
380
+ "learning_rate": 9.236842105263157e-07,
381
+ "loss": 0.0,
382
+ "reward": 2.0,
383
+ "reward_std": 0.0,
384
+ "rewards/accuracy_reward": 1.0,
385
+ "rewards/format_reward": 1.0,
386
+ "step": 29
387
+ },
388
+ {
389
+ "completion_length": 512.3125,
390
+ "epoch": 0.7894736842105263,
391
+ "grad_norm": 0.04172906532475141,
392
+ "kl": 0.001129150390625,
393
+ "learning_rate": 9.210526315789473e-07,
394
+ "loss": 0.0,
395
+ "reward": 2.0,
396
+ "reward_std": 0.0,
397
+ "rewards/accuracy_reward": 1.0,
398
+ "rewards/format_reward": 1.0,
399
+ "step": 30
400
+ },
401
+ {
402
+ "completion_length": 511.8125,
403
+ "epoch": 0.8157894736842105,
404
+ "grad_norm": 1.4555609303743895,
405
+ "kl": 0.00112152099609375,
406
+ "learning_rate": 9.184210526315789e-07,
407
+ "loss": 0.0,
408
+ "reward": 1.96875,
409
+ "reward_std": 0.0625,
410
+ "rewards/accuracy_reward": 0.96875,
411
+ "rewards/format_reward": 1.0,
412
+ "step": 31
413
+ },
414
+ {
415
+ "completion_length": 511.5,
416
+ "epoch": 0.8421052631578947,
417
+ "grad_norm": 0.9929122661974509,
418
+ "kl": 0.00118255615234375,
419
+ "learning_rate": 9.157894736842105e-07,
420
+ "loss": 0.0,
421
+ "reward": 1.875,
422
+ "reward_std": 0.125,
423
+ "rewards/accuracy_reward": 0.90625,
424
+ "rewards/format_reward": 0.96875,
425
+ "step": 32
426
+ },
427
+ {
428
+ "completion_length": 512.8125,
429
+ "epoch": 0.868421052631579,
430
+ "grad_norm": 0.6447662126840653,
431
+ "kl": 0.0010833740234375,
432
+ "learning_rate": 9.13157894736842e-07,
433
+ "loss": 0.0,
434
+ "reward": 1.96875,
435
+ "reward_std": 0.0625,
436
+ "rewards/accuracy_reward": 1.0,
437
+ "rewards/format_reward": 0.96875,
438
+ "step": 33
439
+ },
440
+ {
441
+ "completion_length": 490.28125,
442
+ "epoch": 0.8947368421052632,
443
+ "grad_norm": 0.03130511301152833,
444
+ "kl": 0.001373291015625,
445
+ "learning_rate": 9.105263157894737e-07,
446
+ "loss": 0.0001,
447
+ "reward": 2.0,
448
+ "reward_std": 0.0,
449
+ "rewards/accuracy_reward": 1.0,
450
+ "rewards/format_reward": 1.0,
451
+ "step": 34
452
+ },
453
+ {
454
+ "completion_length": 492.34375,
455
+ "epoch": 0.9210526315789473,
456
+ "grad_norm": 0.03731473780437261,
457
+ "kl": 0.001312255859375,
458
+ "learning_rate": 9.078947368421053e-07,
459
+ "loss": 0.0001,
460
+ "reward": 2.0,
461
+ "reward_std": 0.0,
462
+ "rewards/accuracy_reward": 1.0,
463
+ "rewards/format_reward": 1.0,
464
+ "step": 35
465
+ },
466
+ {
467
+ "completion_length": 500.09375,
468
+ "epoch": 0.9473684210526315,
469
+ "grad_norm": 0.8048521628683286,
470
+ "kl": 0.001373291015625,
471
+ "learning_rate": 9.052631578947368e-07,
472
+ "loss": 0.0001,
473
+ "reward": 1.9375,
474
+ "reward_std": 0.07216878235340118,
475
+ "rewards/accuracy_reward": 0.9375,
476
+ "rewards/format_reward": 1.0,
477
+ "step": 36
478
+ },
479
+ {
480
+ "completion_length": 497.09375,
481
+ "epoch": 0.9736842105263158,
482
+ "grad_norm": 1.0588152232155654,
483
+ "kl": 0.00146484375,
484
+ "learning_rate": 9.026315789473684e-07,
485
+ "loss": 0.0001,
486
+ "reward": 1.96875,
487
+ "reward_std": 0.0625,
488
+ "rewards/accuracy_reward": 0.96875,
489
+ "rewards/format_reward": 1.0,
490
+ "step": 37
491
+ },
492
+ {
493
+ "completion_length": 533.0,
494
+ "epoch": 1.0,
495
+ "grad_norm": 1.7019611225357512,
496
+ "kl": 0.00144195556640625,
497
+ "learning_rate": 9e-07,
498
+ "loss": 0.0001,
499
+ "reward": 2.0,
500
+ "reward_std": 0.10000000149011612,
501
+ "rewards/accuracy_reward": 1.0,
502
+ "rewards/format_reward": 1.0,
503
+ "step": 38
504
+ },
505
+ {
506
+ "completion_length": 513.90625,
507
+ "epoch": 1.0263157894736843,
508
+ "grad_norm": 0.02315223199099485,
509
+ "kl": 0.00136566162109375,
510
+ "learning_rate": 8.973684210526315e-07,
511
+ "loss": 0.0001,
512
+ "reward": 2.0,
513
+ "reward_std": 0.0,
514
+ "rewards/accuracy_reward": 1.0,
515
+ "rewards/format_reward": 1.0,
516
+ "step": 39
517
+ },
518
+ {
519
+ "completion_length": 484.03125,
520
+ "epoch": 1.0526315789473684,
521
+ "grad_norm": 0.5037354331914335,
522
+ "kl": 0.00136566162109375,
523
+ "learning_rate": 8.947368421052631e-07,
524
+ "loss": 0.0001,
525
+ "reward": 2.0,
526
+ "reward_std": 0.0,
527
+ "rewards/accuracy_reward": 1.0,
528
+ "rewards/format_reward": 1.0,
529
+ "step": 40
530
+ },
531
+ {
532
+ "completion_length": 498.09375,
533
+ "epoch": 1.0789473684210527,
534
+ "grad_norm": 1.2181702218163735,
535
+ "kl": 0.00150299072265625,
536
+ "learning_rate": 8.921052631578947e-07,
537
+ "loss": 0.0001,
538
+ "reward": 1.78125,
539
+ "reward_std": 0.13466878235340118,
540
+ "rewards/accuracy_reward": 0.8125,
541
+ "rewards/format_reward": 0.96875,
542
+ "step": 41
543
+ },
544
+ {
545
+ "completion_length": 520.96875,
546
+ "epoch": 1.1052631578947367,
547
+ "grad_norm": 3.2884258137508184,
548
+ "kl": 0.001495361328125,
549
+ "learning_rate": 8.894736842105263e-07,
550
+ "loss": 0.0001,
551
+ "reward": 1.9375,
552
+ "reward_std": 0.125,
553
+ "rewards/accuracy_reward": 0.9375,
554
+ "rewards/format_reward": 1.0,
555
+ "step": 42
556
+ },
557
+ {
558
+ "completion_length": 518.21875,
559
+ "epoch": 1.131578947368421,
560
+ "grad_norm": 1.762389574763672,
561
+ "kl": 0.00171661376953125,
562
+ "learning_rate": 8.868421052631579e-07,
563
+ "loss": 0.0001,
564
+ "reward": 1.875,
565
+ "reward_std": 0.125,
566
+ "rewards/accuracy_reward": 0.875,
567
+ "rewards/format_reward": 1.0,
568
+ "step": 43
569
+ },
570
+ {
571
+ "completion_length": 514.15625,
572
+ "epoch": 1.1578947368421053,
573
+ "grad_norm": 0.027114452970964015,
574
+ "kl": 0.00168609619140625,
575
+ "learning_rate": 8.842105263157895e-07,
576
+ "loss": 0.0001,
577
+ "reward": 2.0,
578
+ "reward_std": 0.0,
579
+ "rewards/accuracy_reward": 1.0,
580
+ "rewards/format_reward": 1.0,
581
+ "step": 44
582
+ },
583
+ {
584
+ "completion_length": 496.59375,
585
+ "epoch": 1.1842105263157894,
586
+ "grad_norm": 0.026564768246094845,
587
+ "kl": 0.00182342529296875,
588
+ "learning_rate": 8.815789473684209e-07,
589
+ "loss": 0.0001,
590
+ "reward": 2.0,
591
+ "reward_std": 0.0,
592
+ "rewards/accuracy_reward": 1.0,
593
+ "rewards/format_reward": 1.0,
594
+ "step": 45
595
+ },
596
+ {
597
+ "completion_length": 504.6875,
598
+ "epoch": 1.2105263157894737,
599
+ "grad_norm": 1.8979762571267376,
600
+ "kl": 0.0017852783203125,
601
+ "learning_rate": 8.789473684210525e-07,
602
+ "loss": 0.0001,
603
+ "reward": 1.96875,
604
+ "reward_std": 0.0625,
605
+ "rewards/accuracy_reward": 1.0,
606
+ "rewards/format_reward": 0.96875,
607
+ "step": 46
608
+ },
609
+ {
610
+ "completion_length": 501.84375,
611
+ "epoch": 1.236842105263158,
612
+ "grad_norm": 0.03582040873644126,
613
+ "kl": 0.0017242431640625,
614
+ "learning_rate": 8.763157894736841e-07,
615
+ "loss": 0.0001,
616
+ "reward": 2.0,
617
+ "reward_std": 0.0,
618
+ "rewards/accuracy_reward": 1.0,
619
+ "rewards/format_reward": 1.0,
620
+ "step": 47
621
+ },
622
+ {
623
+ "completion_length": 503.53125,
624
+ "epoch": 1.263157894736842,
625
+ "grad_norm": 2.144284016014784,
626
+ "kl": 0.002044677734375,
627
+ "learning_rate": 8.736842105263158e-07,
628
+ "loss": 0.0001,
629
+ "reward": 1.90625,
630
+ "reward_std": 0.13466878235340118,
631
+ "rewards/accuracy_reward": 0.90625,
632
+ "rewards/format_reward": 1.0,
633
+ "step": 48
634
+ },
635
+ {
636
+ "completion_length": 504.90625,
637
+ "epoch": 1.2894736842105263,
638
+ "grad_norm": 0.03267048642715876,
639
+ "kl": 0.001922607421875,
640
+ "learning_rate": 8.710526315789474e-07,
641
+ "loss": 0.0001,
642
+ "reward": 2.0,
643
+ "reward_std": 0.0,
644
+ "rewards/accuracy_reward": 1.0,
645
+ "rewards/format_reward": 1.0,
646
+ "step": 49
647
+ },
648
+ {
649
+ "completion_length": 488.125,
650
+ "epoch": 1.3157894736842106,
651
+ "grad_norm": 0.8667798461167672,
652
+ "kl": 0.00182342529296875,
653
+ "learning_rate": 8.684210526315789e-07,
654
+ "loss": 0.0001,
655
+ "reward": 1.9375,
656
+ "reward_std": 0.07216878235340118,
657
+ "rewards/accuracy_reward": 0.9375,
658
+ "rewards/format_reward": 1.0,
659
+ "step": 50
660
+ },
661
+ {
662
+ "completion_length": 498.96875,
663
+ "epoch": 1.3421052631578947,
664
+ "grad_norm": 1.24790653131382,
665
+ "kl": 0.0020599365234375,
666
+ "learning_rate": 8.657894736842105e-07,
667
+ "loss": 0.0001,
668
+ "reward": 1.90625,
669
+ "reward_std": 0.13466878235340118,
670
+ "rewards/accuracy_reward": 0.90625,
671
+ "rewards/format_reward": 1.0,
672
+ "step": 51
673
+ },
674
+ {
675
+ "completion_length": 519.3125,
676
+ "epoch": 1.368421052631579,
677
+ "grad_norm": 0.03953679886184328,
678
+ "kl": 0.001983642578125,
679
+ "learning_rate": 8.631578947368421e-07,
680
+ "loss": 0.0001,
681
+ "reward": 2.0,
682
+ "reward_std": 0.0,
683
+ "rewards/accuracy_reward": 1.0,
684
+ "rewards/format_reward": 1.0,
685
+ "step": 52
686
+ },
687
+ {
688
+ "completion_length": 517.03125,
689
+ "epoch": 1.3947368421052633,
690
+ "grad_norm": 0.7933468259292563,
691
+ "kl": 0.0022125244140625,
692
+ "learning_rate": 8.605263157894737e-07,
693
+ "loss": 0.0001,
694
+ "reward": 1.96875,
695
+ "reward_std": 0.0625,
696
+ "rewards/accuracy_reward": 0.96875,
697
+ "rewards/format_reward": 1.0,
698
+ "step": 53
699
+ },
700
+ {
701
+ "completion_length": 518.46875,
702
+ "epoch": 1.4210526315789473,
703
+ "grad_norm": 1.0167556818631809,
704
+ "kl": 0.0021514892578125,
705
+ "learning_rate": 8.578947368421053e-07,
706
+ "loss": 0.0001,
707
+ "reward": 1.96875,
708
+ "reward_std": 0.0625,
709
+ "rewards/accuracy_reward": 0.96875,
710
+ "rewards/format_reward": 1.0,
711
+ "step": 54
712
+ },
713
+ {
714
+ "completion_length": 504.625,
715
+ "epoch": 1.4473684210526316,
716
+ "grad_norm": 0.030072954640137744,
717
+ "kl": 0.00201416015625,
718
+ "learning_rate": 8.552631578947367e-07,
719
+ "loss": 0.0001,
720
+ "reward": 2.0,
721
+ "reward_std": 0.0,
722
+ "rewards/accuracy_reward": 1.0,
723
+ "rewards/format_reward": 1.0,
724
+ "step": 55
725
+ },
726
+ {
727
+ "completion_length": 487.09375,
728
+ "epoch": 1.4736842105263157,
729
+ "grad_norm": 0.044081948740351436,
730
+ "kl": 0.00238037109375,
731
+ "learning_rate": 8.526315789473683e-07,
732
+ "loss": 0.0001,
733
+ "reward": 2.0,
734
+ "reward_std": 0.0,
735
+ "rewards/accuracy_reward": 1.0,
736
+ "rewards/format_reward": 1.0,
737
+ "step": 56
738
+ },
739
+ {
740
+ "completion_length": 494.84375,
741
+ "epoch": 1.5,
742
+ "grad_norm": 0.6659130960255057,
743
+ "kl": 0.0023193359375,
744
+ "learning_rate": 8.499999999999999e-07,
745
+ "loss": 0.0001,
746
+ "reward": 1.96875,
747
+ "reward_std": 0.0625,
748
+ "rewards/accuracy_reward": 1.0,
749
+ "rewards/format_reward": 0.96875,
750
+ "step": 57
751
+ },
752
+ {
753
+ "completion_length": 502.96875,
754
+ "epoch": 1.526315789473684,
755
+ "grad_norm": 1.2870163334442986,
756
+ "kl": 0.0026397705078125,
757
+ "learning_rate": 8.473684210526315e-07,
758
+ "loss": 0.0001,
759
+ "reward": 1.9375,
760
+ "reward_std": 0.07216878235340118,
761
+ "rewards/accuracy_reward": 0.9375,
762
+ "rewards/format_reward": 1.0,
763
+ "step": 58
764
+ },
765
+ {
766
+ "completion_length": 509.15625,
767
+ "epoch": 1.5526315789473686,
768
+ "grad_norm": 0.768893645703431,
769
+ "kl": 0.002044677734375,
770
+ "learning_rate": 8.447368421052631e-07,
771
+ "loss": 0.0001,
772
+ "reward": 1.96875,
773
+ "reward_std": 0.0625,
774
+ "rewards/accuracy_reward": 0.96875,
775
+ "rewards/format_reward": 1.0,
776
+ "step": 59
777
+ },
778
+ {
779
+ "completion_length": 498.71875,
780
+ "epoch": 1.5789473684210527,
781
+ "grad_norm": 1.2239445462190495,
782
+ "kl": 0.002593994140625,
783
+ "learning_rate": 8.421052631578947e-07,
784
+ "loss": 0.0001,
785
+ "reward": 1.96875,
786
+ "reward_std": 0.0625,
787
+ "rewards/accuracy_reward": 1.0,
788
+ "rewards/format_reward": 0.96875,
789
+ "step": 60
790
+ },
791
+ {
792
+ "completion_length": 519.40625,
793
+ "epoch": 1.6052631578947367,
794
+ "grad_norm": 2.677035126267462,
795
+ "kl": 0.0023193359375,
796
+ "learning_rate": 8.394736842105262e-07,
797
+ "loss": 0.0001,
798
+ "reward": 1.96875,
799
+ "reward_std": 0.0625,
800
+ "rewards/accuracy_reward": 1.0,
801
+ "rewards/format_reward": 0.96875,
802
+ "step": 61
803
+ },
804
+ {
805
+ "completion_length": 505.1875,
806
+ "epoch": 1.631578947368421,
807
+ "grad_norm": 1.8844544141537973,
808
+ "kl": 0.002593994140625,
809
+ "learning_rate": 8.368421052631579e-07,
810
+ "loss": 0.0001,
811
+ "reward": 1.90625,
812
+ "reward_std": 0.0625,
813
+ "rewards/accuracy_reward": 0.90625,
814
+ "rewards/format_reward": 1.0,
815
+ "step": 62
816
+ },
817
+ {
818
+ "completion_length": 498.59375,
819
+ "epoch": 1.6578947368421053,
820
+ "grad_norm": 1.65261105976823,
821
+ "kl": 0.00244140625,
822
+ "learning_rate": 8.342105263157895e-07,
823
+ "loss": 0.0001,
824
+ "reward": 1.90625,
825
+ "reward_std": 0.13466878235340118,
826
+ "rewards/accuracy_reward": 0.90625,
827
+ "rewards/format_reward": 1.0,
828
+ "step": 63
829
+ },
830
+ {
831
+ "completion_length": 517.0,
832
+ "epoch": 1.6842105263157894,
833
+ "grad_norm": 1.2268440042399227,
834
+ "kl": 0.002655029296875,
835
+ "learning_rate": 8.315789473684211e-07,
836
+ "loss": 0.0001,
837
+ "reward": 1.9375,
838
+ "reward_std": 0.125,
839
+ "rewards/accuracy_reward": 0.9375,
840
+ "rewards/format_reward": 1.0,
841
+ "step": 64
842
+ },
843
+ {
844
+ "completion_length": 489.53125,
845
+ "epoch": 1.7105263157894737,
846
+ "grad_norm": 1.1558248277077878,
847
+ "kl": 0.0027008056640625,
848
+ "learning_rate": 8.289473684210527e-07,
849
+ "loss": 0.0001,
850
+ "reward": 1.90625,
851
+ "reward_std": 0.0625,
852
+ "rewards/accuracy_reward": 0.90625,
853
+ "rewards/format_reward": 1.0,
854
+ "step": 65
855
+ },
856
+ {
857
+ "completion_length": 501.09375,
858
+ "epoch": 1.736842105263158,
859
+ "grad_norm": 0.02786918187085701,
860
+ "kl": 0.002227783203125,
861
+ "learning_rate": 8.263157894736841e-07,
862
+ "loss": 0.0001,
863
+ "reward": 1.875,
864
+ "reward_std": 0.0,
865
+ "rewards/accuracy_reward": 0.875,
866
+ "rewards/format_reward": 1.0,
867
+ "step": 66
868
+ },
869
+ {
870
+ "completion_length": 512.65625,
871
+ "epoch": 1.763157894736842,
872
+ "grad_norm": 1.4661151060918443,
873
+ "kl": 0.0027313232421875,
874
+ "learning_rate": 8.236842105263157e-07,
875
+ "loss": 0.0001,
876
+ "reward": 1.9375,
877
+ "reward_std": 0.125,
878
+ "rewards/accuracy_reward": 0.96875,
879
+ "rewards/format_reward": 0.96875,
880
+ "step": 67
881
+ },
882
+ {
883
+ "completion_length": 516.90625,
884
+ "epoch": 1.7894736842105263,
885
+ "grad_norm": 0.03947664659715401,
886
+ "kl": 0.0025482177734375,
887
+ "learning_rate": 8.210526315789473e-07,
888
+ "loss": 0.0001,
889
+ "reward": 1.875,
890
+ "reward_std": 0.0,
891
+ "rewards/accuracy_reward": 0.875,
892
+ "rewards/format_reward": 1.0,
893
+ "step": 68
894
+ },
895
+ {
896
+ "completion_length": 534.34375,
897
+ "epoch": 1.8157894736842106,
898
+ "grad_norm": 0.0321644121580206,
899
+ "kl": 0.002655029296875,
900
+ "learning_rate": 8.184210526315789e-07,
901
+ "loss": 0.0001,
902
+ "reward": 2.0,
903
+ "reward_std": 0.0,
904
+ "rewards/accuracy_reward": 1.0,
905
+ "rewards/format_reward": 1.0,
906
+ "step": 69
907
+ },
908
+ {
909
+ "completion_length": 497.1875,
910
+ "epoch": 1.8421052631578947,
911
+ "grad_norm": 0.8511530790848818,
912
+ "kl": 0.002960205078125,
913
+ "learning_rate": 8.157894736842105e-07,
914
+ "loss": 0.0001,
915
+ "reward": 1.9375,
916
+ "reward_std": 0.07216878235340118,
917
+ "rewards/accuracy_reward": 0.9375,
918
+ "rewards/format_reward": 1.0,
919
+ "step": 70
920
+ },
921
+ {
922
+ "completion_length": 504.625,
923
+ "epoch": 1.868421052631579,
924
+ "grad_norm": 0.045403243082258384,
925
+ "kl": 0.0028228759765625,
926
+ "learning_rate": 8.131578947368421e-07,
927
+ "loss": 0.0001,
928
+ "reward": 2.0,
929
+ "reward_std": 0.0,
930
+ "rewards/accuracy_reward": 1.0,
931
+ "rewards/format_reward": 1.0,
932
+ "step": 71
933
+ },
934
+ {
935
+ "completion_length": 500.15625,
936
+ "epoch": 1.8947368421052633,
937
+ "grad_norm": 1.7186629257319292,
938
+ "kl": 0.0026397705078125,
939
+ "learning_rate": 8.105263157894736e-07,
940
+ "loss": 0.0001,
941
+ "reward": 1.96875,
942
+ "reward_std": 0.0625,
943
+ "rewards/accuracy_reward": 1.0,
944
+ "rewards/format_reward": 0.96875,
945
+ "step": 72
946
+ },
947
+ {
948
+ "completion_length": 502.96875,
949
+ "epoch": 1.9210526315789473,
950
+ "grad_norm": 0.04829244770549609,
951
+ "kl": 0.00244140625,
952
+ "learning_rate": 8.078947368421052e-07,
953
+ "loss": 0.0001,
954
+ "reward": 1.875,
955
+ "reward_std": 0.0,
956
+ "rewards/accuracy_reward": 0.875,
957
+ "rewards/format_reward": 1.0,
958
+ "step": 73
959
+ },
960
+ {
961
+ "completion_length": 503.3125,
962
+ "epoch": 1.9473684210526314,
963
+ "grad_norm": 0.8916174408258744,
964
+ "kl": 0.0023345947265625,
965
+ "learning_rate": 8.052631578947368e-07,
966
+ "loss": 0.0001,
967
+ "reward": 1.96875,
968
+ "reward_std": 0.0625,
969
+ "rewards/accuracy_reward": 0.96875,
970
+ "rewards/format_reward": 1.0,
971
+ "step": 74
972
+ },
973
+ {
974
+ "completion_length": 494.625,
975
+ "epoch": 1.973684210526316,
976
+ "grad_norm": 1.1293143521918012,
977
+ "kl": 0.002655029296875,
978
+ "learning_rate": 8.026315789473685e-07,
979
+ "loss": 0.0001,
980
+ "reward": 1.96875,
981
+ "reward_std": 0.0625,
982
+ "rewards/accuracy_reward": 0.96875,
983
+ "rewards/format_reward": 1.0,
984
+ "step": 75
985
+ },
986
+ {
987
+ "completion_length": 500.0,
988
+ "epoch": 2.0,
989
+ "grad_norm": 3.37331916516421,
990
+ "kl": 0.0027923583984375,
991
+ "learning_rate": 8e-07,
992
+ "loss": 0.0001,
993
+ "reward": 2.0,
994
+ "reward_std": 0.0,
995
+ "rewards/accuracy_reward": 1.0,
996
+ "rewards/format_reward": 1.0,
997
+ "step": 76
998
+ },
999
+ {
1000
+ "completion_length": 531.96875,
1001
+ "epoch": 2.026315789473684,
1002
+ "grad_norm": 0.030167855476728275,
1003
+ "kl": 0.0027618408203125,
1004
+ "learning_rate": 7.973684210526315e-07,
1005
+ "loss": 0.0001,
1006
+ "reward": 2.0,
1007
+ "reward_std": 0.0,
1008
+ "rewards/accuracy_reward": 1.0,
1009
+ "rewards/format_reward": 1.0,
1010
+ "step": 77
1011
+ },
1012
+ {
1013
+ "completion_length": 499.34375,
1014
+ "epoch": 2.0526315789473686,
1015
+ "grad_norm": 1.501743158573559,
1016
+ "kl": 0.00311279296875,
1017
+ "learning_rate": 7.947368421052631e-07,
1018
+ "loss": 0.0001,
1019
+ "reward": 1.8125,
1020
+ "reward_std": 0.125,
1021
+ "rewards/accuracy_reward": 0.84375,
1022
+ "rewards/format_reward": 0.96875,
1023
+ "step": 78
1024
+ },
1025
+ {
1026
+ "completion_length": 492.78125,
1027
+ "epoch": 2.0789473684210527,
1028
+ "grad_norm": 0.03689606923255948,
1029
+ "kl": 0.002838134765625,
1030
+ "learning_rate": 7.921052631578947e-07,
1031
+ "loss": 0.0001,
1032
+ "reward": 2.0,
1033
+ "reward_std": 0.0,
1034
+ "rewards/accuracy_reward": 1.0,
1035
+ "rewards/format_reward": 1.0,
1036
+ "step": 79
1037
+ },
1038
+ {
1039
+ "completion_length": 528.5,
1040
+ "epoch": 2.1052631578947367,
1041
+ "grad_norm": 1.3204028049443157,
1042
+ "kl": 0.0029144287109375,
1043
+ "learning_rate": 7.894736842105263e-07,
1044
+ "loss": 0.0001,
1045
+ "reward": 1.90625,
1046
+ "reward_std": 0.1875,
1047
+ "rewards/accuracy_reward": 0.9375,
1048
+ "rewards/format_reward": 0.96875,
1049
+ "step": 80
1050
+ },
1051
+ {
1052
+ "completion_length": 513.8125,
1053
+ "epoch": 2.1315789473684212,
1054
+ "grad_norm": 0.04731343670470243,
1055
+ "kl": 0.00262451171875,
1056
+ "learning_rate": 7.868421052631579e-07,
1057
+ "loss": 0.0001,
1058
+ "reward": 2.0,
1059
+ "reward_std": 0.0,
1060
+ "rewards/accuracy_reward": 1.0,
1061
+ "rewards/format_reward": 1.0,
1062
+ "step": 81
1063
+ },
1064
+ {
1065
+ "completion_length": 500.4375,
1066
+ "epoch": 2.1578947368421053,
1067
+ "grad_norm": 0.7278429400242111,
1068
+ "kl": 0.00262451171875,
1069
+ "learning_rate": 7.842105263157895e-07,
1070
+ "loss": 0.0001,
1071
+ "reward": 1.90625,
1072
+ "reward_std": 0.0625,
1073
+ "rewards/accuracy_reward": 0.90625,
1074
+ "rewards/format_reward": 1.0,
1075
+ "step": 82
1076
+ },
1077
+ {
1078
+ "completion_length": 520.71875,
1079
+ "epoch": 2.1842105263157894,
1080
+ "grad_norm": 0.9942768526326492,
1081
+ "kl": 0.00274658203125,
1082
+ "learning_rate": 7.81578947368421e-07,
1083
+ "loss": 0.0001,
1084
+ "reward": 1.96875,
1085
+ "reward_std": 0.0625,
1086
+ "rewards/accuracy_reward": 0.96875,
1087
+ "rewards/format_reward": 1.0,
1088
+ "step": 83
1089
+ },
1090
+ {
1091
+ "completion_length": 529.3125,
1092
+ "epoch": 2.2105263157894735,
1093
+ "grad_norm": 0.028533047509329622,
1094
+ "kl": 0.00244140625,
1095
+ "learning_rate": 7.789473684210526e-07,
1096
+ "loss": 0.0001,
1097
+ "reward": 2.0,
1098
+ "reward_std": 0.0,
1099
+ "rewards/accuracy_reward": 1.0,
1100
+ "rewards/format_reward": 1.0,
1101
+ "step": 84
1102
+ },
1103
+ {
1104
+ "completion_length": 520.78125,
1105
+ "epoch": 2.236842105263158,
1106
+ "grad_norm": 1.454115482202384,
1107
+ "kl": 0.002838134765625,
1108
+ "learning_rate": 7.763157894736841e-07,
1109
+ "loss": 0.0001,
1110
+ "reward": 1.875,
1111
+ "reward_std": 0.14433756470680237,
1112
+ "rewards/accuracy_reward": 0.875,
1113
+ "rewards/format_reward": 1.0,
1114
+ "step": 85
1115
+ },
1116
+ {
1117
+ "completion_length": 493.6875,
1118
+ "epoch": 2.263157894736842,
1119
+ "grad_norm": 0.034131542034081065,
1120
+ "kl": 0.002899169921875,
1121
+ "learning_rate": 7.736842105263157e-07,
1122
+ "loss": 0.0001,
1123
+ "reward": 2.0,
1124
+ "reward_std": 0.0,
1125
+ "rewards/accuracy_reward": 1.0,
1126
+ "rewards/format_reward": 1.0,
1127
+ "step": 86
1128
+ },
1129
+ {
1130
+ "completion_length": 495.46875,
1131
+ "epoch": 2.2894736842105265,
1132
+ "grad_norm": 0.04357390543835616,
1133
+ "kl": 0.0027313232421875,
1134
+ "learning_rate": 7.710526315789473e-07,
1135
+ "loss": 0.0001,
1136
+ "reward": 2.0,
1137
+ "reward_std": 0.0,
1138
+ "rewards/accuracy_reward": 1.0,
1139
+ "rewards/format_reward": 1.0,
1140
+ "step": 87
1141
+ },
1142
+ {
1143
+ "completion_length": 508.875,
1144
+ "epoch": 2.3157894736842106,
1145
+ "grad_norm": 1.0055553420607368,
1146
+ "kl": 0.0022735595703125,
1147
+ "learning_rate": 7.684210526315788e-07,
1148
+ "loss": 0.0001,
1149
+ "reward": 1.96875,
1150
+ "reward_std": 0.0625,
1151
+ "rewards/accuracy_reward": 0.96875,
1152
+ "rewards/format_reward": 1.0,
1153
+ "step": 88
1154
+ },
1155
+ {
1156
+ "completion_length": 497.6875,
1157
+ "epoch": 2.3421052631578947,
1158
+ "grad_norm": 1.6914903798873342,
1159
+ "kl": 0.0027313232421875,
1160
+ "learning_rate": 7.657894736842105e-07,
1161
+ "loss": 0.0001,
1162
+ "reward": 1.96875,
1163
+ "reward_std": 0.0625,
1164
+ "rewards/accuracy_reward": 0.96875,
1165
+ "rewards/format_reward": 1.0,
1166
+ "step": 89
1167
+ },
1168
+ {
1169
+ "completion_length": 512.25,
1170
+ "epoch": 2.3684210526315788,
1171
+ "grad_norm": 0.02834284445323136,
1172
+ "kl": 0.002655029296875,
1173
+ "learning_rate": 7.631578947368421e-07,
1174
+ "loss": 0.0001,
1175
+ "reward": 2.0,
1176
+ "reward_std": 0.0,
1177
+ "rewards/accuracy_reward": 1.0,
1178
+ "rewards/format_reward": 1.0,
1179
+ "step": 90
1180
+ },
1181
+ {
1182
+ "completion_length": 522.875,
1183
+ "epoch": 2.3947368421052633,
1184
+ "grad_norm": 0.873621683810661,
1185
+ "kl": 0.0032806396484375,
1186
+ "learning_rate": 7.605263157894737e-07,
1187
+ "loss": 0.0001,
1188
+ "reward": 1.96875,
1189
+ "reward_std": 0.0625,
1190
+ "rewards/accuracy_reward": 0.96875,
1191
+ "rewards/format_reward": 1.0,
1192
+ "step": 91
1193
+ },
1194
+ {
1195
+ "completion_length": 502.59375,
1196
+ "epoch": 2.4210526315789473,
1197
+ "grad_norm": 0.038730383952057044,
1198
+ "kl": 0.0035247802734375,
1199
+ "learning_rate": 7.578947368421053e-07,
1200
+ "loss": 0.0001,
1201
+ "reward": 2.0,
1202
+ "reward_std": 0.0,
1203
+ "rewards/accuracy_reward": 1.0,
1204
+ "rewards/format_reward": 1.0,
1205
+ "step": 92
1206
+ },
1207
+ {
1208
+ "completion_length": 522.78125,
1209
+ "epoch": 2.4473684210526314,
1210
+ "grad_norm": 1.405567089260259,
1211
+ "kl": 0.0030670166015625,
1212
+ "learning_rate": 7.552631578947369e-07,
1213
+ "loss": 0.0001,
1214
+ "reward": 1.96875,
1215
+ "reward_std": 0.0625,
1216
+ "rewards/accuracy_reward": 0.96875,
1217
+ "rewards/format_reward": 1.0,
1218
+ "step": 93
1219
+ },
1220
+ {
1221
+ "completion_length": 505.46875,
1222
+ "epoch": 2.473684210526316,
1223
+ "grad_norm": 0.030020529643763186,
1224
+ "kl": 0.0025634765625,
1225
+ "learning_rate": 7.526315789473684e-07,
1226
+ "loss": 0.0001,
1227
+ "reward": 2.0,
1228
+ "reward_std": 0.0,
1229
+ "rewards/accuracy_reward": 1.0,
1230
+ "rewards/format_reward": 1.0,
1231
+ "step": 94
1232
+ },
1233
+ {
1234
+ "completion_length": 510.5625,
1235
+ "epoch": 2.5,
1236
+ "grad_norm": 1.1924545507060844,
1237
+ "kl": 0.003173828125,
1238
+ "learning_rate": 7.5e-07,
1239
+ "loss": 0.0001,
1240
+ "reward": 1.96875,
1241
+ "reward_std": 0.0625,
1242
+ "rewards/accuracy_reward": 0.96875,
1243
+ "rewards/format_reward": 1.0,
1244
+ "step": 95
1245
+ },
1246
+ {
1247
+ "completion_length": 522.15625,
1248
+ "epoch": 2.526315789473684,
1249
+ "grad_norm": 0.043988683847166775,
1250
+ "kl": 0.003204345703125,
1251
+ "learning_rate": 7.473684210526315e-07,
1252
+ "loss": 0.0001,
1253
+ "reward": 2.0,
1254
+ "reward_std": 0.0,
1255
+ "rewards/accuracy_reward": 1.0,
1256
+ "rewards/format_reward": 1.0,
1257
+ "step": 96
1258
+ },
1259
+ {
1260
+ "completion_length": 506.21875,
1261
+ "epoch": 2.5526315789473686,
1262
+ "grad_norm": 1.2599814660966382,
1263
+ "kl": 0.00372314453125,
1264
+ "learning_rate": 7.447368421052631e-07,
1265
+ "loss": 0.0001,
1266
+ "reward": 1.90625,
1267
+ "reward_std": 0.13466878235340118,
1268
+ "rewards/accuracy_reward": 0.9375,
1269
+ "rewards/format_reward": 0.96875,
1270
+ "step": 97
1271
+ },
1272
+ {
1273
+ "completion_length": 511.0625,
1274
+ "epoch": 2.5789473684210527,
1275
+ "grad_norm": 0.042162872448447394,
1276
+ "kl": 0.0033111572265625,
1277
+ "learning_rate": 7.421052631578947e-07,
1278
+ "loss": 0.0001,
1279
+ "reward": 2.0,
1280
+ "reward_std": 0.0,
1281
+ "rewards/accuracy_reward": 1.0,
1282
+ "rewards/format_reward": 1.0,
1283
+ "step": 98
1284
+ },
1285
+ {
1286
+ "completion_length": 504.90625,
1287
+ "epoch": 2.6052631578947367,
1288
+ "grad_norm": 0.0341121471676267,
1289
+ "kl": 0.0031280517578125,
1290
+ "learning_rate": 7.394736842105262e-07,
1291
+ "loss": 0.0001,
1292
+ "reward": 1.875,
1293
+ "reward_std": 0.0,
1294
+ "rewards/accuracy_reward": 0.875,
1295
+ "rewards/format_reward": 1.0,
1296
+ "step": 99
1297
+ },
1298
+ {
1299
+ "completion_length": 501.53125,
1300
+ "epoch": 2.6315789473684212,
1301
+ "grad_norm": 2.566911802127545,
1302
+ "kl": 0.003265380859375,
1303
+ "learning_rate": 7.368421052631578e-07,
1304
+ "loss": 0.0001,
1305
+ "reward": 1.96875,
1306
+ "reward_std": 0.0625,
1307
+ "rewards/accuracy_reward": 0.96875,
1308
+ "rewards/format_reward": 1.0,
1309
+ "step": 100
1310
+ },
1311
+ {
1312
+ "completion_length": 498.875,
1313
+ "epoch": 2.6578947368421053,
1314
+ "grad_norm": 0.03337527256197859,
1315
+ "kl": 0.003082275390625,
1316
+ "learning_rate": 7.342105263157894e-07,
1317
+ "loss": 0.0001,
1318
+ "reward": 2.0,
1319
+ "reward_std": 0.0,
1320
+ "rewards/accuracy_reward": 1.0,
1321
+ "rewards/format_reward": 1.0,
1322
+ "step": 101
1323
+ },
1324
+ {
1325
+ "completion_length": 497.65625,
1326
+ "epoch": 2.6842105263157894,
1327
+ "grad_norm": 0.04741778746371284,
1328
+ "kl": 0.003662109375,
1329
+ "learning_rate": 7.315789473684211e-07,
1330
+ "loss": 0.0001,
1331
+ "reward": 2.0,
1332
+ "reward_std": 0.0,
1333
+ "rewards/accuracy_reward": 1.0,
1334
+ "rewards/format_reward": 1.0,
1335
+ "step": 102
1336
+ },
1337
+ {
1338
+ "completion_length": 487.15625,
1339
+ "epoch": 2.7105263157894735,
1340
+ "grad_norm": 1.8393077262931932,
1341
+ "kl": 0.00372314453125,
1342
+ "learning_rate": 7.289473684210527e-07,
1343
+ "loss": 0.0001,
1344
+ "reward": 1.96875,
1345
+ "reward_std": 0.0625,
1346
+ "rewards/accuracy_reward": 0.96875,
1347
+ "rewards/format_reward": 1.0,
1348
+ "step": 103
1349
+ },
1350
+ {
1351
+ "completion_length": 521.0625,
1352
+ "epoch": 2.736842105263158,
1353
+ "grad_norm": 0.03889186679405788,
1354
+ "kl": 0.0036468505859375,
1355
+ "learning_rate": 7.263157894736843e-07,
1356
+ "loss": 0.0001,
1357
+ "reward": 2.0,
1358
+ "reward_std": 0.0,
1359
+ "rewards/accuracy_reward": 1.0,
1360
+ "rewards/format_reward": 1.0,
1361
+ "step": 104
1362
+ },
1363
+ {
1364
+ "completion_length": 510.5625,
1365
+ "epoch": 2.763157894736842,
1366
+ "grad_norm": 1.447109219593432,
1367
+ "kl": 0.0037078857421875,
1368
+ "learning_rate": 7.236842105263158e-07,
1369
+ "loss": 0.0001,
1370
+ "reward": 1.8125,
1371
+ "reward_std": 0.125,
1372
+ "rewards/accuracy_reward": 0.84375,
1373
+ "rewards/format_reward": 0.96875,
1374
+ "step": 105
1375
+ },
1376
+ {
1377
+ "completion_length": 509.71875,
1378
+ "epoch": 2.7894736842105265,
1379
+ "grad_norm": 1.4858428116278655,
1380
+ "kl": 0.003326416015625,
1381
+ "learning_rate": 7.210526315789473e-07,
1382
+ "loss": 0.0001,
1383
+ "reward": 1.96875,
1384
+ "reward_std": 0.0625,
1385
+ "rewards/accuracy_reward": 0.96875,
1386
+ "rewards/format_reward": 1.0,
1387
+ "step": 106
1388
+ },
1389
+ {
1390
+ "completion_length": 508.40625,
1391
+ "epoch": 2.8157894736842106,
1392
+ "grad_norm": 0.961549949503767,
1393
+ "kl": 0.00323486328125,
1394
+ "learning_rate": 7.184210526315789e-07,
1395
+ "loss": 0.0001,
1396
+ "reward": 1.96875,
1397
+ "reward_std": 0.0625,
1398
+ "rewards/accuracy_reward": 0.96875,
1399
+ "rewards/format_reward": 1.0,
1400
+ "step": 107
1401
+ },
1402
+ {
1403
+ "completion_length": 510.0625,
1404
+ "epoch": 2.8421052631578947,
1405
+ "grad_norm": 1.202043926324514,
1406
+ "kl": 0.0030670166015625,
1407
+ "learning_rate": 7.157894736842105e-07,
1408
+ "loss": 0.0001,
1409
+ "reward": 1.96875,
1410
+ "reward_std": 0.0625,
1411
+ "rewards/accuracy_reward": 0.96875,
1412
+ "rewards/format_reward": 1.0,
1413
+ "step": 108
1414
+ },
1415
+ {
1416
+ "completion_length": 501.46875,
1417
+ "epoch": 2.8684210526315788,
1418
+ "grad_norm": 0.8258294441704436,
1419
+ "kl": 0.0034637451171875,
1420
+ "learning_rate": 7.131578947368421e-07,
1421
+ "loss": 0.0001,
1422
+ "reward": 1.96875,
1423
+ "reward_std": 0.0625,
1424
+ "rewards/accuracy_reward": 1.0,
1425
+ "rewards/format_reward": 0.96875,
1426
+ "step": 109
1427
+ },
1428
+ {
1429
+ "completion_length": 536.15625,
1430
+ "epoch": 2.8947368421052633,
1431
+ "grad_norm": 0.7881046328867846,
1432
+ "kl": 0.003448486328125,
1433
+ "learning_rate": 7.105263157894736e-07,
1434
+ "loss": 0.0001,
1435
+ "reward": 1.96875,
1436
+ "reward_std": 0.0625,
1437
+ "rewards/accuracy_reward": 0.96875,
1438
+ "rewards/format_reward": 1.0,
1439
+ "step": 110
1440
+ },
1441
+ {
1442
+ "completion_length": 506.75,
1443
+ "epoch": 2.9210526315789473,
1444
+ "grad_norm": 0.04116293609934439,
1445
+ "kl": 0.0035858154296875,
1446
+ "learning_rate": 7.078947368421052e-07,
1447
+ "loss": 0.0001,
1448
+ "reward": 2.0,
1449
+ "reward_std": 0.0,
1450
+ "rewards/accuracy_reward": 1.0,
1451
+ "rewards/format_reward": 1.0,
1452
+ "step": 111
1453
+ },
1454
+ {
1455
+ "completion_length": 521.1875,
1456
+ "epoch": 2.9473684210526314,
1457
+ "grad_norm": 1.0874707114277227,
1458
+ "kl": 0.0035552978515625,
1459
+ "learning_rate": 7.052631578947368e-07,
1460
+ "loss": 0.0001,
1461
+ "reward": 1.78125,
1462
+ "reward_std": 0.13466878235340118,
1463
+ "rewards/accuracy_reward": 0.78125,
1464
+ "rewards/format_reward": 1.0,
1465
+ "step": 112
1466
+ },
1467
+ {
1468
+ "completion_length": 511.28125,
1469
+ "epoch": 2.973684210526316,
1470
+ "grad_norm": 0.0625092599479988,
1471
+ "kl": 0.003448486328125,
1472
+ "learning_rate": 7.026315789473684e-07,
1473
+ "loss": 0.0001,
1474
+ "reward": 2.0,
1475
+ "reward_std": 0.0,
1476
+ "rewards/accuracy_reward": 1.0,
1477
+ "rewards/format_reward": 1.0,
1478
+ "step": 113
1479
+ },
1480
+ {
1481
+ "completion_length": 503.8000183105469,
1482
+ "epoch": 3.0,
1483
+ "grad_norm": 0.03814663470015353,
1484
+ "kl": 0.0034332275390625,
1485
+ "learning_rate": 7e-07,
1486
+ "loss": 0.0001,
1487
+ "reward": 2.0,
1488
+ "reward_std": 0.0,
1489
+ "rewards/accuracy_reward": 1.0,
1490
+ "rewards/format_reward": 1.0,
1491
+ "step": 114
1492
+ },
1493
+ {
1494
+ "completion_length": 507.78125,
1495
+ "epoch": 3.026315789473684,
1496
+ "grad_norm": 0.05686010982708928,
1497
+ "kl": 0.0034027099609375,
1498
+ "learning_rate": 6.973684210526314e-07,
1499
+ "loss": 0.0001,
1500
+ "reward": 2.0,
1501
+ "reward_std": 0.0,
1502
+ "rewards/accuracy_reward": 1.0,
1503
+ "rewards/format_reward": 1.0,
1504
+ "step": 115
1505
+ },
1506
+ {
1507
+ "completion_length": 536.5,
1508
+ "epoch": 3.0526315789473686,
1509
+ "grad_norm": 0.04279707484724643,
1510
+ "kl": 0.003021240234375,
1511
+ "learning_rate": 6.947368421052631e-07,
1512
+ "loss": 0.0001,
1513
+ "reward": 2.0,
1514
+ "reward_std": 0.0,
1515
+ "rewards/accuracy_reward": 1.0,
1516
+ "rewards/format_reward": 1.0,
1517
+ "step": 116
1518
+ },
1519
+ {
1520
+ "completion_length": 504.84375,
1521
+ "epoch": 3.0789473684210527,
1522
+ "grad_norm": 0.8334012538858381,
1523
+ "kl": 0.0032958984375,
1524
+ "learning_rate": 6.921052631578947e-07,
1525
+ "loss": 0.0001,
1526
+ "reward": 1.96875,
1527
+ "reward_std": 0.0625,
1528
+ "rewards/accuracy_reward": 0.96875,
1529
+ "rewards/format_reward": 1.0,
1530
+ "step": 117
1531
+ },
1532
+ {
1533
+ "completion_length": 499.84375,
1534
+ "epoch": 3.1052631578947367,
1535
+ "grad_norm": 0.9953068967016894,
1536
+ "kl": 0.0040283203125,
1537
+ "learning_rate": 6.894736842105263e-07,
1538
+ "loss": 0.0002,
1539
+ "reward": 1.96875,
1540
+ "reward_std": 0.0625,
1541
+ "rewards/accuracy_reward": 0.96875,
1542
+ "rewards/format_reward": 1.0,
1543
+ "step": 118
1544
+ },
1545
+ {
1546
+ "completion_length": 511.59375,
1547
+ "epoch": 3.1315789473684212,
1548
+ "grad_norm": 0.03618191894604707,
1549
+ "kl": 0.0034027099609375,
1550
+ "learning_rate": 6.868421052631579e-07,
1551
+ "loss": 0.0001,
1552
+ "reward": 2.0,
1553
+ "reward_std": 0.0,
1554
+ "rewards/accuracy_reward": 1.0,
1555
+ "rewards/format_reward": 1.0,
1556
+ "step": 119
1557
+ },
1558
+ {
1559
+ "completion_length": 521.28125,
1560
+ "epoch": 3.1578947368421053,
1561
+ "grad_norm": 1.3499675363862598,
1562
+ "kl": 0.00384521484375,
1563
+ "learning_rate": 6.842105263157895e-07,
1564
+ "loss": 0.0002,
1565
+ "reward": 1.9375,
1566
+ "reward_std": 0.125,
1567
+ "rewards/accuracy_reward": 0.9375,
1568
+ "rewards/format_reward": 1.0,
1569
+ "step": 120
1570
+ },
1571
+ {
1572
+ "completion_length": 508.84375,
1573
+ "epoch": 3.1842105263157894,
1574
+ "grad_norm": 1.3905859323416692,
1575
+ "kl": 0.0034942626953125,
1576
+ "learning_rate": 6.81578947368421e-07,
1577
+ "loss": 0.0001,
1578
+ "reward": 1.96875,
1579
+ "reward_std": 0.0625,
1580
+ "rewards/accuracy_reward": 0.96875,
1581
+ "rewards/format_reward": 1.0,
1582
+ "step": 121
1583
+ },
1584
+ {
1585
+ "completion_length": 517.40625,
1586
+ "epoch": 3.2105263157894735,
1587
+ "grad_norm": 1.3622360911755893,
1588
+ "kl": 0.0035552978515625,
1589
+ "learning_rate": 6.789473684210526e-07,
1590
+ "loss": 0.0001,
1591
+ "reward": 1.96875,
1592
+ "reward_std": 0.0625,
1593
+ "rewards/accuracy_reward": 0.96875,
1594
+ "rewards/format_reward": 1.0,
1595
+ "step": 122
1596
+ },
1597
+ {
1598
+ "completion_length": 495.875,
1599
+ "epoch": 3.236842105263158,
1600
+ "grad_norm": 1.451454972303075,
1601
+ "kl": 0.003509521484375,
1602
+ "learning_rate": 6.763157894736842e-07,
1603
+ "loss": 0.0001,
1604
+ "reward": 1.875,
1605
+ "reward_std": 0.19716878235340118,
1606
+ "rewards/accuracy_reward": 0.90625,
1607
+ "rewards/format_reward": 0.96875,
1608
+ "step": 123
1609
+ },
1610
+ {
1611
+ "completion_length": 498.40625,
1612
+ "epoch": 3.263157894736842,
1613
+ "grad_norm": 0.06927241278752044,
1614
+ "kl": 0.0036773681640625,
1615
+ "learning_rate": 6.736842105263158e-07,
1616
+ "loss": 0.0001,
1617
+ "reward": 2.0,
1618
+ "reward_std": 0.0,
1619
+ "rewards/accuracy_reward": 1.0,
1620
+ "rewards/format_reward": 1.0,
1621
+ "step": 124
1622
+ },
1623
+ {
1624
+ "completion_length": 518.03125,
1625
+ "epoch": 3.2894736842105265,
1626
+ "grad_norm": 0.8762828465082988,
1627
+ "kl": 0.0033721923828125,
1628
+ "learning_rate": 6.710526315789473e-07,
1629
+ "loss": 0.0001,
1630
+ "reward": 1.875,
1631
+ "reward_std": 0.125,
1632
+ "rewards/accuracy_reward": 0.90625,
1633
+ "rewards/format_reward": 0.96875,
1634
+ "step": 125
1635
+ },
1636
+ {
1637
+ "completion_length": 525.96875,
1638
+ "epoch": 3.3157894736842106,
1639
+ "grad_norm": 0.1279472603343596,
1640
+ "kl": 0.0032196044921875,
1641
+ "learning_rate": 6.684210526315788e-07,
1642
+ "loss": 0.0001,
1643
+ "reward": 2.0,
1644
+ "reward_std": 0.0,
1645
+ "rewards/accuracy_reward": 1.0,
1646
+ "rewards/format_reward": 1.0,
1647
+ "step": 126
1648
+ },
1649
+ {
1650
+ "completion_length": 488.0625,
1651
+ "epoch": 3.3421052631578947,
1652
+ "grad_norm": 0.31566337930874167,
1653
+ "kl": 0.0032196044921875,
1654
+ "learning_rate": 6.657894736842104e-07,
1655
+ "loss": 0.0001,
1656
+ "reward": 2.0,
1657
+ "reward_std": 0.0,
1658
+ "rewards/accuracy_reward": 1.0,
1659
+ "rewards/format_reward": 1.0,
1660
+ "step": 127
1661
+ },
1662
+ {
1663
+ "completion_length": 513.09375,
1664
+ "epoch": 3.3684210526315788,
1665
+ "grad_norm": 2.827017411958231,
1666
+ "kl": 0.00457763671875,
1667
+ "learning_rate": 6.63157894736842e-07,
1668
+ "loss": 0.0002,
1669
+ "reward": 1.8125,
1670
+ "reward_std": 0.25,
1671
+ "rewards/accuracy_reward": 0.8125,
1672
+ "rewards/format_reward": 1.0,
1673
+ "step": 128
1674
+ },
1675
+ {
1676
+ "completion_length": 494.71875,
1677
+ "epoch": 3.3947368421052633,
1678
+ "grad_norm": 1.1860759612828082,
1679
+ "kl": 0.003631591796875,
1680
+ "learning_rate": 6.605263157894737e-07,
1681
+ "loss": 0.0001,
1682
+ "reward": 1.96875,
1683
+ "reward_std": 0.0625,
1684
+ "rewards/accuracy_reward": 0.96875,
1685
+ "rewards/format_reward": 1.0,
1686
+ "step": 129
1687
+ },
1688
+ {
1689
+ "completion_length": 512.53125,
1690
+ "epoch": 3.4210526315789473,
1691
+ "grad_norm": 0.03855778832036919,
1692
+ "kl": 0.0036468505859375,
1693
+ "learning_rate": 6.578947368421053e-07,
1694
+ "loss": 0.0001,
1695
+ "reward": 2.0,
1696
+ "reward_std": 0.0,
1697
+ "rewards/accuracy_reward": 1.0,
1698
+ "rewards/format_reward": 1.0,
1699
+ "step": 130
1700
+ },
1701
+ {
1702
+ "completion_length": 519.5625,
1703
+ "epoch": 3.4473684210526314,
1704
+ "grad_norm": 0.04402464100179393,
1705
+ "kl": 0.00347900390625,
1706
+ "learning_rate": 6.552631578947369e-07,
1707
+ "loss": 0.0001,
1708
+ "reward": 2.0,
1709
+ "reward_std": 0.0,
1710
+ "rewards/accuracy_reward": 1.0,
1711
+ "rewards/format_reward": 1.0,
1712
+ "step": 131
1713
+ },
1714
+ {
1715
+ "completion_length": 486.21875,
1716
+ "epoch": 3.473684210526316,
1717
+ "grad_norm": 0.03890279645364714,
1718
+ "kl": 0.003509521484375,
1719
+ "learning_rate": 6.526315789473684e-07,
1720
+ "loss": 0.0001,
1721
+ "reward": 2.0,
1722
+ "reward_std": 0.0,
1723
+ "rewards/accuracy_reward": 1.0,
1724
+ "rewards/format_reward": 1.0,
1725
+ "step": 132
1726
+ },
1727
+ {
1728
+ "completion_length": 497.28125,
1729
+ "epoch": 3.5,
1730
+ "grad_norm": 0.9474366715612303,
1731
+ "kl": 0.004364013671875,
1732
+ "learning_rate": 6.5e-07,
1733
+ "loss": 0.0002,
1734
+ "reward": 1.90625,
1735
+ "reward_std": 0.0625,
1736
+ "rewards/accuracy_reward": 0.90625,
1737
+ "rewards/format_reward": 1.0,
1738
+ "step": 133
1739
+ },
1740
+ {
1741
+ "completion_length": 495.59375,
1742
+ "epoch": 3.526315789473684,
1743
+ "grad_norm": 1.3876819486259453,
1744
+ "kl": 0.0037689208984375,
1745
+ "learning_rate": 6.473684210526316e-07,
1746
+ "loss": 0.0002,
1747
+ "reward": 1.96875,
1748
+ "reward_std": 0.0625,
1749
+ "rewards/accuracy_reward": 0.96875,
1750
+ "rewards/format_reward": 1.0,
1751
+ "step": 134
1752
+ },
1753
+ {
1754
+ "completion_length": 509.0,
1755
+ "epoch": 3.5526315789473686,
1756
+ "grad_norm": 0.04968025093227853,
1757
+ "kl": 0.0034027099609375,
1758
+ "learning_rate": 6.447368421052632e-07,
1759
+ "loss": 0.0001,
1760
+ "reward": 2.0,
1761
+ "reward_std": 0.0,
1762
+ "rewards/accuracy_reward": 1.0,
1763
+ "rewards/format_reward": 1.0,
1764
+ "step": 135
1765
+ },
1766
+ {
1767
+ "completion_length": 512.90625,
1768
+ "epoch": 3.5789473684210527,
1769
+ "grad_norm": 2.6370590276884385,
1770
+ "kl": 0.00433349609375,
1771
+ "learning_rate": 6.421052631578947e-07,
1772
+ "loss": 0.0002,
1773
+ "reward": 1.96875,
1774
+ "reward_std": 0.0625,
1775
+ "rewards/accuracy_reward": 1.0,
1776
+ "rewards/format_reward": 0.96875,
1777
+ "step": 136
1778
+ },
1779
+ {
1780
+ "completion_length": 515.46875,
1781
+ "epoch": 3.6052631578947367,
1782
+ "grad_norm": 0.9919508500122917,
1783
+ "kl": 0.00469970703125,
1784
+ "learning_rate": 6.394736842105262e-07,
1785
+ "loss": 0.0002,
1786
+ "reward": 1.9375,
1787
+ "reward_std": 0.125,
1788
+ "rewards/accuracy_reward": 0.9375,
1789
+ "rewards/format_reward": 1.0,
1790
+ "step": 137
1791
+ },
1792
+ {
1793
+ "completion_length": 486.75,
1794
+ "epoch": 3.6315789473684212,
1795
+ "grad_norm": 0.03323526791149113,
1796
+ "kl": 0.003204345703125,
1797
+ "learning_rate": 6.368421052631578e-07,
1798
+ "loss": 0.0001,
1799
+ "reward": 2.0,
1800
+ "reward_std": 0.0,
1801
+ "rewards/accuracy_reward": 1.0,
1802
+ "rewards/format_reward": 1.0,
1803
+ "step": 138
1804
+ },
1805
+ {
1806
+ "completion_length": 503.5625,
1807
+ "epoch": 3.6578947368421053,
1808
+ "grad_norm": 1.1252637437400366,
1809
+ "kl": 0.0037841796875,
1810
+ "learning_rate": 6.342105263157894e-07,
1811
+ "loss": 0.0002,
1812
+ "reward": 1.90625,
1813
+ "reward_std": 0.13466878235340118,
1814
+ "rewards/accuracy_reward": 0.90625,
1815
+ "rewards/format_reward": 1.0,
1816
+ "step": 139
1817
+ },
1818
+ {
1819
+ "completion_length": 517.40625,
1820
+ "epoch": 3.6842105263157894,
1821
+ "grad_norm": 0.8025074781730501,
1822
+ "kl": 0.004150390625,
1823
+ "learning_rate": 6.31578947368421e-07,
1824
+ "loss": 0.0002,
1825
+ "reward": 1.9375,
1826
+ "reward_std": 0.07216878235340118,
1827
+ "rewards/accuracy_reward": 0.9375,
1828
+ "rewards/format_reward": 1.0,
1829
+ "step": 140
1830
+ },
1831
+ {
1832
+ "completion_length": 510.21875,
1833
+ "epoch": 3.7105263157894735,
1834
+ "grad_norm": 0.032038711480624,
1835
+ "kl": 0.003448486328125,
1836
+ "learning_rate": 6.289473684210526e-07,
1837
+ "loss": 0.0001,
1838
+ "reward": 2.0,
1839
+ "reward_std": 0.0,
1840
+ "rewards/accuracy_reward": 1.0,
1841
+ "rewards/format_reward": 1.0,
1842
+ "step": 141
1843
+ },
1844
+ {
1845
+ "completion_length": 505.65625,
1846
+ "epoch": 3.736842105263158,
1847
+ "grad_norm": 0.030986940813949752,
1848
+ "kl": 0.0034637451171875,
1849
+ "learning_rate": 6.263157894736842e-07,
1850
+ "loss": 0.0001,
1851
+ "reward": 2.0,
1852
+ "reward_std": 0.0,
1853
+ "rewards/accuracy_reward": 1.0,
1854
+ "rewards/format_reward": 1.0,
1855
+ "step": 142
1856
+ },
1857
+ {
1858
+ "completion_length": 521.4375,
1859
+ "epoch": 3.763157894736842,
1860
+ "grad_norm": 0.03486593372780562,
1861
+ "kl": 0.00341796875,
1862
+ "learning_rate": 6.236842105263158e-07,
1863
+ "loss": 0.0001,
1864
+ "reward": 1.875,
1865
+ "reward_std": 0.0,
1866
+ "rewards/accuracy_reward": 0.875,
1867
+ "rewards/format_reward": 1.0,
1868
+ "step": 143
1869
+ },
1870
+ {
1871
+ "completion_length": 503.1875,
1872
+ "epoch": 3.7894736842105265,
1873
+ "grad_norm": 0.9150417772985632,
1874
+ "kl": 0.004150390625,
1875
+ "learning_rate": 6.210526315789474e-07,
1876
+ "loss": 0.0002,
1877
+ "reward": 1.96875,
1878
+ "reward_std": 0.0625,
1879
+ "rewards/accuracy_reward": 1.0,
1880
+ "rewards/format_reward": 0.96875,
1881
+ "step": 144
1882
+ },
1883
+ {
1884
+ "completion_length": 504.9375,
1885
+ "epoch": 3.8157894736842106,
1886
+ "grad_norm": 1.2738344698727906,
1887
+ "kl": 0.00396728515625,
1888
+ "learning_rate": 6.18421052631579e-07,
1889
+ "loss": 0.0002,
1890
+ "reward": 1.90625,
1891
+ "reward_std": 0.13466878235340118,
1892
+ "rewards/accuracy_reward": 0.90625,
1893
+ "rewards/format_reward": 1.0,
1894
+ "step": 145
1895
+ },
1896
+ {
1897
+ "completion_length": 503.25,
1898
+ "epoch": 3.8421052631578947,
1899
+ "grad_norm": 1.1946263189029565,
1900
+ "kl": 0.0034332275390625,
1901
+ "learning_rate": 6.157894736842105e-07,
1902
+ "loss": 0.0001,
1903
+ "reward": 1.875,
1904
+ "reward_std": 0.125,
1905
+ "rewards/accuracy_reward": 0.875,
1906
+ "rewards/format_reward": 1.0,
1907
+ "step": 146
1908
+ },
1909
+ {
1910
+ "completion_length": 534.65625,
1911
+ "epoch": 3.8684210526315788,
1912
+ "grad_norm": 1.0916070617134428,
1913
+ "kl": 0.003570556640625,
1914
+ "learning_rate": 6.131578947368421e-07,
1915
+ "loss": 0.0001,
1916
+ "reward": 1.96875,
1917
+ "reward_std": 0.0625,
1918
+ "rewards/accuracy_reward": 0.96875,
1919
+ "rewards/format_reward": 1.0,
1920
+ "step": 147
1921
+ },
1922
+ {
1923
+ "completion_length": 496.53125,
1924
+ "epoch": 3.8947368421052633,
1925
+ "grad_norm": 0.04197200000816943,
1926
+ "kl": 0.00335693359375,
1927
+ "learning_rate": 6.105263157894736e-07,
1928
+ "loss": 0.0001,
1929
+ "reward": 2.0,
1930
+ "reward_std": 0.0,
1931
+ "rewards/accuracy_reward": 1.0,
1932
+ "rewards/format_reward": 1.0,
1933
+ "step": 148
1934
+ },
1935
+ {
1936
+ "completion_length": 505.0625,
1937
+ "epoch": 3.9210526315789473,
1938
+ "grad_norm": 0.9112054136826518,
1939
+ "kl": 0.0034942626953125,
1940
+ "learning_rate": 6.078947368421052e-07,
1941
+ "loss": 0.0001,
1942
+ "reward": 1.9375,
1943
+ "reward_std": 0.07216878235340118,
1944
+ "rewards/accuracy_reward": 0.9375,
1945
+ "rewards/format_reward": 1.0,
1946
+ "step": 149
1947
+ },
1948
+ {
1949
+ "completion_length": 491.9375,
1950
+ "epoch": 3.9473684210526314,
1951
+ "grad_norm": 0.896485459132187,
1952
+ "kl": 0.0036468505859375,
1953
+ "learning_rate": 6.052631578947368e-07,
1954
+ "loss": 0.0001,
1955
+ "reward": 1.96875,
1956
+ "reward_std": 0.0625,
1957
+ "rewards/accuracy_reward": 0.96875,
1958
+ "rewards/format_reward": 1.0,
1959
+ "step": 150
1960
+ },
1961
+ {
1962
+ "completion_length": 497.46875,
1963
+ "epoch": 3.973684210526316,
1964
+ "grad_norm": 0.7253680478752668,
1965
+ "kl": 0.004150390625,
1966
+ "learning_rate": 6.026315789473684e-07,
1967
+ "loss": 0.0002,
1968
+ "reward": 1.96875,
1969
+ "reward_std": 0.0625,
1970
+ "rewards/accuracy_reward": 0.96875,
1971
+ "rewards/format_reward": 1.0,
1972
+ "step": 151
1973
+ },
1974
+ {
1975
+ "completion_length": 455.3999938964844,
1976
+ "epoch": 4.0,
1977
+ "grad_norm": 0.04315556382921662,
1978
+ "kl": 0.003662109375,
1979
+ "learning_rate": 6e-07,
1980
+ "loss": 0.0001,
1981
+ "reward": 2.0,
1982
+ "reward_std": 0.0,
1983
+ "rewards/accuracy_reward": 1.0,
1984
+ "rewards/format_reward": 1.0,
1985
+ "step": 152
1986
+ },
1987
+ {
1988
+ "completion_length": 503.625,
1989
+ "epoch": 4.026315789473684,
1990
+ "grad_norm": 0.03450640103445653,
1991
+ "kl": 0.0038299560546875,
1992
+ "learning_rate": 5.973684210526316e-07,
1993
+ "loss": 0.0002,
1994
+ "reward": 2.0,
1995
+ "reward_std": 0.0,
1996
+ "rewards/accuracy_reward": 1.0,
1997
+ "rewards/format_reward": 1.0,
1998
+ "step": 153
1999
+ },
2000
+ {
2001
+ "completion_length": 510.9375,
2002
+ "epoch": 4.052631578947368,
2003
+ "grad_norm": 0.8027374171690022,
2004
+ "kl": 0.003326416015625,
2005
+ "learning_rate": 5.947368421052631e-07,
2006
+ "loss": 0.0001,
2007
+ "reward": 1.96875,
2008
+ "reward_std": 0.0625,
2009
+ "rewards/accuracy_reward": 0.96875,
2010
+ "rewards/format_reward": 1.0,
2011
+ "step": 154
2012
+ },
2013
+ {
2014
+ "completion_length": 528.375,
2015
+ "epoch": 4.078947368421052,
2016
+ "grad_norm": 0.834678814594713,
2017
+ "kl": 0.0042724609375,
2018
+ "learning_rate": 5.921052631578946e-07,
2019
+ "loss": 0.0002,
2020
+ "reward": 1.9375,
2021
+ "reward_std": 0.125,
2022
+ "rewards/accuracy_reward": 0.96875,
2023
+ "rewards/format_reward": 0.96875,
2024
+ "step": 155
2025
+ },
2026
+ {
2027
+ "completion_length": 528.59375,
2028
+ "epoch": 4.105263157894737,
2029
+ "grad_norm": 1.5126161433832532,
2030
+ "kl": 0.0036468505859375,
2031
+ "learning_rate": 5.894736842105262e-07,
2032
+ "loss": 0.0001,
2033
+ "reward": 1.90625,
2034
+ "reward_std": 0.13466878235340118,
2035
+ "rewards/accuracy_reward": 0.90625,
2036
+ "rewards/format_reward": 1.0,
2037
+ "step": 156
2038
+ },
2039
+ {
2040
+ "completion_length": 499.21875,
2041
+ "epoch": 4.131578947368421,
2042
+ "grad_norm": 0.04002314203603394,
2043
+ "kl": 0.003570556640625,
2044
+ "learning_rate": 5.868421052631579e-07,
2045
+ "loss": 0.0001,
2046
+ "reward": 2.0,
2047
+ "reward_std": 0.0,
2048
+ "rewards/accuracy_reward": 1.0,
2049
+ "rewards/format_reward": 1.0,
2050
+ "step": 157
2051
+ },
2052
+ {
2053
+ "completion_length": 517.53125,
2054
+ "epoch": 4.157894736842105,
2055
+ "grad_norm": 0.8871107366636743,
2056
+ "kl": 0.004241943359375,
2057
+ "learning_rate": 5.842105263157895e-07,
2058
+ "loss": 0.0002,
2059
+ "reward": 1.96875,
2060
+ "reward_std": 0.0625,
2061
+ "rewards/accuracy_reward": 0.96875,
2062
+ "rewards/format_reward": 1.0,
2063
+ "step": 158
2064
+ },
2065
+ {
2066
+ "completion_length": 500.46875,
2067
+ "epoch": 4.184210526315789,
2068
+ "grad_norm": 0.034607701527423755,
2069
+ "kl": 0.0036773681640625,
2070
+ "learning_rate": 5.81578947368421e-07,
2071
+ "loss": 0.0001,
2072
+ "reward": 2.0,
2073
+ "reward_std": 0.0,
2074
+ "rewards/accuracy_reward": 1.0,
2075
+ "rewards/format_reward": 1.0,
2076
+ "step": 159
2077
+ },
2078
+ {
2079
+ "completion_length": 508.25,
2080
+ "epoch": 4.2105263157894735,
2081
+ "grad_norm": 0.8214538935630136,
2082
+ "kl": 0.00439453125,
2083
+ "learning_rate": 5.789473684210526e-07,
2084
+ "loss": 0.0002,
2085
+ "reward": 1.96875,
2086
+ "reward_std": 0.0625,
2087
+ "rewards/accuracy_reward": 0.96875,
2088
+ "rewards/format_reward": 1.0,
2089
+ "step": 160
2090
+ },
2091
+ {
2092
+ "completion_length": 510.375,
2093
+ "epoch": 4.2368421052631575,
2094
+ "grad_norm": 1.6395530042768915,
2095
+ "kl": 0.00408935546875,
2096
+ "learning_rate": 5.763157894736842e-07,
2097
+ "loss": 0.0002,
2098
+ "reward": 1.84375,
2099
+ "reward_std": 0.1875,
2100
+ "rewards/accuracy_reward": 0.84375,
2101
+ "rewards/format_reward": 1.0,
2102
+ "step": 161
2103
+ },
2104
+ {
2105
+ "completion_length": 514.75,
2106
+ "epoch": 4.2631578947368425,
2107
+ "grad_norm": 2.6138224629827476,
2108
+ "kl": 0.0037841796875,
2109
+ "learning_rate": 5.736842105263158e-07,
2110
+ "loss": 0.0002,
2111
+ "reward": 1.90625,
2112
+ "reward_std": 0.13466878235340118,
2113
+ "rewards/accuracy_reward": 0.90625,
2114
+ "rewards/format_reward": 1.0,
2115
+ "step": 162
2116
+ },
2117
+ {
2118
+ "completion_length": 499.09375,
2119
+ "epoch": 4.2894736842105265,
2120
+ "grad_norm": 0.04808481003397733,
2121
+ "kl": 0.003997802734375,
2122
+ "learning_rate": 5.710526315789474e-07,
2123
+ "loss": 0.0002,
2124
+ "reward": 2.0,
2125
+ "reward_std": 0.0,
2126
+ "rewards/accuracy_reward": 1.0,
2127
+ "rewards/format_reward": 1.0,
2128
+ "step": 163
2129
+ },
2130
+ {
2131
+ "completion_length": 506.03125,
2132
+ "epoch": 4.315789473684211,
2133
+ "grad_norm": 0.08804071935459232,
2134
+ "kl": 0.0038909912109375,
2135
+ "learning_rate": 5.68421052631579e-07,
2136
+ "loss": 0.0002,
2137
+ "reward": 2.0,
2138
+ "reward_std": 0.0,
2139
+ "rewards/accuracy_reward": 1.0,
2140
+ "rewards/format_reward": 1.0,
2141
+ "step": 164
2142
+ },
2143
+ {
2144
+ "completion_length": 476.03125,
2145
+ "epoch": 4.342105263157895,
2146
+ "grad_norm": 0.03572194363283224,
2147
+ "kl": 0.0036773681640625,
2148
+ "learning_rate": 5.657894736842104e-07,
2149
+ "loss": 0.0001,
2150
+ "reward": 2.0,
2151
+ "reward_std": 0.0,
2152
+ "rewards/accuracy_reward": 1.0,
2153
+ "rewards/format_reward": 1.0,
2154
+ "step": 165
2155
+ },
2156
+ {
2157
+ "completion_length": 536.6875,
2158
+ "epoch": 4.368421052631579,
2159
+ "grad_norm": 0.04019933989542527,
2160
+ "kl": 0.0038909912109375,
2161
+ "learning_rate": 5.63157894736842e-07,
2162
+ "loss": 0.0002,
2163
+ "reward": 2.0,
2164
+ "reward_std": 0.0,
2165
+ "rewards/accuracy_reward": 1.0,
2166
+ "rewards/format_reward": 1.0,
2167
+ "step": 166
2168
+ },
2169
+ {
2170
+ "completion_length": 509.25,
2171
+ "epoch": 4.394736842105263,
2172
+ "grad_norm": 1.5681592918937646,
2173
+ "kl": 0.005035400390625,
2174
+ "learning_rate": 5.605263157894736e-07,
2175
+ "loss": 0.0002,
2176
+ "reward": 1.84375,
2177
+ "reward_std": 0.1875,
2178
+ "rewards/accuracy_reward": 0.84375,
2179
+ "rewards/format_reward": 1.0,
2180
+ "step": 167
2181
+ },
2182
+ {
2183
+ "completion_length": 497.34375,
2184
+ "epoch": 4.421052631578947,
2185
+ "grad_norm": 2.538787505539558,
2186
+ "kl": 0.0042724609375,
2187
+ "learning_rate": 5.578947368421052e-07,
2188
+ "loss": 0.0002,
2189
+ "reward": 1.9375,
2190
+ "reward_std": 0.125,
2191
+ "rewards/accuracy_reward": 0.9375,
2192
+ "rewards/format_reward": 1.0,
2193
+ "step": 168
2194
+ },
2195
+ {
2196
+ "completion_length": 520.65625,
2197
+ "epoch": 4.447368421052632,
2198
+ "grad_norm": 0.041019565179391565,
2199
+ "kl": 0.0032196044921875,
2200
+ "learning_rate": 5.552631578947368e-07,
2201
+ "loss": 0.0001,
2202
+ "reward": 2.0,
2203
+ "reward_std": 0.0,
2204
+ "rewards/accuracy_reward": 1.0,
2205
+ "rewards/format_reward": 1.0,
2206
+ "step": 169
2207
+ },
2208
+ {
2209
+ "completion_length": 511.71875,
2210
+ "epoch": 4.473684210526316,
2211
+ "grad_norm": 1.0243322126591785,
2212
+ "kl": 0.00445556640625,
2213
+ "learning_rate": 5.526315789473684e-07,
2214
+ "loss": 0.0002,
2215
+ "reward": 1.96875,
2216
+ "reward_std": 0.0625,
2217
+ "rewards/accuracy_reward": 0.96875,
2218
+ "rewards/format_reward": 1.0,
2219
+ "step": 170
2220
+ },
2221
+ {
2222
+ "completion_length": 523.40625,
2223
+ "epoch": 4.5,
2224
+ "grad_norm": 0.6764116645829102,
2225
+ "kl": 0.00433349609375,
2226
+ "learning_rate": 5.5e-07,
2227
+ "loss": 0.0002,
2228
+ "reward": 1.96875,
2229
+ "reward_std": 0.0625,
2230
+ "rewards/accuracy_reward": 1.0,
2231
+ "rewards/format_reward": 0.96875,
2232
+ "step": 171
2233
+ },
2234
+ {
2235
+ "completion_length": 501.75,
2236
+ "epoch": 4.526315789473684,
2237
+ "grad_norm": 1.0831256376423706,
2238
+ "kl": 0.003814697265625,
2239
+ "learning_rate": 5.473684210526316e-07,
2240
+ "loss": 0.0002,
2241
+ "reward": 1.875,
2242
+ "reward_std": 0.125,
2243
+ "rewards/accuracy_reward": 0.875,
2244
+ "rewards/format_reward": 1.0,
2245
+ "step": 172
2246
+ },
2247
+ {
2248
+ "completion_length": 506.21875,
2249
+ "epoch": 4.552631578947368,
2250
+ "grad_norm": 0.046752954659444006,
2251
+ "kl": 0.00360107421875,
2252
+ "learning_rate": 5.447368421052632e-07,
2253
+ "loss": 0.0001,
2254
+ "reward": 2.0,
2255
+ "reward_std": 0.0,
2256
+ "rewards/accuracy_reward": 1.0,
2257
+ "rewards/format_reward": 1.0,
2258
+ "step": 173
2259
+ },
2260
+ {
2261
+ "completion_length": 497.03125,
2262
+ "epoch": 4.578947368421053,
2263
+ "grad_norm": 1.0272776092127476,
2264
+ "kl": 0.0034637451171875,
2265
+ "learning_rate": 5.421052631578948e-07,
2266
+ "loss": 0.0001,
2267
+ "reward": 1.90625,
2268
+ "reward_std": 0.0625,
2269
+ "rewards/accuracy_reward": 0.90625,
2270
+ "rewards/format_reward": 1.0,
2271
+ "step": 174
2272
+ },
2273
+ {
2274
+ "completion_length": 498.40625,
2275
+ "epoch": 4.605263157894737,
2276
+ "grad_norm": 1.0347251781483067,
2277
+ "kl": 0.003662109375,
2278
+ "learning_rate": 5.394736842105264e-07,
2279
+ "loss": 0.0001,
2280
+ "reward": 1.96875,
2281
+ "reward_std": 0.0625,
2282
+ "rewards/accuracy_reward": 0.96875,
2283
+ "rewards/format_reward": 1.0,
2284
+ "step": 175
2285
+ },
2286
+ {
2287
+ "completion_length": 492.0625,
2288
+ "epoch": 4.631578947368421,
2289
+ "grad_norm": 5.431342136617613,
2290
+ "kl": 0.004364013671875,
2291
+ "learning_rate": 5.368421052631578e-07,
2292
+ "loss": 0.0002,
2293
+ "reward": 1.9375,
2294
+ "reward_std": 0.07216878235340118,
2295
+ "rewards/accuracy_reward": 0.9375,
2296
+ "rewards/format_reward": 1.0,
2297
+ "step": 176
2298
+ },
2299
+ {
2300
+ "completion_length": 500.21875,
2301
+ "epoch": 4.657894736842105,
2302
+ "grad_norm": 0.061596768702879764,
2303
+ "kl": 0.003631591796875,
2304
+ "learning_rate": 5.342105263157894e-07,
2305
+ "loss": 0.0001,
2306
+ "reward": 2.0,
2307
+ "reward_std": 0.0,
2308
+ "rewards/accuracy_reward": 1.0,
2309
+ "rewards/format_reward": 1.0,
2310
+ "step": 177
2311
+ },
2312
+ {
2313
+ "completion_length": 488.40625,
2314
+ "epoch": 4.684210526315789,
2315
+ "grad_norm": 0.03793363317517718,
2316
+ "kl": 0.004058837890625,
2317
+ "learning_rate": 5.31578947368421e-07,
2318
+ "loss": 0.0002,
2319
+ "reward": 2.0,
2320
+ "reward_std": 0.0,
2321
+ "rewards/accuracy_reward": 1.0,
2322
+ "rewards/format_reward": 1.0,
2323
+ "step": 178
2324
+ },
2325
+ {
2326
+ "completion_length": 488.125,
2327
+ "epoch": 4.7105263157894735,
2328
+ "grad_norm": 1.459873859774728,
2329
+ "kl": 0.00433349609375,
2330
+ "learning_rate": 5.289473684210526e-07,
2331
+ "loss": 0.0002,
2332
+ "reward": 1.90625,
2333
+ "reward_std": 0.1875,
2334
+ "rewards/accuracy_reward": 0.90625,
2335
+ "rewards/format_reward": 1.0,
2336
+ "step": 179
2337
+ },
2338
+ {
2339
+ "completion_length": 522.0,
2340
+ "epoch": 4.7368421052631575,
2341
+ "grad_norm": 0.8661182876644632,
2342
+ "kl": 0.004638671875,
2343
+ "learning_rate": 5.263157894736842e-07,
2344
+ "loss": 0.0002,
2345
+ "reward": 1.9375,
2346
+ "reward_std": 0.125,
2347
+ "rewards/accuracy_reward": 0.96875,
2348
+ "rewards/format_reward": 0.96875,
2349
+ "step": 180
2350
+ },
2351
+ {
2352
+ "completion_length": 502.6875,
2353
+ "epoch": 4.7631578947368425,
2354
+ "grad_norm": 0.07996281170258902,
2355
+ "kl": 0.004486083984375,
2356
+ "learning_rate": 5.236842105263157e-07,
2357
+ "loss": 0.0002,
2358
+ "reward": 2.0,
2359
+ "reward_std": 0.0,
2360
+ "rewards/accuracy_reward": 1.0,
2361
+ "rewards/format_reward": 1.0,
2362
+ "step": 181
2363
+ },
2364
+ {
2365
+ "completion_length": 495.8125,
2366
+ "epoch": 4.7894736842105265,
2367
+ "grad_norm": 0.9651399175233428,
2368
+ "kl": 0.00360107421875,
2369
+ "learning_rate": 5.210526315789473e-07,
2370
+ "loss": 0.0001,
2371
+ "reward": 1.96875,
2372
+ "reward_std": 0.0625,
2373
+ "rewards/accuracy_reward": 1.0,
2374
+ "rewards/format_reward": 0.96875,
2375
+ "step": 182
2376
+ },
2377
+ {
2378
+ "completion_length": 490.78125,
2379
+ "epoch": 4.815789473684211,
2380
+ "grad_norm": 0.957605365453321,
2381
+ "kl": 0.00421142578125,
2382
+ "learning_rate": 5.184210526315789e-07,
2383
+ "loss": 0.0002,
2384
+ "reward": 1.90625,
2385
+ "reward_std": 0.0625,
2386
+ "rewards/accuracy_reward": 0.90625,
2387
+ "rewards/format_reward": 1.0,
2388
+ "step": 183
2389
+ },
2390
+ {
2391
+ "completion_length": 489.53125,
2392
+ "epoch": 4.842105263157895,
2393
+ "grad_norm": 0.04438711227285697,
2394
+ "kl": 0.004974365234375,
2395
+ "learning_rate": 5.157894736842106e-07,
2396
+ "loss": 0.0002,
2397
+ "reward": 1.875,
2398
+ "reward_std": 0.0,
2399
+ "rewards/accuracy_reward": 0.875,
2400
+ "rewards/format_reward": 1.0,
2401
+ "step": 184
2402
+ },
2403
+ {
2404
+ "completion_length": 491.125,
2405
+ "epoch": 4.868421052631579,
2406
+ "grad_norm": 0.7517932097620719,
2407
+ "kl": 0.00372314453125,
2408
+ "learning_rate": 5.131578947368422e-07,
2409
+ "loss": 0.0001,
2410
+ "reward": 1.9375,
2411
+ "reward_std": 0.07216878235340118,
2412
+ "rewards/accuracy_reward": 0.9375,
2413
+ "rewards/format_reward": 1.0,
2414
+ "step": 185
2415
+ },
2416
+ {
2417
+ "completion_length": 493.3125,
2418
+ "epoch": 4.894736842105263,
2419
+ "grad_norm": 1.5201290264209482,
2420
+ "kl": 0.005126953125,
2421
+ "learning_rate": 5.105263157894736e-07,
2422
+ "loss": 0.0002,
2423
+ "reward": 1.96875,
2424
+ "reward_std": 0.0625,
2425
+ "rewards/accuracy_reward": 0.96875,
2426
+ "rewards/format_reward": 1.0,
2427
+ "step": 186
2428
+ },
2429
+ {
2430
+ "completion_length": 514.46875,
2431
+ "epoch": 4.921052631578947,
2432
+ "grad_norm": 0.0748706505594432,
2433
+ "kl": 0.004302978515625,
2434
+ "learning_rate": 5.078947368421052e-07,
2435
+ "loss": 0.0002,
2436
+ "reward": 2.0,
2437
+ "reward_std": 0.0,
2438
+ "rewards/accuracy_reward": 1.0,
2439
+ "rewards/format_reward": 1.0,
2440
+ "step": 187
2441
+ },
2442
+ {
2443
+ "completion_length": 502.59375,
2444
+ "epoch": 4.947368421052632,
2445
+ "grad_norm": 1.0868228477221615,
2446
+ "kl": 0.004425048828125,
2447
+ "learning_rate": 5.052631578947368e-07,
2448
+ "loss": 0.0002,
2449
+ "reward": 1.90625,
2450
+ "reward_std": 0.0625,
2451
+ "rewards/accuracy_reward": 0.90625,
2452
+ "rewards/format_reward": 1.0,
2453
+ "step": 188
2454
+ },
2455
+ {
2456
+ "completion_length": 510.46875,
2457
+ "epoch": 4.973684210526316,
2458
+ "grad_norm": 0.03543275147216106,
2459
+ "kl": 0.0042724609375,
2460
+ "learning_rate": 5.026315789473684e-07,
2461
+ "loss": 0.0002,
2462
+ "reward": 2.0,
2463
+ "reward_std": 0.0,
2464
+ "rewards/accuracy_reward": 1.0,
2465
+ "rewards/format_reward": 1.0,
2466
+ "step": 189
2467
+ },
2468
+ {
2469
+ "completion_length": 515.0,
2470
+ "epoch": 5.0,
2471
+ "grad_norm": 1.2489724519707108,
2472
+ "kl": 0.0037078857421875,
2473
+ "learning_rate": 5e-07,
2474
+ "loss": 0.0002,
2475
+ "reward": 1.8000000715255737,
2476
+ "reward_std": 0.4000000059604645,
2477
+ "rewards/accuracy_reward": 0.800000011920929,
2478
+ "rewards/format_reward": 1.0,
2479
+ "step": 190
2480
+ }
2481
+ ],
2482
+ "logging_steps": 1.0,
2483
+ "max_steps": 380,
2484
+ "num_input_tokens_seen": 0,
2485
+ "num_train_epochs": 10,
2486
+ "save_steps": 38,
2487
+ "stateful_callbacks": {
2488
+ "TrainerControl": {
2489
+ "args": {
2490
+ "should_epoch_stop": false,
2491
+ "should_evaluate": false,
2492
+ "should_log": false,
2493
+ "should_save": true,
2494
+ "should_training_stop": false
2495
+ },
2496
+ "attributes": {}
2497
+ }
2498
+ },
2499
+ "total_flos": 0.0,
2500
+ "train_batch_size": 1,
2501
+ "trial_name": null,
2502
+ "trial_params": null
2503
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:725be0d36ddb499caf3145385836714def828e345f727c5b8cf2dc9aaa8c2f83
3
+ size 7992
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)