Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- ckpt-80/config.json +30 -0
- ckpt-80/generation_config.json +9 -0
- ckpt-80/latest +1 -0
- ckpt-80/model.safetensors +3 -0
- ckpt-80/rng_state_0.pth +3 -0
- ckpt-80/rng_state_1.pth +3 -0
- ckpt-80/rng_state_2.pth +3 -0
- ckpt-80/rng_state_3.pth +3 -0
- ckpt-80/scheduler.pt +3 -0
- ckpt-80/special_tokens_map.json +23 -0
- ckpt-80/tokenizer.json +3 -0
- ckpt-80/tokenizer_config.json +195 -0
- ckpt-80/trainer_state.json +1473 -0
- ckpt-80/training_args.bin +3 -0
- ckpt-80/zero_to_fp32.py +760 -0
.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 |
+
ckpt-80/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
ckpt-80/config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Qwen2ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 151646,
|
| 8 |
+
"eos_token_id": 151643,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 1536,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 8960,
|
| 13 |
+
"max_position_embeddings": 131072,
|
| 14 |
+
"max_window_layers": 21,
|
| 15 |
+
"model_type": "qwen2",
|
| 16 |
+
"num_attention_heads": 12,
|
| 17 |
+
"num_hidden_layers": 28,
|
| 18 |
+
"num_key_value_heads": 2,
|
| 19 |
+
"rms_norm_eps": 1e-06,
|
| 20 |
+
"rope_scaling": null,
|
| 21 |
+
"rope_theta": 10000,
|
| 22 |
+
"sliding_window": null,
|
| 23 |
+
"tie_word_embeddings": false,
|
| 24 |
+
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.48.1",
|
| 26 |
+
"use_cache": false,
|
| 27 |
+
"use_mrope": false,
|
| 28 |
+
"use_sliding_window": false,
|
| 29 |
+
"vocab_size": 151665
|
| 30 |
+
}
|
ckpt-80/generation_config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 151646,
|
| 4 |
+
"do_sample": true,
|
| 5 |
+
"eos_token_id": 151643,
|
| 6 |
+
"temperature": 0.6,
|
| 7 |
+
"top_p": 0.95,
|
| 8 |
+
"transformers_version": "4.48.1"
|
| 9 |
+
}
|
ckpt-80/latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step80
|
ckpt-80/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d931e9e5b724a25ccf55888fb8e07a49bdd22545eaae34e42b1c50e5a1fdbdc3
|
| 3 |
+
size 3552549728
|
ckpt-80/rng_state_0.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6baf06104b269181ea5d4120ca1ef39775b39f1a989deefdffedb75191849e7c
|
| 3 |
+
size 14960
|
ckpt-80/rng_state_1.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:53621d02c8b7b14481ebb6d202cd4f6bf26d8a2753884ba86ed4f8a8edc9f3ab
|
| 3 |
+
size 14960
|
ckpt-80/rng_state_2.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d3e6cc02a4108cccb70308c26b649ff4c1a93250a6252d7dd31fda6f995317d9
|
| 3 |
+
size 14960
|
ckpt-80/rng_state_3.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ad58e4beae534f7dc5df6c05453c33a74665be802c015bbe4dabaa92dae6f70d
|
| 3 |
+
size 14960
|
ckpt-80/scheduler.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f108534be0dc23a9323e6fef6fe315e081f6150b4ca4cdadba69918370b4584
|
| 3 |
+
size 1064
|
ckpt-80/special_tokens_map.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<|begin▁of▁sentence|>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|end▁of▁sentence|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<|end▁of▁sentence|>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
}
|
| 23 |
+
}
|
ckpt-80/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e20ddafc659ba90242154b55275402edeca0715e5dbb30f56815a4ce081f4893
|
| 3 |
+
size 11422778
|
ckpt-80/tokenizer_config.json
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"add_prefix_space": null,
|
| 5 |
+
"added_tokens_decoder": {
|
| 6 |
+
"151643": {
|
| 7 |
+
"content": "<|end▁of▁sentence|>",
|
| 8 |
+
"lstrip": false,
|
| 9 |
+
"normalized": false,
|
| 10 |
+
"rstrip": false,
|
| 11 |
+
"single_word": false,
|
| 12 |
+
"special": true
|
| 13 |
+
},
|
| 14 |
+
"151644": {
|
| 15 |
+
"content": "<|User|>",
|
| 16 |
+
"lstrip": false,
|
| 17 |
+
"normalized": false,
|
| 18 |
+
"rstrip": false,
|
| 19 |
+
"single_word": false,
|
| 20 |
+
"special": false
|
| 21 |
+
},
|
| 22 |
+
"151645": {
|
| 23 |
+
"content": "<|Assistant|>",
|
| 24 |
+
"lstrip": false,
|
| 25 |
+
"normalized": false,
|
| 26 |
+
"rstrip": false,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": false
|
| 29 |
+
},
|
| 30 |
+
"151646": {
|
| 31 |
+
"content": "<|begin▁of▁sentence|>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"151647": {
|
| 39 |
+
"content": "<|EOT|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": false,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": false
|
| 45 |
+
},
|
| 46 |
+
"151648": {
|
| 47 |
+
"content": "<think>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": false,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": false
|
| 53 |
+
},
|
| 54 |
+
"151649": {
|
| 55 |
+
"content": "</think>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": false,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": false
|
| 61 |
+
},
|
| 62 |
+
"151650": {
|
| 63 |
+
"content": "<|quad_start|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": false,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": true
|
| 69 |
+
},
|
| 70 |
+
"151651": {
|
| 71 |
+
"content": "<|quad_end|>",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": false,
|
| 74 |
+
"rstrip": false,
|
| 75 |
+
"single_word": false,
|
| 76 |
+
"special": true
|
| 77 |
+
},
|
| 78 |
+
"151652": {
|
| 79 |
+
"content": "<|vision_start|>",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": false,
|
| 82 |
+
"rstrip": false,
|
| 83 |
+
"single_word": false,
|
| 84 |
+
"special": true
|
| 85 |
+
},
|
| 86 |
+
"151653": {
|
| 87 |
+
"content": "<|vision_end|>",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": false,
|
| 90 |
+
"rstrip": false,
|
| 91 |
+
"single_word": false,
|
| 92 |
+
"special": true
|
| 93 |
+
},
|
| 94 |
+
"151654": {
|
| 95 |
+
"content": "<|vision_pad|>",
|
| 96 |
+
"lstrip": false,
|
| 97 |
+
"normalized": false,
|
| 98 |
+
"rstrip": false,
|
| 99 |
+
"single_word": false,
|
| 100 |
+
"special": true
|
| 101 |
+
},
|
| 102 |
+
"151655": {
|
| 103 |
+
"content": "<|image_pad|>",
|
| 104 |
+
"lstrip": false,
|
| 105 |
+
"normalized": false,
|
| 106 |
+
"rstrip": false,
|
| 107 |
+
"single_word": false,
|
| 108 |
+
"special": true
|
| 109 |
+
},
|
| 110 |
+
"151656": {
|
| 111 |
+
"content": "<|video_pad|>",
|
| 112 |
+
"lstrip": false,
|
| 113 |
+
"normalized": false,
|
| 114 |
+
"rstrip": false,
|
| 115 |
+
"single_word": false,
|
| 116 |
+
"special": true
|
| 117 |
+
},
|
| 118 |
+
"151657": {
|
| 119 |
+
"content": "<tool_call>",
|
| 120 |
+
"lstrip": false,
|
| 121 |
+
"normalized": false,
|
| 122 |
+
"rstrip": false,
|
| 123 |
+
"single_word": false,
|
| 124 |
+
"special": false
|
| 125 |
+
},
|
| 126 |
+
"151658": {
|
| 127 |
+
"content": "</tool_call>",
|
| 128 |
+
"lstrip": false,
|
| 129 |
+
"normalized": false,
|
| 130 |
+
"rstrip": false,
|
| 131 |
+
"single_word": false,
|
| 132 |
+
"special": false
|
| 133 |
+
},
|
| 134 |
+
"151659": {
|
| 135 |
+
"content": "<|fim_prefix|>",
|
| 136 |
+
"lstrip": false,
|
| 137 |
+
"normalized": false,
|
| 138 |
+
"rstrip": false,
|
| 139 |
+
"single_word": false,
|
| 140 |
+
"special": false
|
| 141 |
+
},
|
| 142 |
+
"151660": {
|
| 143 |
+
"content": "<|fim_middle|>",
|
| 144 |
+
"lstrip": false,
|
| 145 |
+
"normalized": false,
|
| 146 |
+
"rstrip": false,
|
| 147 |
+
"single_word": false,
|
| 148 |
+
"special": false
|
| 149 |
+
},
|
| 150 |
+
"151661": {
|
| 151 |
+
"content": "<|fim_suffix|>",
|
| 152 |
+
"lstrip": false,
|
| 153 |
+
"normalized": false,
|
| 154 |
+
"rstrip": false,
|
| 155 |
+
"single_word": false,
|
| 156 |
+
"special": false
|
| 157 |
+
},
|
| 158 |
+
"151662": {
|
| 159 |
+
"content": "<|fim_pad|>",
|
| 160 |
+
"lstrip": false,
|
| 161 |
+
"normalized": false,
|
| 162 |
+
"rstrip": false,
|
| 163 |
+
"single_word": false,
|
| 164 |
+
"special": false
|
| 165 |
+
},
|
| 166 |
+
"151663": {
|
| 167 |
+
"content": "<|repo_name|>",
|
| 168 |
+
"lstrip": false,
|
| 169 |
+
"normalized": false,
|
| 170 |
+
"rstrip": false,
|
| 171 |
+
"single_word": false,
|
| 172 |
+
"special": false
|
| 173 |
+
},
|
| 174 |
+
"151664": {
|
| 175 |
+
"content": "<|file_sep|>",
|
| 176 |
+
"lstrip": false,
|
| 177 |
+
"normalized": false,
|
| 178 |
+
"rstrip": false,
|
| 179 |
+
"single_word": false,
|
| 180 |
+
"special": false
|
| 181 |
+
}
|
| 182 |
+
},
|
| 183 |
+
"bos_token": "<|begin▁of▁sentence|>",
|
| 184 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 185 |
+
"clean_up_tokenization_spaces": false,
|
| 186 |
+
"eos_token": "<|end▁of▁sentence|>",
|
| 187 |
+
"extra_special_tokens": {},
|
| 188 |
+
"legacy": true,
|
| 189 |
+
"model_max_length": 16384,
|
| 190 |
+
"pad_token": "<|end▁of▁sentence|>",
|
| 191 |
+
"sp_model_kwargs": {},
|
| 192 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 193 |
+
"unk_token": null,
|
| 194 |
+
"use_default_system_prompt": false
|
| 195 |
+
}
|
ckpt-80/trainer_state.json
ADDED
|
@@ -0,0 +1,1473 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": null,
|
| 3 |
+
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 0.33350703491401773,
|
| 5 |
+
"eval_steps": 500,
|
| 6 |
+
"global_step": 80,
|
| 7 |
+
"is_hyper_param_search": false,
|
| 8 |
+
"is_local_process_zero": true,
|
| 9 |
+
"is_world_process_zero": true,
|
| 10 |
+
"log_history": [
|
| 11 |
+
{
|
| 12 |
+
"epoch": 0.004168837936425221,
|
| 13 |
+
"grad_norm": 2.006458271799073,
|
| 14 |
+
"learning_rate": 2.0000000000000003e-06,
|
| 15 |
+
"log_odds_chosen": -0.375732421875,
|
| 16 |
+
"log_odds_ratio": -0.9052734375,
|
| 17 |
+
"logits/chosen": 0.669158935546875,
|
| 18 |
+
"logits/rejected": 0.4799842834472656,
|
| 19 |
+
"logps/chosen": -0.84521484375,
|
| 20 |
+
"logps/rejected": -0.636474609375,
|
| 21 |
+
"loss": 16.0332,
|
| 22 |
+
"nll_loss": 1.072998046875,
|
| 23 |
+
"rewards/accuracies": 0.0,
|
| 24 |
+
"rewards/chosen": -0.0845794677734375,
|
| 25 |
+
"rewards/margins": -0.0209197998046875,
|
| 26 |
+
"rewards/rejected": -0.06365966796875,
|
| 27 |
+
"step": 1
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"epoch": 0.008337675872850442,
|
| 31 |
+
"grad_norm": 2.0306125193054982,
|
| 32 |
+
"learning_rate": 4.000000000000001e-06,
|
| 33 |
+
"log_odds_chosen": -0.347900390625,
|
| 34 |
+
"log_odds_ratio": -0.88427734375,
|
| 35 |
+
"logits/chosen": 0.18726348876953125,
|
| 36 |
+
"logits/rejected": 0.063751220703125,
|
| 37 |
+
"logps/chosen": -0.598388671875,
|
| 38 |
+
"logps/rejected": -0.456298828125,
|
| 39 |
+
"loss": 15.582,
|
| 40 |
+
"nll_loss": 0.7652587890625,
|
| 41 |
+
"rewards/accuracies": 0.0,
|
| 42 |
+
"rewards/chosen": -0.0598602294921875,
|
| 43 |
+
"rewards/margins": -0.0142364501953125,
|
| 44 |
+
"rewards/rejected": -0.045623779296875,
|
| 45 |
+
"step": 2
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"epoch": 0.012506513809275664,
|
| 49 |
+
"grad_norm": 1.9051609121742616,
|
| 50 |
+
"learning_rate": 6e-06,
|
| 51 |
+
"log_odds_chosen": -0.397216796875,
|
| 52 |
+
"log_odds_ratio": -0.9169921875,
|
| 53 |
+
"logits/chosen": 0.2111358642578125,
|
| 54 |
+
"logits/rejected": 0.04972648620605469,
|
| 55 |
+
"logps/chosen": -0.76123046875,
|
| 56 |
+
"logps/rejected": -0.55908203125,
|
| 57 |
+
"loss": 14.3369,
|
| 58 |
+
"nll_loss": 0.921142578125,
|
| 59 |
+
"rewards/accuracies": 0.0,
|
| 60 |
+
"rewards/chosen": -0.076141357421875,
|
| 61 |
+
"rewards/margins": -0.0202484130859375,
|
| 62 |
+
"rewards/rejected": -0.0558929443359375,
|
| 63 |
+
"step": 3
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
"epoch": 0.016675351745700884,
|
| 67 |
+
"grad_norm": 1.78874596409052,
|
| 68 |
+
"learning_rate": 8.000000000000001e-06,
|
| 69 |
+
"log_odds_chosen": -0.355712890625,
|
| 70 |
+
"log_odds_ratio": -0.8896484375,
|
| 71 |
+
"logits/chosen": 0.1468048095703125,
|
| 72 |
+
"logits/rejected": -0.00798797607421875,
|
| 73 |
+
"logps/chosen": -0.6734619140625,
|
| 74 |
+
"logps/rejected": -0.51214599609375,
|
| 75 |
+
"loss": 15.6787,
|
| 76 |
+
"nll_loss": 0.810302734375,
|
| 77 |
+
"rewards/accuracies": 0.0,
|
| 78 |
+
"rewards/chosen": -0.0673370361328125,
|
| 79 |
+
"rewards/margins": -0.01611328125,
|
| 80 |
+
"rewards/rejected": -0.0512237548828125,
|
| 81 |
+
"step": 4
|
| 82 |
+
},
|
| 83 |
+
{
|
| 84 |
+
"epoch": 0.020844189682126108,
|
| 85 |
+
"grad_norm": 1.5688561088336885,
|
| 86 |
+
"learning_rate": 1e-05,
|
| 87 |
+
"log_odds_chosen": -0.29296875,
|
| 88 |
+
"log_odds_ratio": -0.853271484375,
|
| 89 |
+
"logits/chosen": 0.534515380859375,
|
| 90 |
+
"logits/rejected": 0.4119873046875,
|
| 91 |
+
"logps/chosen": -0.6806640625,
|
| 92 |
+
"logps/rejected": -0.544921875,
|
| 93 |
+
"loss": 15.1973,
|
| 94 |
+
"nll_loss": 0.8408203125,
|
| 95 |
+
"rewards/accuracies": 0.0,
|
| 96 |
+
"rewards/chosen": -0.0680389404296875,
|
| 97 |
+
"rewards/margins": -0.0135498046875,
|
| 98 |
+
"rewards/rejected": -0.0544891357421875,
|
| 99 |
+
"step": 5
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"epoch": 0.02501302761855133,
|
| 103 |
+
"grad_norm": 1.3268998143676978,
|
| 104 |
+
"learning_rate": 1.2e-05,
|
| 105 |
+
"log_odds_chosen": -0.41455078125,
|
| 106 |
+
"log_odds_ratio": -0.9267578125,
|
| 107 |
+
"logits/chosen": 0.428436279296875,
|
| 108 |
+
"logits/rejected": 0.2169036865234375,
|
| 109 |
+
"logps/chosen": -0.7254638671875,
|
| 110 |
+
"logps/rejected": -0.5296630859375,
|
| 111 |
+
"loss": 15.9805,
|
| 112 |
+
"nll_loss": 0.88427734375,
|
| 113 |
+
"rewards/accuracies": 0.0,
|
| 114 |
+
"rewards/chosen": -0.0725555419921875,
|
| 115 |
+
"rewards/margins": -0.01958465576171875,
|
| 116 |
+
"rewards/rejected": -0.05297088623046875,
|
| 117 |
+
"step": 6
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"epoch": 0.02918186555497655,
|
| 121 |
+
"grad_norm": 1.3269961863715432,
|
| 122 |
+
"learning_rate": 1.4e-05,
|
| 123 |
+
"log_odds_chosen": -0.3531494140625,
|
| 124 |
+
"log_odds_ratio": -0.888427734375,
|
| 125 |
+
"logits/chosen": 0.6148757934570312,
|
| 126 |
+
"logits/rejected": 0.463531494140625,
|
| 127 |
+
"logps/chosen": -0.7569580078125,
|
| 128 |
+
"logps/rejected": -0.5888671875,
|
| 129 |
+
"loss": 15.6689,
|
| 130 |
+
"nll_loss": 0.8975830078125,
|
| 131 |
+
"rewards/accuracies": 0.0,
|
| 132 |
+
"rewards/chosen": -0.0756683349609375,
|
| 133 |
+
"rewards/margins": -0.016815185546875,
|
| 134 |
+
"rewards/rejected": -0.0588531494140625,
|
| 135 |
+
"step": 7
|
| 136 |
+
},
|
| 137 |
+
{
|
| 138 |
+
"epoch": 0.03335070349140177,
|
| 139 |
+
"grad_norm": 0.9711343808401325,
|
| 140 |
+
"learning_rate": 1.6000000000000003e-05,
|
| 141 |
+
"log_odds_chosen": -0.35888671875,
|
| 142 |
+
"log_odds_ratio": -0.892578125,
|
| 143 |
+
"logits/chosen": 0.6737632751464844,
|
| 144 |
+
"logits/rejected": 0.534698486328125,
|
| 145 |
+
"logps/chosen": -0.7044677734375,
|
| 146 |
+
"logps/rejected": -0.548828125,
|
| 147 |
+
"loss": 14.3604,
|
| 148 |
+
"nll_loss": 0.825439453125,
|
| 149 |
+
"rewards/accuracies": 0.0,
|
| 150 |
+
"rewards/chosen": -0.0704498291015625,
|
| 151 |
+
"rewards/margins": -0.01556396484375,
|
| 152 |
+
"rewards/rejected": -0.0548858642578125,
|
| 153 |
+
"step": 8
|
| 154 |
+
},
|
| 155 |
+
{
|
| 156 |
+
"epoch": 0.03751954142782699,
|
| 157 |
+
"grad_norm": 0.9237098587195779,
|
| 158 |
+
"learning_rate": 1.8e-05,
|
| 159 |
+
"log_odds_chosen": -0.34375,
|
| 160 |
+
"log_odds_ratio": -0.882080078125,
|
| 161 |
+
"logits/chosen": 0.6319732666015625,
|
| 162 |
+
"logits/rejected": 0.4871063232421875,
|
| 163 |
+
"logps/chosen": -0.7308349609375,
|
| 164 |
+
"logps/rejected": -0.5621337890625,
|
| 165 |
+
"loss": 14.1436,
|
| 166 |
+
"nll_loss": 0.8466796875,
|
| 167 |
+
"rewards/accuracies": 0.0,
|
| 168 |
+
"rewards/chosen": -0.0731201171875,
|
| 169 |
+
"rewards/margins": -0.01691436767578125,
|
| 170 |
+
"rewards/rejected": -0.05620574951171875,
|
| 171 |
+
"step": 9
|
| 172 |
+
},
|
| 173 |
+
{
|
| 174 |
+
"epoch": 0.041688379364252216,
|
| 175 |
+
"grad_norm": 0.8445328349436582,
|
| 176 |
+
"learning_rate": 2e-05,
|
| 177 |
+
"log_odds_chosen": -0.3358154296875,
|
| 178 |
+
"log_odds_ratio": -0.879150390625,
|
| 179 |
+
"logits/chosen": 0.501800537109375,
|
| 180 |
+
"logits/rejected": 0.3776397705078125,
|
| 181 |
+
"logps/chosen": -0.6666259765625,
|
| 182 |
+
"logps/rejected": -0.51416015625,
|
| 183 |
+
"loss": 12.7095,
|
| 184 |
+
"nll_loss": 0.76318359375,
|
| 185 |
+
"rewards/accuracies": 0.0,
|
| 186 |
+
"rewards/chosen": -0.0666351318359375,
|
| 187 |
+
"rewards/margins": -0.01522064208984375,
|
| 188 |
+
"rewards/rejected": -0.05141448974609375,
|
| 189 |
+
"step": 10
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"epoch": 0.04585721730067743,
|
| 193 |
+
"grad_norm": 0.8396125768364633,
|
| 194 |
+
"learning_rate": 1.9999067159645222e-05,
|
| 195 |
+
"log_odds_chosen": -0.384765625,
|
| 196 |
+
"log_odds_ratio": -0.908447265625,
|
| 197 |
+
"logits/chosen": 0.563262939453125,
|
| 198 |
+
"logits/rejected": 0.3618621826171875,
|
| 199 |
+
"logps/chosen": -0.813720703125,
|
| 200 |
+
"logps/rejected": -0.6082763671875,
|
| 201 |
+
"loss": 14.0229,
|
| 202 |
+
"nll_loss": 0.898193359375,
|
| 203 |
+
"rewards/accuracies": 0.0,
|
| 204 |
+
"rewards/chosen": -0.0813140869140625,
|
| 205 |
+
"rewards/margins": -0.0204925537109375,
|
| 206 |
+
"rewards/rejected": -0.060821533203125,
|
| 207 |
+
"step": 11
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"epoch": 0.05002605523710266,
|
| 211 |
+
"grad_norm": 0.8291225655579284,
|
| 212 |
+
"learning_rate": 1.999626881261911e-05,
|
| 213 |
+
"log_odds_chosen": -0.33319091796875,
|
| 214 |
+
"log_odds_ratio": -0.877197265625,
|
| 215 |
+
"logits/chosen": 0.5009918212890625,
|
| 216 |
+
"logits/rejected": 0.38329315185546875,
|
| 217 |
+
"logps/chosen": -0.680419921875,
|
| 218 |
+
"logps/rejected": -0.53778076171875,
|
| 219 |
+
"loss": 13.0962,
|
| 220 |
+
"nll_loss": 0.78662109375,
|
| 221 |
+
"rewards/accuracies": 0.0,
|
| 222 |
+
"rewards/chosen": -0.06806182861328125,
|
| 223 |
+
"rewards/margins": -0.01427459716796875,
|
| 224 |
+
"rewards/rejected": -0.0537872314453125,
|
| 225 |
+
"step": 12
|
| 226 |
+
},
|
| 227 |
+
{
|
| 228 |
+
"epoch": 0.05419489317352788,
|
| 229 |
+
"grad_norm": 0.6447061073782809,
|
| 230 |
+
"learning_rate": 1.9991605481003865e-05,
|
| 231 |
+
"log_odds_chosen": -0.2783203125,
|
| 232 |
+
"log_odds_ratio": -0.846923828125,
|
| 233 |
+
"logits/chosen": 0.17709732055664062,
|
| 234 |
+
"logits/rejected": 0.054500579833984375,
|
| 235 |
+
"logps/chosen": -0.6295166015625,
|
| 236 |
+
"logps/rejected": -0.5006103515625,
|
| 237 |
+
"loss": 12.0044,
|
| 238 |
+
"nll_loss": 0.6942138671875,
|
| 239 |
+
"rewards/accuracies": 0.0,
|
| 240 |
+
"rewards/chosen": -0.062957763671875,
|
| 241 |
+
"rewards/margins": -0.0128936767578125,
|
| 242 |
+
"rewards/rejected": -0.0500640869140625,
|
| 243 |
+
"step": 13
|
| 244 |
+
},
|
| 245 |
+
{
|
| 246 |
+
"epoch": 0.0583637311099531,
|
| 247 |
+
"grad_norm": 0.7554659875392797,
|
| 248 |
+
"learning_rate": 1.998507803482828e-05,
|
| 249 |
+
"log_odds_chosen": -0.246826171875,
|
| 250 |
+
"log_odds_ratio": -0.829345703125,
|
| 251 |
+
"logits/chosen": -0.043701171875,
|
| 252 |
+
"logits/rejected": -0.208831787109375,
|
| 253 |
+
"logps/chosen": -0.7122802734375,
|
| 254 |
+
"logps/rejected": -0.58056640625,
|
| 255 |
+
"loss": 11.9097,
|
| 256 |
+
"nll_loss": 0.7593994140625,
|
| 257 |
+
"rewards/accuracies": 0.0,
|
| 258 |
+
"rewards/chosen": -0.0711822509765625,
|
| 259 |
+
"rewards/margins": -0.0131378173828125,
|
| 260 |
+
"rewards/rejected": -0.05804443359375,
|
| 261 |
+
"step": 14
|
| 262 |
+
},
|
| 263 |
+
{
|
| 264 |
+
"epoch": 0.06253256904637833,
|
| 265 |
+
"grad_norm": 0.7898038988103401,
|
| 266 |
+
"learning_rate": 1.9976687691905394e-05,
|
| 267 |
+
"log_odds_chosen": -0.0479736328125,
|
| 268 |
+
"log_odds_ratio": -0.71923828125,
|
| 269 |
+
"logits/chosen": -0.0294342041015625,
|
| 270 |
+
"logits/rejected": -0.11614990234375,
|
| 271 |
+
"logps/chosen": -0.5894775390625,
|
| 272 |
+
"logps/rejected": -0.5662841796875,
|
| 273 |
+
"loss": 12.1235,
|
| 274 |
+
"nll_loss": 0.68035888671875,
|
| 275 |
+
"rewards/accuracies": 0.4375,
|
| 276 |
+
"rewards/chosen": -0.05896759033203125,
|
| 277 |
+
"rewards/margins": -0.002349853515625,
|
| 278 |
+
"rewards/rejected": -0.05661773681640625,
|
| 279 |
+
"step": 15
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"epoch": 0.06670140698280354,
|
| 283 |
+
"grad_norm": 0.6995568607969461,
|
| 284 |
+
"learning_rate": 1.9966436017605296e-05,
|
| 285 |
+
"log_odds_chosen": 0.0357666015625,
|
| 286 |
+
"log_odds_ratio": -0.694580078125,
|
| 287 |
+
"logits/chosen": 0.13065338134765625,
|
| 288 |
+
"logits/rejected": -0.0316619873046875,
|
| 289 |
+
"logps/chosen": -0.6864013671875,
|
| 290 |
+
"logps/rejected": -0.66455078125,
|
| 291 |
+
"loss": 11.8877,
|
| 292 |
+
"nll_loss": 0.76220703125,
|
| 293 |
+
"rewards/accuracies": 0.5,
|
| 294 |
+
"rewards/chosen": -0.0686492919921875,
|
| 295 |
+
"rewards/margins": -0.002166748046875,
|
| 296 |
+
"rewards/rejected": -0.0664825439453125,
|
| 297 |
+
"step": 16
|
| 298 |
+
},
|
| 299 |
+
{
|
| 300 |
+
"epoch": 0.07087024491922876,
|
| 301 |
+
"grad_norm": 0.6249952276948901,
|
| 302 |
+
"learning_rate": 1.9954324924563088e-05,
|
| 303 |
+
"log_odds_chosen": 0.3499755859375,
|
| 304 |
+
"log_odds_ratio": -0.5440673828125,
|
| 305 |
+
"logits/chosen": -0.125030517578125,
|
| 306 |
+
"logits/rejected": -0.2731895446777344,
|
| 307 |
+
"logps/chosen": -0.5921630859375,
|
| 308 |
+
"logps/rejected": -0.7261962890625,
|
| 309 |
+
"loss": 11.9478,
|
| 310 |
+
"nll_loss": 0.6683349609375,
|
| 311 |
+
"rewards/accuracies": 0.8125,
|
| 312 |
+
"rewards/chosen": -0.05919647216796875,
|
| 313 |
+
"rewards/margins": 0.01343536376953125,
|
| 314 |
+
"rewards/rejected": -0.0726318359375,
|
| 315 |
+
"step": 17
|
| 316 |
+
},
|
| 317 |
+
{
|
| 318 |
+
"epoch": 0.07503908285565399,
|
| 319 |
+
"grad_norm": 0.5476240540355588,
|
| 320 |
+
"learning_rate": 1.9940356672322037e-05,
|
| 321 |
+
"log_odds_chosen": 0.38232421875,
|
| 322 |
+
"log_odds_ratio": -0.5316162109375,
|
| 323 |
+
"logits/chosen": 0.2089080810546875,
|
| 324 |
+
"logits/rejected": 0.069793701171875,
|
| 325 |
+
"logps/chosen": -0.5899658203125,
|
| 326 |
+
"logps/rejected": -0.7808837890625,
|
| 327 |
+
"loss": 11.967,
|
| 328 |
+
"nll_loss": 0.6422119140625,
|
| 329 |
+
"rewards/accuracies": 0.9375,
|
| 330 |
+
"rewards/chosen": -0.0589752197265625,
|
| 331 |
+
"rewards/margins": 0.0191497802734375,
|
| 332 |
+
"rewards/rejected": -0.078125,
|
| 333 |
+
"step": 18
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"epoch": 0.07920792079207921,
|
| 337 |
+
"grad_norm": 0.49418444669956524,
|
| 338 |
+
"learning_rate": 1.9924533866912017e-05,
|
| 339 |
+
"log_odds_chosen": 0.64111328125,
|
| 340 |
+
"log_odds_ratio": -0.435546875,
|
| 341 |
+
"logits/chosen": 0.16015625,
|
| 342 |
+
"logits/rejected": 0.032745361328125,
|
| 343 |
+
"logps/chosen": -0.5224609375,
|
| 344 |
+
"logps/rejected": -0.823486328125,
|
| 345 |
+
"loss": 10.4492,
|
| 346 |
+
"nll_loss": 0.5810546875,
|
| 347 |
+
"rewards/accuracies": 0.9375,
|
| 348 |
+
"rewards/chosen": -0.05222320556640625,
|
| 349 |
+
"rewards/margins": 0.03015899658203125,
|
| 350 |
+
"rewards/rejected": -0.0823822021484375,
|
| 351 |
+
"step": 19
|
| 352 |
+
},
|
| 353 |
+
{
|
| 354 |
+
"epoch": 0.08337675872850443,
|
| 355 |
+
"grad_norm": 0.4118961781762262,
|
| 356 |
+
"learning_rate": 1.9906859460363307e-05,
|
| 357 |
+
"log_odds_chosen": 0.6845703125,
|
| 358 |
+
"log_odds_ratio": -0.42779541015625,
|
| 359 |
+
"logits/chosen": -0.066619873046875,
|
| 360 |
+
"logits/rejected": -0.18597412109375,
|
| 361 |
+
"logps/chosen": -0.5198974609375,
|
| 362 |
+
"logps/rejected": -0.866455078125,
|
| 363 |
+
"loss": 10.5518,
|
| 364 |
+
"nll_loss": 0.5537109375,
|
| 365 |
+
"rewards/accuracies": 1.0,
|
| 366 |
+
"rewards/chosen": -0.052001953125,
|
| 367 |
+
"rewards/margins": 0.03460693359375,
|
| 368 |
+
"rewards/rejected": -0.08660888671875,
|
| 369 |
+
"step": 20
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"epoch": 0.08754559666492966,
|
| 373 |
+
"grad_norm": 0.44268649674883015,
|
| 374 |
+
"learning_rate": 1.988733675015585e-05,
|
| 375 |
+
"log_odds_chosen": 0.911376953125,
|
| 376 |
+
"log_odds_ratio": -0.35015869140625,
|
| 377 |
+
"logits/chosen": 0.190277099609375,
|
| 378 |
+
"logits/rejected": -0.041168212890625,
|
| 379 |
+
"logps/chosen": -0.8385009765625,
|
| 380 |
+
"logps/rejected": -1.418212890625,
|
| 381 |
+
"loss": 12.3477,
|
| 382 |
+
"nll_loss": 0.89599609375,
|
| 383 |
+
"rewards/accuracies": 1.0,
|
| 384 |
+
"rewards/chosen": -0.0838623046875,
|
| 385 |
+
"rewards/margins": 0.05804443359375,
|
| 386 |
+
"rewards/rejected": -0.14190673828125,
|
| 387 |
+
"step": 21
|
| 388 |
+
},
|
| 389 |
+
{
|
| 390 |
+
"epoch": 0.09171443460135487,
|
| 391 |
+
"grad_norm": 0.4486387895857316,
|
| 392 |
+
"learning_rate": 1.9865969378604023e-05,
|
| 393 |
+
"log_odds_chosen": 0.932373046875,
|
| 394 |
+
"log_odds_ratio": -0.340576171875,
|
| 395 |
+
"logits/chosen": -0.33026123046875,
|
| 396 |
+
"logits/rejected": -0.42425537109375,
|
| 397 |
+
"logps/chosen": -0.4442138671875,
|
| 398 |
+
"logps/rejected": -0.883544921875,
|
| 399 |
+
"loss": 10.5381,
|
| 400 |
+
"nll_loss": 0.4703369140625,
|
| 401 |
+
"rewards/accuracies": 1.0,
|
| 402 |
+
"rewards/chosen": -0.04442596435546875,
|
| 403 |
+
"rewards/margins": 0.0439300537109375,
|
| 404 |
+
"rewards/rejected": -0.088348388671875,
|
| 405 |
+
"step": 22
|
| 406 |
+
},
|
| 407 |
+
{
|
| 408 |
+
"epoch": 0.09588327253778009,
|
| 409 |
+
"grad_norm": 0.4080983278603557,
|
| 410 |
+
"learning_rate": 1.9842761332177115e-05,
|
| 411 |
+
"log_odds_chosen": 0.9261474609375,
|
| 412 |
+
"log_odds_ratio": -0.35150146484375,
|
| 413 |
+
"logits/chosen": -0.09943103790283203,
|
| 414 |
+
"logits/rejected": -0.194610595703125,
|
| 415 |
+
"logps/chosen": -0.5177001953125,
|
| 416 |
+
"logps/rejected": -0.9964599609375,
|
| 417 |
+
"loss": 10.3979,
|
| 418 |
+
"nll_loss": 0.560546875,
|
| 419 |
+
"rewards/accuracies": 1.0,
|
| 420 |
+
"rewards/chosen": -0.0517425537109375,
|
| 421 |
+
"rewards/margins": 0.04787445068359375,
|
| 422 |
+
"rewards/rejected": -0.0996246337890625,
|
| 423 |
+
"step": 23
|
| 424 |
+
},
|
| 425 |
+
{
|
| 426 |
+
"epoch": 0.10005211047420531,
|
| 427 |
+
"grad_norm": 0.46777770854029893,
|
| 428 |
+
"learning_rate": 1.9817716940755586e-05,
|
| 429 |
+
"log_odds_chosen": 1.640869140625,
|
| 430 |
+
"log_odds_ratio": -0.2108612060546875,
|
| 431 |
+
"logits/chosen": -0.008392333984375,
|
| 432 |
+
"logits/rejected": -0.141082763671875,
|
| 433 |
+
"logps/chosen": -0.7047119140625,
|
| 434 |
+
"logps/rejected": -1.828857421875,
|
| 435 |
+
"loss": 11.5957,
|
| 436 |
+
"nll_loss": 0.774169921875,
|
| 437 |
+
"rewards/accuracies": 1.0,
|
| 438 |
+
"rewards/chosen": -0.0703887939453125,
|
| 439 |
+
"rewards/margins": 0.11248779296875,
|
| 440 |
+
"rewards/rejected": -0.182952880859375,
|
| 441 |
+
"step": 24
|
| 442 |
+
},
|
| 443 |
+
{
|
| 444 |
+
"epoch": 0.10422094841063054,
|
| 445 |
+
"grad_norm": 0.3738919624381692,
|
| 446 |
+
"learning_rate": 1.979084087682323e-05,
|
| 447 |
+
"log_odds_chosen": 1.23486328125,
|
| 448 |
+
"log_odds_ratio": -0.2798309326171875,
|
| 449 |
+
"logits/chosen": -0.10467529296875,
|
| 450 |
+
"logits/rejected": -0.171875,
|
| 451 |
+
"logps/chosen": -0.482421875,
|
| 452 |
+
"logps/rejected": -1.177490234375,
|
| 453 |
+
"loss": 9.4116,
|
| 454 |
+
"nll_loss": 0.53662109375,
|
| 455 |
+
"rewards/accuracies": 1.0,
|
| 456 |
+
"rewards/chosen": -0.0482177734375,
|
| 457 |
+
"rewards/margins": 0.0694732666015625,
|
| 458 |
+
"rewards/rejected": -0.1176910400390625,
|
| 459 |
+
"step": 25
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"epoch": 0.10838978634705576,
|
| 463 |
+
"grad_norm": 0.37340979877433916,
|
| 464 |
+
"learning_rate": 1.9762138154595448e-05,
|
| 465 |
+
"log_odds_chosen": 1.1141357421875,
|
| 466 |
+
"log_odds_ratio": -0.31060791015625,
|
| 467 |
+
"logits/chosen": -0.01920318603515625,
|
| 468 |
+
"logits/rejected": -0.038970947265625,
|
| 469 |
+
"logps/chosen": -0.52880859375,
|
| 470 |
+
"logps/rejected": -1.1468505859375,
|
| 471 |
+
"loss": 10.0625,
|
| 472 |
+
"nll_loss": 0.5792236328125,
|
| 473 |
+
"rewards/accuracies": 1.0,
|
| 474 |
+
"rewards/chosen": -0.05289459228515625,
|
| 475 |
+
"rewards/margins": 0.06182098388671875,
|
| 476 |
+
"rewards/rejected": -0.1146697998046875,
|
| 477 |
+
"step": 26
|
| 478 |
+
},
|
| 479 |
+
{
|
| 480 |
+
"epoch": 0.11255862428348098,
|
| 481 |
+
"grad_norm": 0.341385013718231,
|
| 482 |
+
"learning_rate": 1.9731614129083756e-05,
|
| 483 |
+
"log_odds_chosen": 1.3974609375,
|
| 484 |
+
"log_odds_ratio": -0.2440338134765625,
|
| 485 |
+
"logits/chosen": 0.07257080078125,
|
| 486 |
+
"logits/rejected": 0.07470703125,
|
| 487 |
+
"logps/chosen": -0.56982421875,
|
| 488 |
+
"logps/rejected": -1.440185546875,
|
| 489 |
+
"loss": 9.9248,
|
| 490 |
+
"nll_loss": 0.64013671875,
|
| 491 |
+
"rewards/accuracies": 1.0,
|
| 492 |
+
"rewards/chosen": -0.0569915771484375,
|
| 493 |
+
"rewards/margins": 0.0870208740234375,
|
| 494 |
+
"rewards/rejected": -0.14398193359375,
|
| 495 |
+
"step": 27
|
| 496 |
+
},
|
| 497 |
+
{
|
| 498 |
+
"epoch": 0.1167274622199062,
|
| 499 |
+
"grad_norm": 0.30885132002114984,
|
| 500 |
+
"learning_rate": 1.9699274495096712e-05,
|
| 501 |
+
"log_odds_chosen": 1.874755859375,
|
| 502 |
+
"log_odds_ratio": -0.1857452392578125,
|
| 503 |
+
"logits/chosen": 0.2138671875,
|
| 504 |
+
"logits/rejected": 0.263427734375,
|
| 505 |
+
"logps/chosen": -0.588134765625,
|
| 506 |
+
"logps/rejected": -1.86572265625,
|
| 507 |
+
"loss": 9.9067,
|
| 508 |
+
"nll_loss": 0.6661376953125,
|
| 509 |
+
"rewards/accuracies": 1.0,
|
| 510 |
+
"rewards/chosen": -0.058837890625,
|
| 511 |
+
"rewards/margins": 0.1278228759765625,
|
| 512 |
+
"rewards/rejected": -0.18658447265625,
|
| 513 |
+
"step": 28
|
| 514 |
+
},
|
| 515 |
+
{
|
| 516 |
+
"epoch": 0.12089630015633142,
|
| 517 |
+
"grad_norm": 0.2949038286121744,
|
| 518 |
+
"learning_rate": 1.9665125286177448e-05,
|
| 519 |
+
"log_odds_chosen": 1.40380859375,
|
| 520 |
+
"log_odds_ratio": -0.23876953125,
|
| 521 |
+
"logits/chosen": 0.0499420166015625,
|
| 522 |
+
"logits/rejected": 0.10356712341308594,
|
| 523 |
+
"logps/chosen": -0.5357666015625,
|
| 524 |
+
"logps/rejected": -1.36376953125,
|
| 525 |
+
"loss": 10.1011,
|
| 526 |
+
"nll_loss": 0.5960693359375,
|
| 527 |
+
"rewards/accuracies": 1.0,
|
| 528 |
+
"rewards/chosen": -0.0535430908203125,
|
| 529 |
+
"rewards/margins": 0.0828399658203125,
|
| 530 |
+
"rewards/rejected": -0.136383056640625,
|
| 531 |
+
"step": 29
|
| 532 |
+
},
|
| 533 |
+
{
|
| 534 |
+
"epoch": 0.12506513809275666,
|
| 535 |
+
"grad_norm": 0.3151066899258469,
|
| 536 |
+
"learning_rate": 1.9629172873477995e-05,
|
| 537 |
+
"log_odds_chosen": 1.58837890625,
|
| 538 |
+
"log_odds_ratio": -0.21865081787109375,
|
| 539 |
+
"logits/chosen": -0.019866943359375,
|
| 540 |
+
"logits/rejected": 0.0438232421875,
|
| 541 |
+
"logps/chosen": -0.55517578125,
|
| 542 |
+
"logps/rejected": -1.543212890625,
|
| 543 |
+
"loss": 10.2285,
|
| 544 |
+
"nll_loss": 0.6005859375,
|
| 545 |
+
"rewards/accuracies": 1.0,
|
| 546 |
+
"rewards/chosen": -0.05548858642578125,
|
| 547 |
+
"rewards/margins": 0.0986175537109375,
|
| 548 |
+
"rewards/rejected": -0.154266357421875,
|
| 549 |
+
"step": 30
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"epoch": 0.12923397602918185,
|
| 553 |
+
"grad_norm": 0.3455023253633968,
|
| 554 |
+
"learning_rate": 1.9591423964570634e-05,
|
| 555 |
+
"log_odds_chosen": 1.602294921875,
|
| 556 |
+
"log_odds_ratio": -0.215545654296875,
|
| 557 |
+
"logits/chosen": -0.253387451171875,
|
| 558 |
+
"logits/rejected": -0.179046630859375,
|
| 559 |
+
"logps/chosen": -0.44189453125,
|
| 560 |
+
"logps/rejected": -1.34130859375,
|
| 561 |
+
"loss": 9.7915,
|
| 562 |
+
"nll_loss": 0.476318359375,
|
| 563 |
+
"rewards/accuracies": 1.0,
|
| 564 |
+
"rewards/chosen": -0.044219970703125,
|
| 565 |
+
"rewards/margins": 0.089874267578125,
|
| 566 |
+
"rewards/rejected": -0.134063720703125,
|
| 567 |
+
"step": 31
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"epoch": 0.13340281396560708,
|
| 571 |
+
"grad_norm": 0.32074624128845997,
|
| 572 |
+
"learning_rate": 1.9551885602196482e-05,
|
| 573 |
+
"log_odds_chosen": 1.82177734375,
|
| 574 |
+
"log_odds_ratio": -0.20027446746826172,
|
| 575 |
+
"logits/chosen": -0.19781494140625,
|
| 576 |
+
"logits/rejected": -0.0693511962890625,
|
| 577 |
+
"logps/chosen": -0.6165771484375,
|
| 578 |
+
"logps/rejected": -1.843017578125,
|
| 579 |
+
"loss": 9.4944,
|
| 580 |
+
"nll_loss": 0.66357421875,
|
| 581 |
+
"rewards/accuracies": 1.0,
|
| 582 |
+
"rewards/chosen": -0.0616455078125,
|
| 583 |
+
"rewards/margins": 0.1227874755859375,
|
| 584 |
+
"rewards/rejected": -0.1843719482421875,
|
| 585 |
+
"step": 32
|
| 586 |
+
},
|
| 587 |
+
{
|
| 588 |
+
"epoch": 0.1375716519020323,
|
| 589 |
+
"grad_norm": 0.294138620125773,
|
| 590 |
+
"learning_rate": 1.9510565162951538e-05,
|
| 591 |
+
"log_odds_chosen": 1.5264892578125,
|
| 592 |
+
"log_odds_ratio": -0.214874267578125,
|
| 593 |
+
"logits/chosen": -0.17253494262695312,
|
| 594 |
+
"logits/rejected": -0.06893157958984375,
|
| 595 |
+
"logps/chosen": -0.4769287109375,
|
| 596 |
+
"logps/rejected": -1.3394775390625,
|
| 597 |
+
"loss": 8.6384,
|
| 598 |
+
"nll_loss": 0.505126953125,
|
| 599 |
+
"rewards/accuracies": 1.0,
|
| 600 |
+
"rewards/chosen": -0.04773712158203125,
|
| 601 |
+
"rewards/margins": 0.0861053466796875,
|
| 602 |
+
"rewards/rejected": -0.1338653564453125,
|
| 603 |
+
"step": 33
|
| 604 |
+
},
|
| 605 |
+
{
|
| 606 |
+
"epoch": 0.14174048983845752,
|
| 607 |
+
"grad_norm": 0.3001891139691023,
|
| 608 |
+
"learning_rate": 1.9467470355910438e-05,
|
| 609 |
+
"log_odds_chosen": 1.650146484375,
|
| 610 |
+
"log_odds_ratio": -0.1990966796875,
|
| 611 |
+
"logits/chosen": 0.2593860626220703,
|
| 612 |
+
"logits/rejected": 0.3832855224609375,
|
| 613 |
+
"logps/chosen": -0.5384521484375,
|
| 614 |
+
"logps/rejected": -1.548828125,
|
| 615 |
+
"loss": 9.6108,
|
| 616 |
+
"nll_loss": 0.5833740234375,
|
| 617 |
+
"rewards/accuracies": 1.0,
|
| 618 |
+
"rewards/chosen": -0.0538482666015625,
|
| 619 |
+
"rewards/margins": 0.1009674072265625,
|
| 620 |
+
"rewards/rejected": -0.15478515625,
|
| 621 |
+
"step": 34
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"epoch": 0.14590932777488275,
|
| 625 |
+
"grad_norm": 0.3087581556467376,
|
| 626 |
+
"learning_rate": 1.9422609221188208e-05,
|
| 627 |
+
"log_odds_chosen": 2.18505859375,
|
| 628 |
+
"log_odds_ratio": -0.1383209228515625,
|
| 629 |
+
"logits/chosen": 0.0203094482421875,
|
| 630 |
+
"logits/rejected": 0.2121429443359375,
|
| 631 |
+
"logps/chosen": -0.51885986328125,
|
| 632 |
+
"logps/rejected": -1.948486328125,
|
| 633 |
+
"loss": 10.4194,
|
| 634 |
+
"nll_loss": 0.5579833984375,
|
| 635 |
+
"rewards/accuracies": 1.0,
|
| 636 |
+
"rewards/chosen": -0.0518798828125,
|
| 637 |
+
"rewards/margins": 0.1428070068359375,
|
| 638 |
+
"rewards/rejected": -0.19476318359375,
|
| 639 |
+
"step": 35
|
| 640 |
+
},
|
| 641 |
+
{
|
| 642 |
+
"epoch": 0.15007816571130797,
|
| 643 |
+
"grad_norm": 0.2787737237763669,
|
| 644 |
+
"learning_rate": 1.9375990128440205e-05,
|
| 645 |
+
"log_odds_chosen": 1.763427734375,
|
| 646 |
+
"log_odds_ratio": -0.20301055908203125,
|
| 647 |
+
"logits/chosen": 0.231658935546875,
|
| 648 |
+
"logits/rejected": 0.39324188232421875,
|
| 649 |
+
"logps/chosen": -0.5516357421875,
|
| 650 |
+
"logps/rejected": -1.69140625,
|
| 651 |
+
"loss": 9.2695,
|
| 652 |
+
"nll_loss": 0.5987548828125,
|
| 653 |
+
"rewards/accuracies": 1.0,
|
| 654 |
+
"rewards/chosen": -0.0550994873046875,
|
| 655 |
+
"rewards/margins": 0.1139068603515625,
|
| 656 |
+
"rewards/rejected": -0.169036865234375,
|
| 657 |
+
"step": 36
|
| 658 |
+
},
|
| 659 |
+
{
|
| 660 |
+
"epoch": 0.1542470036477332,
|
| 661 |
+
"grad_norm": 0.2729863818054811,
|
| 662 |
+
"learning_rate": 1.932762177530064e-05,
|
| 663 |
+
"log_odds_chosen": 1.658447265625,
|
| 664 |
+
"log_odds_ratio": -0.193603515625,
|
| 665 |
+
"logits/chosen": -0.1316375732421875,
|
| 666 |
+
"logits/rejected": 0.02693939208984375,
|
| 667 |
+
"logps/chosen": -0.43603515625,
|
| 668 |
+
"logps/rejected": -1.3701171875,
|
| 669 |
+
"loss": 8.771,
|
| 670 |
+
"nll_loss": 0.4583740234375,
|
| 671 |
+
"rewards/accuracies": 1.0,
|
| 672 |
+
"rewards/chosen": -0.0435943603515625,
|
| 673 |
+
"rewards/margins": 0.093505859375,
|
| 674 |
+
"rewards/rejected": -0.137054443359375,
|
| 675 |
+
"step": 37
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"epoch": 0.15841584158415842,
|
| 679 |
+
"grad_norm": 0.2498280060687234,
|
| 680 |
+
"learning_rate": 1.9277513185759847e-05,
|
| 681 |
+
"log_odds_chosen": 1.498291015625,
|
| 682 |
+
"log_odds_ratio": -0.2294921875,
|
| 683 |
+
"logits/chosen": 0.28093433380126953,
|
| 684 |
+
"logits/rejected": 0.437744140625,
|
| 685 |
+
"logps/chosen": -0.53216552734375,
|
| 686 |
+
"logps/rejected": -1.40478515625,
|
| 687 |
+
"loss": 8.7964,
|
| 688 |
+
"nll_loss": 0.5870361328125,
|
| 689 |
+
"rewards/accuracies": 1.0,
|
| 690 |
+
"rewards/chosen": -0.053192138671875,
|
| 691 |
+
"rewards/margins": 0.0873870849609375,
|
| 692 |
+
"rewards/rejected": -0.14056396484375,
|
| 693 |
+
"step": 38
|
| 694 |
+
},
|
| 695 |
+
{
|
| 696 |
+
"epoch": 0.16258467952058364,
|
| 697 |
+
"grad_norm": 0.24874511073857605,
|
| 698 |
+
"learning_rate": 1.922567370848072e-05,
|
| 699 |
+
"log_odds_chosen": 1.70361328125,
|
| 700 |
+
"log_odds_ratio": -0.1970672607421875,
|
| 701 |
+
"logits/chosen": 0.152435302734375,
|
| 702 |
+
"logits/rejected": 0.3475341796875,
|
| 703 |
+
"logps/chosen": -0.517578125,
|
| 704 |
+
"logps/rejected": -1.5634765625,
|
| 705 |
+
"loss": 9.2043,
|
| 706 |
+
"nll_loss": 0.55792236328125,
|
| 707 |
+
"rewards/accuracies": 1.0,
|
| 708 |
+
"rewards/chosen": -0.05176544189453125,
|
| 709 |
+
"rewards/margins": 0.10449981689453125,
|
| 710 |
+
"rewards/rejected": -0.156280517578125,
|
| 711 |
+
"step": 39
|
| 712 |
+
},
|
| 713 |
+
{
|
| 714 |
+
"epoch": 0.16675351745700887,
|
| 715 |
+
"grad_norm": 0.25505276051189985,
|
| 716 |
+
"learning_rate": 1.917211301505453e-05,
|
| 717 |
+
"log_odds_chosen": 1.87109375,
|
| 718 |
+
"log_odds_ratio": -0.1639862060546875,
|
| 719 |
+
"logits/chosen": -0.01544189453125,
|
| 720 |
+
"logits/rejected": 0.23333740234375,
|
| 721 |
+
"logps/chosen": -0.6492919921875,
|
| 722 |
+
"logps/rejected": -1.87548828125,
|
| 723 |
+
"loss": 8.9302,
|
| 724 |
+
"nll_loss": 0.6806640625,
|
| 725 |
+
"rewards/accuracies": 1.0,
|
| 726 |
+
"rewards/chosen": -0.06491851806640625,
|
| 727 |
+
"rewards/margins": 0.122833251953125,
|
| 728 |
+
"rewards/rejected": -0.18768310546875,
|
| 729 |
+
"step": 40
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"epoch": 0.1709223553934341,
|
| 733 |
+
"grad_norm": 0.25038865681527556,
|
| 734 |
+
"learning_rate": 1.9116841098196538e-05,
|
| 735 |
+
"log_odds_chosen": 1.571533203125,
|
| 736 |
+
"log_odds_ratio": -0.2160186767578125,
|
| 737 |
+
"logits/chosen": 0.20674896240234375,
|
| 738 |
+
"logits/rejected": 0.411865234375,
|
| 739 |
+
"logps/chosen": -0.6446533203125,
|
| 740 |
+
"logps/rejected": -1.655517578125,
|
| 741 |
+
"loss": 10.1494,
|
| 742 |
+
"nll_loss": 0.683837890625,
|
| 743 |
+
"rewards/accuracies": 1.0,
|
| 744 |
+
"rewards/chosen": -0.064483642578125,
|
| 745 |
+
"rewards/margins": 0.1011505126953125,
|
| 746 |
+
"rewards/rejected": -0.1656494140625,
|
| 747 |
+
"step": 41
|
| 748 |
+
},
|
| 749 |
+
{
|
| 750 |
+
"epoch": 0.1750911933298593,
|
| 751 |
+
"grad_norm": 0.25353387868938165,
|
| 752 |
+
"learning_rate": 1.9059868269881637e-05,
|
| 753 |
+
"log_odds_chosen": 2.16650390625,
|
| 754 |
+
"log_odds_ratio": -0.152008056640625,
|
| 755 |
+
"logits/chosen": 0.08073043823242188,
|
| 756 |
+
"logits/rejected": 0.36627197265625,
|
| 757 |
+
"logps/chosen": -0.5087890625,
|
| 758 |
+
"logps/rejected": -1.926513671875,
|
| 759 |
+
"loss": 8.4038,
|
| 760 |
+
"nll_loss": 0.5565185546875,
|
| 761 |
+
"rewards/accuracies": 1.0,
|
| 762 |
+
"rewards/chosen": -0.050872802734375,
|
| 763 |
+
"rewards/margins": 0.141632080078125,
|
| 764 |
+
"rewards/rejected": -0.192596435546875,
|
| 765 |
+
"step": 42
|
| 766 |
+
},
|
| 767 |
+
{
|
| 768 |
+
"epoch": 0.17926003126628454,
|
| 769 |
+
"grad_norm": 0.2688107571543341,
|
| 770 |
+
"learning_rate": 1.9001205159420512e-05,
|
| 771 |
+
"log_odds_chosen": 1.97216796875,
|
| 772 |
+
"log_odds_ratio": -0.1601715087890625,
|
| 773 |
+
"logits/chosen": 0.13031005859375,
|
| 774 |
+
"logits/rejected": 0.38970947265625,
|
| 775 |
+
"logps/chosen": -0.494384765625,
|
| 776 |
+
"logps/rejected": -1.752685546875,
|
| 777 |
+
"loss": 9.4678,
|
| 778 |
+
"nll_loss": 0.529296875,
|
| 779 |
+
"rewards/accuracies": 1.0,
|
| 780 |
+
"rewards/chosen": -0.0494537353515625,
|
| 781 |
+
"rewards/margins": 0.12591552734375,
|
| 782 |
+
"rewards/rejected": -0.175323486328125,
|
| 783 |
+
"step": 43
|
| 784 |
+
},
|
| 785 |
+
{
|
| 786 |
+
"epoch": 0.18342886920270973,
|
| 787 |
+
"grad_norm": 0.23905117537105064,
|
| 788 |
+
"learning_rate": 1.8940862711476515e-05,
|
| 789 |
+
"log_odds_chosen": 1.85693359375,
|
| 790 |
+
"log_odds_ratio": -0.168853759765625,
|
| 791 |
+
"logits/chosen": 0.04300975799560547,
|
| 792 |
+
"logits/rejected": 0.3031005859375,
|
| 793 |
+
"logps/chosen": -0.48065185546875,
|
| 794 |
+
"logps/rejected": -1.60107421875,
|
| 795 |
+
"loss": 8.9258,
|
| 796 |
+
"nll_loss": 0.512451171875,
|
| 797 |
+
"rewards/accuracies": 1.0,
|
| 798 |
+
"rewards/chosen": -0.04808807373046875,
|
| 799 |
+
"rewards/margins": 0.1120452880859375,
|
| 800 |
+
"rewards/rejected": -0.16015625,
|
| 801 |
+
"step": 44
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"epoch": 0.18759770713913496,
|
| 805 |
+
"grad_norm": 0.24465566014470783,
|
| 806 |
+
"learning_rate": 1.8878852184023754e-05,
|
| 807 |
+
"log_odds_chosen": 1.964111328125,
|
| 808 |
+
"log_odds_ratio": -0.16321563720703125,
|
| 809 |
+
"logits/chosen": 0.3105430603027344,
|
| 810 |
+
"logits/rejected": 0.6311187744140625,
|
| 811 |
+
"logps/chosen": -0.600830078125,
|
| 812 |
+
"logps/rejected": -1.91357421875,
|
| 813 |
+
"loss": 9.2246,
|
| 814 |
+
"nll_loss": 0.6397705078125,
|
| 815 |
+
"rewards/accuracies": 1.0,
|
| 816 |
+
"rewards/chosen": -0.0601043701171875,
|
| 817 |
+
"rewards/margins": 0.1313323974609375,
|
| 818 |
+
"rewards/rejected": -0.19140625,
|
| 819 |
+
"step": 45
|
| 820 |
+
},
|
| 821 |
+
{
|
| 822 |
+
"epoch": 0.19176654507556018,
|
| 823 |
+
"grad_norm": 0.24634616718189936,
|
| 824 |
+
"learning_rate": 1.8815185146246718e-05,
|
| 825 |
+
"log_odds_chosen": 1.959228515625,
|
| 826 |
+
"log_odds_ratio": -0.1479034423828125,
|
| 827 |
+
"logits/chosen": 0.133026123046875,
|
| 828 |
+
"logits/rejected": 0.42559814453125,
|
| 829 |
+
"logps/chosen": -0.4908447265625,
|
| 830 |
+
"logps/rejected": -1.70263671875,
|
| 831 |
+
"loss": 8.5979,
|
| 832 |
+
"nll_loss": 0.5269775390625,
|
| 833 |
+
"rewards/accuracies": 1.0,
|
| 834 |
+
"rewards/chosen": -0.04906463623046875,
|
| 835 |
+
"rewards/margins": 0.1209716796875,
|
| 836 |
+
"rewards/rejected": -0.170166015625,
|
| 837 |
+
"step": 46
|
| 838 |
+
},
|
| 839 |
+
{
|
| 840 |
+
"epoch": 0.1959353830119854,
|
| 841 |
+
"grad_norm": 0.24351532815561816,
|
| 842 |
+
"learning_rate": 1.8749873476381827e-05,
|
| 843 |
+
"log_odds_chosen": 1.909423828125,
|
| 844 |
+
"log_odds_ratio": -0.160247802734375,
|
| 845 |
+
"logits/chosen": 0.156036376953125,
|
| 846 |
+
"logits/rejected": 0.4642486572265625,
|
| 847 |
+
"logps/chosen": -0.5460205078125,
|
| 848 |
+
"logps/rejected": -1.7294921875,
|
| 849 |
+
"loss": 9.5645,
|
| 850 |
+
"nll_loss": 0.58837890625,
|
| 851 |
+
"rewards/accuracies": 1.0,
|
| 852 |
+
"rewards/chosen": -0.05460357666015625,
|
| 853 |
+
"rewards/margins": 0.1183624267578125,
|
| 854 |
+
"rewards/rejected": -0.173065185546875,
|
| 855 |
+
"step": 47
|
| 856 |
+
},
|
| 857 |
+
{
|
| 858 |
+
"epoch": 0.20010422094841063,
|
| 859 |
+
"grad_norm": 0.2494867438799568,
|
| 860 |
+
"learning_rate": 1.8682929359501338e-05,
|
| 861 |
+
"log_odds_chosen": 2.22119140625,
|
| 862 |
+
"log_odds_ratio": -0.14777088165283203,
|
| 863 |
+
"logits/chosen": 0.09519004821777344,
|
| 864 |
+
"logits/rejected": 0.4602165222167969,
|
| 865 |
+
"logps/chosen": -0.4898681640625,
|
| 866 |
+
"logps/rejected": -1.955322265625,
|
| 867 |
+
"loss": 8.2217,
|
| 868 |
+
"nll_loss": 0.5205078125,
|
| 869 |
+
"rewards/accuracies": 1.0,
|
| 870 |
+
"rewards/chosen": -0.048980712890625,
|
| 871 |
+
"rewards/margins": 0.1465911865234375,
|
| 872 |
+
"rewards/rejected": -0.19561767578125,
|
| 873 |
+
"step": 48
|
| 874 |
+
},
|
| 875 |
+
{
|
| 876 |
+
"epoch": 0.20427305888483585,
|
| 877 |
+
"grad_norm": 0.2613632942085652,
|
| 878 |
+
"learning_rate": 1.8614365285240002e-05,
|
| 879 |
+
"log_odds_chosen": 2.54736328125,
|
| 880 |
+
"log_odds_ratio": -0.12019157409667969,
|
| 881 |
+
"logits/chosen": 0.262115478515625,
|
| 882 |
+
"logits/rejected": 0.7015838623046875,
|
| 883 |
+
"logps/chosen": -0.5364990234375,
|
| 884 |
+
"logps/rejected": -2.32861328125,
|
| 885 |
+
"loss": 10.1479,
|
| 886 |
+
"nll_loss": 0.58154296875,
|
| 887 |
+
"rewards/accuracies": 1.0,
|
| 888 |
+
"rewards/chosen": -0.053680419921875,
|
| 889 |
+
"rewards/margins": 0.1791839599609375,
|
| 890 |
+
"rewards/rejected": -0.232757568359375,
|
| 891 |
+
"step": 49
|
| 892 |
+
},
|
| 893 |
+
{
|
| 894 |
+
"epoch": 0.20844189682126107,
|
| 895 |
+
"grad_norm": 0.2512225056309303,
|
| 896 |
+
"learning_rate": 1.8544194045464888e-05,
|
| 897 |
+
"log_odds_chosen": 2.5048828125,
|
| 898 |
+
"log_odds_ratio": -0.11281204223632812,
|
| 899 |
+
"logits/chosen": 0.14321136474609375,
|
| 900 |
+
"logits/rejected": 0.6065673828125,
|
| 901 |
+
"logps/chosen": -0.578369140625,
|
| 902 |
+
"logps/rejected": -2.333984375,
|
| 903 |
+
"loss": 8.9175,
|
| 904 |
+
"nll_loss": 0.6080322265625,
|
| 905 |
+
"rewards/accuracies": 1.0,
|
| 906 |
+
"rewards/chosen": -0.057830810546875,
|
| 907 |
+
"rewards/margins": 0.175628662109375,
|
| 908 |
+
"rewards/rejected": -0.23345947265625,
|
| 909 |
+
"step": 50
|
| 910 |
+
},
|
| 911 |
+
{
|
| 912 |
+
"epoch": 0.2126107347576863,
|
| 913 |
+
"grad_norm": 0.24838000958008843,
|
| 914 |
+
"learning_rate": 1.8472428731888836e-05,
|
| 915 |
+
"log_odds_chosen": 2.25341796875,
|
| 916 |
+
"log_odds_ratio": -0.14614105224609375,
|
| 917 |
+
"logits/chosen": 0.20198440551757812,
|
| 918 |
+
"logits/rejected": 0.6221237182617188,
|
| 919 |
+
"logps/chosen": -0.55615234375,
|
| 920 |
+
"logps/rejected": -2.099609375,
|
| 921 |
+
"loss": 9.3623,
|
| 922 |
+
"nll_loss": 0.6011962890625,
|
| 923 |
+
"rewards/accuracies": 1.0,
|
| 924 |
+
"rewards/chosen": -0.055572509765625,
|
| 925 |
+
"rewards/margins": 0.154205322265625,
|
| 926 |
+
"rewards/rejected": -0.209808349609375,
|
| 927 |
+
"step": 51
|
| 928 |
+
},
|
| 929 |
+
{
|
| 930 |
+
"epoch": 0.21677957269411152,
|
| 931 |
+
"grad_norm": 0.2819144258147841,
|
| 932 |
+
"learning_rate": 1.8399082733627967e-05,
|
| 933 |
+
"log_odds_chosen": 2.265869140625,
|
| 934 |
+
"log_odds_ratio": -0.13389968872070312,
|
| 935 |
+
"logits/chosen": 0.2725982666015625,
|
| 936 |
+
"logits/rejected": 0.713623046875,
|
| 937 |
+
"logps/chosen": -0.59423828125,
|
| 938 |
+
"logps/rejected": -2.17724609375,
|
| 939 |
+
"loss": 9.584,
|
| 940 |
+
"nll_loss": 0.6329345703125,
|
| 941 |
+
"rewards/accuracies": 1.0,
|
| 942 |
+
"rewards/chosen": -0.0594482421875,
|
| 943 |
+
"rewards/margins": 0.158233642578125,
|
| 944 |
+
"rewards/rejected": -0.217864990234375,
|
| 945 |
+
"step": 52
|
| 946 |
+
},
|
| 947 |
+
{
|
| 948 |
+
"epoch": 0.22094841063053675,
|
| 949 |
+
"grad_norm": 0.23567493182733973,
|
| 950 |
+
"learning_rate": 1.832416973470368e-05,
|
| 951 |
+
"log_odds_chosen": 2.381591796875,
|
| 952 |
+
"log_odds_ratio": -0.1349315643310547,
|
| 953 |
+
"logits/chosen": 0.10595703125,
|
| 954 |
+
"logits/rejected": 0.584869384765625,
|
| 955 |
+
"logps/chosen": -0.5697021484375,
|
| 956 |
+
"logps/rejected": -2.246826171875,
|
| 957 |
+
"loss": 9.1006,
|
| 958 |
+
"nll_loss": 0.5938720703125,
|
| 959 |
+
"rewards/accuracies": 1.0,
|
| 960 |
+
"rewards/chosen": -0.05701446533203125,
|
| 961 |
+
"rewards/margins": 0.167572021484375,
|
| 962 |
+
"rewards/rejected": -0.224456787109375,
|
| 963 |
+
"step": 53
|
| 964 |
+
},
|
| 965 |
+
{
|
| 966 |
+
"epoch": 0.22511724856696197,
|
| 967 |
+
"grad_norm": 0.22661409894490514,
|
| 968 |
+
"learning_rate": 1.8247703711489684e-05,
|
| 969 |
+
"log_odds_chosen": 2.53515625,
|
| 970 |
+
"log_odds_ratio": -0.11096572875976562,
|
| 971 |
+
"logits/chosen": 0.1064910888671875,
|
| 972 |
+
"logits/rejected": 0.5858306884765625,
|
| 973 |
+
"logps/chosen": -0.457763671875,
|
| 974 |
+
"logps/rejected": -2.11865234375,
|
| 975 |
+
"loss": 8.2666,
|
| 976 |
+
"nll_loss": 0.489501953125,
|
| 977 |
+
"rewards/accuracies": 1.0,
|
| 978 |
+
"rewards/chosen": -0.04578399658203125,
|
| 979 |
+
"rewards/margins": 0.1662139892578125,
|
| 980 |
+
"rewards/rejected": -0.212005615234375,
|
| 981 |
+
"step": 54
|
| 982 |
+
},
|
| 983 |
+
{
|
| 984 |
+
"epoch": 0.2292860865033872,
|
| 985 |
+
"grad_norm": 0.2122635369524212,
|
| 986 |
+
"learning_rate": 1.816969893010442e-05,
|
| 987 |
+
"log_odds_chosen": 2.40380859375,
|
| 988 |
+
"log_odds_ratio": -0.1234893798828125,
|
| 989 |
+
"logits/chosen": 0.23822784423828125,
|
| 990 |
+
"logits/rejected": 0.7010650634765625,
|
| 991 |
+
"logps/chosen": -0.4842529296875,
|
| 992 |
+
"logps/rejected": -2.067626953125,
|
| 993 |
+
"loss": 8.4883,
|
| 994 |
+
"nll_loss": 0.5263671875,
|
| 995 |
+
"rewards/accuracies": 1.0,
|
| 996 |
+
"rewards/chosen": -0.04840087890625,
|
| 997 |
+
"rewards/margins": 0.158416748046875,
|
| 998 |
+
"rewards/rejected": -0.206787109375,
|
| 999 |
+
"step": 55
|
| 1000 |
+
},
|
| 1001 |
+
{
|
| 1002 |
+
"epoch": 0.2334549244398124,
|
| 1003 |
+
"grad_norm": 0.24092973363237136,
|
| 1004 |
+
"learning_rate": 1.8090169943749477e-05,
|
| 1005 |
+
"log_odds_chosen": 2.4140625,
|
| 1006 |
+
"log_odds_ratio": -0.11363983154296875,
|
| 1007 |
+
"logits/chosen": 0.22986769676208496,
|
| 1008 |
+
"logits/rejected": 0.75823974609375,
|
| 1009 |
+
"logps/chosen": -0.5335693359375,
|
| 1010 |
+
"logps/rejected": -2.19140625,
|
| 1011 |
+
"loss": 9.4546,
|
| 1012 |
+
"nll_loss": 0.58251953125,
|
| 1013 |
+
"rewards/accuracies": 1.0,
|
| 1014 |
+
"rewards/chosen": -0.0533447265625,
|
| 1015 |
+
"rewards/margins": 0.1658935546875,
|
| 1016 |
+
"rewards/rejected": -0.21905517578125,
|
| 1017 |
+
"step": 56
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"epoch": 0.2376237623762376,
|
| 1021 |
+
"grad_norm": 0.24128229489592115,
|
| 1022 |
+
"learning_rate": 1.8009131589994418e-05,
|
| 1023 |
+
"log_odds_chosen": 2.52001953125,
|
| 1024 |
+
"log_odds_ratio": -0.10130882263183594,
|
| 1025 |
+
"logits/chosen": 0.3608417510986328,
|
| 1026 |
+
"logits/rejected": 0.9401397705078125,
|
| 1027 |
+
"logps/chosen": -0.5968017578125,
|
| 1028 |
+
"logps/rejected": -2.3515625,
|
| 1029 |
+
"loss": 9.0918,
|
| 1030 |
+
"nll_loss": 0.6282958984375,
|
| 1031 |
+
"rewards/accuracies": 1.0,
|
| 1032 |
+
"rewards/chosen": -0.05966949462890625,
|
| 1033 |
+
"rewards/margins": 0.175506591796875,
|
| 1034 |
+
"rewards/rejected": -0.235137939453125,
|
| 1035 |
+
"step": 57
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"epoch": 0.24179260031266284,
|
| 1039 |
+
"grad_norm": 0.21850524678110875,
|
| 1040 |
+
"learning_rate": 1.7926598988008584e-05,
|
| 1041 |
+
"log_odds_chosen": 2.6856689453125,
|
| 1042 |
+
"log_odds_ratio": -0.14227867126464844,
|
| 1043 |
+
"logits/chosen": 0.4098968505859375,
|
| 1044 |
+
"logits/rejected": 1.03839111328125,
|
| 1045 |
+
"logps/chosen": -0.536865234375,
|
| 1046 |
+
"logps/rejected": -2.50439453125,
|
| 1047 |
+
"loss": 9.1926,
|
| 1048 |
+
"nll_loss": 0.564697265625,
|
| 1049 |
+
"rewards/accuracies": 1.0,
|
| 1050 |
+
"rewards/chosen": -0.05364990234375,
|
| 1051 |
+
"rewards/margins": 0.1970672607421875,
|
| 1052 |
+
"rewards/rejected": -0.25042724609375,
|
| 1053 |
+
"step": 58
|
| 1054 |
+
},
|
| 1055 |
+
{
|
| 1056 |
+
"epoch": 0.24596143824908806,
|
| 1057 |
+
"grad_norm": 0.2280813073435613,
|
| 1058 |
+
"learning_rate": 1.7842587535740315e-05,
|
| 1059 |
+
"log_odds_chosen": 2.0107421875,
|
| 1060 |
+
"log_odds_ratio": -0.14935302734375,
|
| 1061 |
+
"logits/chosen": 0.4387807846069336,
|
| 1062 |
+
"logits/rejected": 0.90997314453125,
|
| 1063 |
+
"logps/chosen": -0.5528564453125,
|
| 1064 |
+
"logps/rejected": -1.870361328125,
|
| 1065 |
+
"loss": 8.6011,
|
| 1066 |
+
"nll_loss": 0.5877685546875,
|
| 1067 |
+
"rewards/accuracies": 1.0,
|
| 1068 |
+
"rewards/chosen": -0.05525970458984375,
|
| 1069 |
+
"rewards/margins": 0.131805419921875,
|
| 1070 |
+
"rewards/rejected": -0.18701171875,
|
| 1071 |
+
"step": 59
|
| 1072 |
+
},
|
| 1073 |
+
{
|
| 1074 |
+
"epoch": 0.2501302761855133,
|
| 1075 |
+
"grad_norm": 0.22058979865253361,
|
| 1076 |
+
"learning_rate": 1.77571129070442e-05,
|
| 1077 |
+
"log_odds_chosen": 2.25244140625,
|
| 1078 |
+
"log_odds_ratio": -0.1284637451171875,
|
| 1079 |
+
"logits/chosen": 0.28824806213378906,
|
| 1080 |
+
"logits/rejected": 0.82415771484375,
|
| 1081 |
+
"logps/chosen": -0.5008544921875,
|
| 1082 |
+
"logps/rejected": -1.96728515625,
|
| 1083 |
+
"loss": 8.9312,
|
| 1084 |
+
"nll_loss": 0.5223388671875,
|
| 1085 |
+
"rewards/accuracies": 1.0,
|
| 1086 |
+
"rewards/chosen": -0.05010986328125,
|
| 1087 |
+
"rewards/margins": 0.1463623046875,
|
| 1088 |
+
"rewards/rejected": -0.19659423828125,
|
| 1089 |
+
"step": 60
|
| 1090 |
+
},
|
| 1091 |
+
{
|
| 1092 |
+
"epoch": 0.2542991141219385,
|
| 1093 |
+
"grad_norm": 0.21889441829668788,
|
| 1094 |
+
"learning_rate": 1.7670191048756827e-05,
|
| 1095 |
+
"log_odds_chosen": 2.78369140625,
|
| 1096 |
+
"log_odds_ratio": -0.07579803466796875,
|
| 1097 |
+
"logits/chosen": 0.07476806640625,
|
| 1098 |
+
"logits/rejected": 0.78863525390625,
|
| 1099 |
+
"logps/chosen": -0.48797607421875,
|
| 1100 |
+
"logps/rejected": -2.36572265625,
|
| 1101 |
+
"loss": 8.9883,
|
| 1102 |
+
"nll_loss": 0.5145263671875,
|
| 1103 |
+
"rewards/accuracies": 1.0,
|
| 1104 |
+
"rewards/chosen": -0.0487823486328125,
|
| 1105 |
+
"rewards/margins": 0.18756103515625,
|
| 1106 |
+
"rewards/rejected": -0.2364501953125,
|
| 1107 |
+
"step": 61
|
| 1108 |
+
},
|
| 1109 |
+
{
|
| 1110 |
+
"epoch": 0.2584679520583637,
|
| 1111 |
+
"grad_norm": 0.24736221036261355,
|
| 1112 |
+
"learning_rate": 1.758183817772163e-05,
|
| 1113 |
+
"log_odds_chosen": 3.00390625,
|
| 1114 |
+
"log_odds_ratio": -0.09209632873535156,
|
| 1115 |
+
"logits/chosen": 0.5449905395507812,
|
| 1116 |
+
"logits/rejected": 1.349365234375,
|
| 1117 |
+
"logps/chosen": -0.6527099609375,
|
| 1118 |
+
"logps/rejected": -2.9609375,
|
| 1119 |
+
"loss": 9.061,
|
| 1120 |
+
"nll_loss": 0.70263671875,
|
| 1121 |
+
"rewards/accuracies": 1.0,
|
| 1122 |
+
"rewards/chosen": -0.0652313232421875,
|
| 1123 |
+
"rewards/margins": 0.230743408203125,
|
| 1124 |
+
"rewards/rejected": -0.29608154296875,
|
| 1125 |
+
"step": 62
|
| 1126 |
+
},
|
| 1127 |
+
{
|
| 1128 |
+
"epoch": 0.26263678999478896,
|
| 1129 |
+
"grad_norm": 0.2374825351022171,
|
| 1130 |
+
"learning_rate": 1.749207077776331e-05,
|
| 1131 |
+
"log_odds_chosen": 3.13818359375,
|
| 1132 |
+
"log_odds_ratio": -0.06859254837036133,
|
| 1133 |
+
"logits/chosen": 0.263458251953125,
|
| 1134 |
+
"logits/rejected": 1.0475082397460938,
|
| 1135 |
+
"logps/chosen": -0.48260498046875,
|
| 1136 |
+
"logps/rejected": -2.7265625,
|
| 1137 |
+
"loss": 8.6455,
|
| 1138 |
+
"nll_loss": 0.51739501953125,
|
| 1139 |
+
"rewards/accuracies": 1.0,
|
| 1140 |
+
"rewards/chosen": -0.04827880859375,
|
| 1141 |
+
"rewards/margins": 0.2242431640625,
|
| 1142 |
+
"rewards/rejected": -0.27252197265625,
|
| 1143 |
+
"step": 63
|
| 1144 |
+
},
|
| 1145 |
+
{
|
| 1146 |
+
"epoch": 0.26680562793121415,
|
| 1147 |
+
"grad_norm": 0.23724721805422275,
|
| 1148 |
+
"learning_rate": 1.740090559661252e-05,
|
| 1149 |
+
"log_odds_chosen": 2.47119140625,
|
| 1150 |
+
"log_odds_ratio": -0.134368896484375,
|
| 1151 |
+
"logits/chosen": 0.35262298583984375,
|
| 1152 |
+
"logits/rejected": 1.022674560546875,
|
| 1153 |
+
"logps/chosen": -0.5977783203125,
|
| 1154 |
+
"logps/rejected": -2.363525390625,
|
| 1155 |
+
"loss": 9.0049,
|
| 1156 |
+
"nll_loss": 0.6239013671875,
|
| 1157 |
+
"rewards/accuracies": 1.0,
|
| 1158 |
+
"rewards/chosen": -0.0598297119140625,
|
| 1159 |
+
"rewards/margins": 0.1763916015625,
|
| 1160 |
+
"rewards/rejected": -0.23626708984375,
|
| 1161 |
+
"step": 64
|
| 1162 |
+
},
|
| 1163 |
+
{
|
| 1164 |
+
"epoch": 0.2709744658676394,
|
| 1165 |
+
"grad_norm": 0.21699208752080323,
|
| 1166 |
+
"learning_rate": 1.730835964278124e-05,
|
| 1167 |
+
"log_odds_chosen": 2.75830078125,
|
| 1168 |
+
"log_odds_ratio": -0.10488510131835938,
|
| 1169 |
+
"logits/chosen": 0.1995849609375,
|
| 1170 |
+
"logits/rejected": 0.919189453125,
|
| 1171 |
+
"logps/chosen": -0.4716796875,
|
| 1172 |
+
"logps/rejected": -2.36962890625,
|
| 1173 |
+
"loss": 8.4927,
|
| 1174 |
+
"nll_loss": 0.5042724609375,
|
| 1175 |
+
"rewards/accuracies": 1.0,
|
| 1176 |
+
"rewards/chosen": -0.0471649169921875,
|
| 1177 |
+
"rewards/margins": 0.189697265625,
|
| 1178 |
+
"rewards/rejected": -0.2369384765625,
|
| 1179 |
+
"step": 65
|
| 1180 |
+
},
|
| 1181 |
+
{
|
| 1182 |
+
"epoch": 0.2751433038040646,
|
| 1183 |
+
"grad_norm": 0.22482452188091642,
|
| 1184 |
+
"learning_rate": 1.721445018238956e-05,
|
| 1185 |
+
"log_odds_chosen": 2.879638671875,
|
| 1186 |
+
"log_odds_ratio": -0.09115219116210938,
|
| 1187 |
+
"logits/chosen": 0.1223907470703125,
|
| 1188 |
+
"logits/rejected": 0.9041290283203125,
|
| 1189 |
+
"logps/chosen": -0.4810791015625,
|
| 1190 |
+
"logps/rejected": -2.525634765625,
|
| 1191 |
+
"loss": 8.51,
|
| 1192 |
+
"nll_loss": 0.5155029296875,
|
| 1193 |
+
"rewards/accuracies": 1.0,
|
| 1194 |
+
"rewards/chosen": -0.0481109619140625,
|
| 1195 |
+
"rewards/margins": 0.2045440673828125,
|
| 1196 |
+
"rewards/rejected": -0.252655029296875,
|
| 1197 |
+
"step": 66
|
| 1198 |
+
},
|
| 1199 |
+
{
|
| 1200 |
+
"epoch": 0.27931214174048985,
|
| 1201 |
+
"grad_norm": 0.21139538168727146,
|
| 1202 |
+
"learning_rate": 1.7119194735944336e-05,
|
| 1203 |
+
"log_odds_chosen": 2.35986328125,
|
| 1204 |
+
"log_odds_ratio": -0.12477874755859375,
|
| 1205 |
+
"logits/chosen": 0.51458740234375,
|
| 1206 |
+
"logits/rejected": 1.1568603515625,
|
| 1207 |
+
"logps/chosen": -0.528564453125,
|
| 1208 |
+
"logps/rejected": -2.12548828125,
|
| 1209 |
+
"loss": 8.5718,
|
| 1210 |
+
"nll_loss": 0.5594482421875,
|
| 1211 |
+
"rewards/accuracies": 1.0,
|
| 1212 |
+
"rewards/chosen": -0.0528717041015625,
|
| 1213 |
+
"rewards/margins": 0.1595611572265625,
|
| 1214 |
+
"rewards/rejected": -0.212554931640625,
|
| 1215 |
+
"step": 67
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"epoch": 0.28348097967691505,
|
| 1219 |
+
"grad_norm": 0.2293374844558361,
|
| 1220 |
+
"learning_rate": 1.7022611075070476e-05,
|
| 1221 |
+
"log_odds_chosen": 2.974609375,
|
| 1222 |
+
"log_odds_ratio": -0.0671539306640625,
|
| 1223 |
+
"logits/chosen": 0.3210601806640625,
|
| 1224 |
+
"logits/rejected": 1.1292877197265625,
|
| 1225 |
+
"logps/chosen": -0.477783203125,
|
| 1226 |
+
"logps/rejected": -2.55126953125,
|
| 1227 |
+
"loss": 8.9819,
|
| 1228 |
+
"nll_loss": 0.50531005859375,
|
| 1229 |
+
"rewards/accuracies": 1.0,
|
| 1230 |
+
"rewards/chosen": -0.04778289794921875,
|
| 1231 |
+
"rewards/margins": 0.207275390625,
|
| 1232 |
+
"rewards/rejected": -0.25506591796875,
|
| 1233 |
+
"step": 68
|
| 1234 |
+
},
|
| 1235 |
+
{
|
| 1236 |
+
"epoch": 0.2876498176133403,
|
| 1237 |
+
"grad_norm": 0.2398973971579909,
|
| 1238 |
+
"learning_rate": 1.6924717219195258e-05,
|
| 1239 |
+
"log_odds_chosen": 2.865234375,
|
| 1240 |
+
"log_odds_ratio": -0.09108352661132812,
|
| 1241 |
+
"logits/chosen": 0.3566474914550781,
|
| 1242 |
+
"logits/rejected": 1.15185546875,
|
| 1243 |
+
"logps/chosen": -0.5130615234375,
|
| 1244 |
+
"logps/rejected": -2.56396484375,
|
| 1245 |
+
"loss": 8.7573,
|
| 1246 |
+
"nll_loss": 0.5433349609375,
|
| 1247 |
+
"rewards/accuracies": 1.0,
|
| 1248 |
+
"rewards/chosen": -0.051300048828125,
|
| 1249 |
+
"rewards/margins": 0.20513916015625,
|
| 1250 |
+
"rewards/rejected": -0.2564697265625,
|
| 1251 |
+
"step": 69
|
| 1252 |
+
},
|
| 1253 |
+
{
|
| 1254 |
+
"epoch": 0.2918186555497655,
|
| 1255 |
+
"grad_norm": 0.2380817503932237,
|
| 1256 |
+
"learning_rate": 1.6825531432186545e-05,
|
| 1257 |
+
"log_odds_chosen": 3.68310546875,
|
| 1258 |
+
"log_odds_ratio": -0.06094849109649658,
|
| 1259 |
+
"logits/chosen": 0.10516357421875,
|
| 1260 |
+
"logits/rejected": 1.127197265625,
|
| 1261 |
+
"logps/chosen": -0.48614501953125,
|
| 1262 |
+
"logps/rejected": -3.21044921875,
|
| 1263 |
+
"loss": 8.9338,
|
| 1264 |
+
"nll_loss": 0.51641845703125,
|
| 1265 |
+
"rewards/accuracies": 1.0,
|
| 1266 |
+
"rewards/chosen": -0.04863739013671875,
|
| 1267 |
+
"rewards/margins": 0.2725067138671875,
|
| 1268 |
+
"rewards/rejected": -0.321075439453125,
|
| 1269 |
+
"step": 70
|
| 1270 |
+
},
|
| 1271 |
+
{
|
| 1272 |
+
"epoch": 0.29598749348619074,
|
| 1273 |
+
"grad_norm": 0.2159429700257839,
|
| 1274 |
+
"learning_rate": 1.6725072218945274e-05,
|
| 1275 |
+
"log_odds_chosen": 3.00537109375,
|
| 1276 |
+
"log_odds_ratio": -0.062255859375,
|
| 1277 |
+
"logits/chosen": 0.08046150207519531,
|
| 1278 |
+
"logits/rejected": 0.93292236328125,
|
| 1279 |
+
"logps/chosen": -0.4757080078125,
|
| 1280 |
+
"logps/rejected": -2.52734375,
|
| 1281 |
+
"loss": 8.4172,
|
| 1282 |
+
"nll_loss": 0.5010986328125,
|
| 1283 |
+
"rewards/accuracies": 1.0,
|
| 1284 |
+
"rewards/chosen": -0.04759979248046875,
|
| 1285 |
+
"rewards/margins": 0.2049560546875,
|
| 1286 |
+
"rewards/rejected": -0.25262451171875,
|
| 1287 |
+
"step": 71
|
| 1288 |
+
},
|
| 1289 |
+
{
|
| 1290 |
+
"epoch": 0.30015633142261594,
|
| 1291 |
+
"grad_norm": 0.21370278036618626,
|
| 1292 |
+
"learning_rate": 1.662335832195308e-05,
|
| 1293 |
+
"log_odds_chosen": 3.220703125,
|
| 1294 |
+
"log_odds_ratio": -0.07026481628417969,
|
| 1295 |
+
"logits/chosen": 0.4130706787109375,
|
| 1296 |
+
"logits/rejected": 1.337158203125,
|
| 1297 |
+
"logps/chosen": -0.494140625,
|
| 1298 |
+
"logps/rejected": -2.8369140625,
|
| 1299 |
+
"loss": 8.4102,
|
| 1300 |
+
"nll_loss": 0.5313720703125,
|
| 1301 |
+
"rewards/accuracies": 1.0,
|
| 1302 |
+
"rewards/chosen": -0.04938507080078125,
|
| 1303 |
+
"rewards/margins": 0.234222412109375,
|
| 1304 |
+
"rewards/rejected": -0.28363037109375,
|
| 1305 |
+
"step": 72
|
| 1306 |
+
},
|
| 1307 |
+
{
|
| 1308 |
+
"epoch": 0.3043251693590412,
|
| 1309 |
+
"grad_norm": 0.21445462010402655,
|
| 1310 |
+
"learning_rate": 1.6520408717775507e-05,
|
| 1311 |
+
"log_odds_chosen": 3.030029296875,
|
| 1312 |
+
"log_odds_ratio": -0.09325134754180908,
|
| 1313 |
+
"logits/chosen": 0.291961669921875,
|
| 1314 |
+
"logits/rejected": 1.124176025390625,
|
| 1315 |
+
"logps/chosen": -0.46539306640625,
|
| 1316 |
+
"logps/rejected": -2.61962890625,
|
| 1317 |
+
"loss": 8.7749,
|
| 1318 |
+
"nll_loss": 0.52032470703125,
|
| 1319 |
+
"rewards/accuracies": 1.0,
|
| 1320 |
+
"rewards/chosen": -0.04654693603515625,
|
| 1321 |
+
"rewards/margins": 0.215423583984375,
|
| 1322 |
+
"rewards/rejected": -0.261932373046875,
|
| 1323 |
+
"step": 73
|
| 1324 |
+
},
|
| 1325 |
+
{
|
| 1326 |
+
"epoch": 0.3084940072954664,
|
| 1327 |
+
"grad_norm": 0.2305921085093174,
|
| 1328 |
+
"learning_rate": 1.6416242613521612e-05,
|
| 1329 |
+
"log_odds_chosen": 3.40966796875,
|
| 1330 |
+
"log_odds_ratio": -0.051792144775390625,
|
| 1331 |
+
"logits/chosen": 0.22701263427734375,
|
| 1332 |
+
"logits/rejected": 1.232421875,
|
| 1333 |
+
"logps/chosen": -0.4923095703125,
|
| 1334 |
+
"logps/rejected": -3.0087890625,
|
| 1335 |
+
"loss": 8.9971,
|
| 1336 |
+
"nll_loss": 0.532958984375,
|
| 1337 |
+
"rewards/accuracies": 1.0,
|
| 1338 |
+
"rewards/chosen": -0.04920196533203125,
|
| 1339 |
+
"rewards/margins": 0.2520751953125,
|
| 1340 |
+
"rewards/rejected": -0.3011474609375,
|
| 1341 |
+
"step": 74
|
| 1342 |
+
},
|
| 1343 |
+
{
|
| 1344 |
+
"epoch": 0.3126628452318916,
|
| 1345 |
+
"grad_norm": 0.21171111932668515,
|
| 1346 |
+
"learning_rate": 1.631087944326053e-05,
|
| 1347 |
+
"log_odds_chosen": 2.77880859375,
|
| 1348 |
+
"log_odds_ratio": -0.11410236358642578,
|
| 1349 |
+
"logits/chosen": 0.3912620544433594,
|
| 1350 |
+
"logits/rejected": 1.1761474609375,
|
| 1351 |
+
"logps/chosen": -0.5250244140625,
|
| 1352 |
+
"logps/rejected": -2.53466796875,
|
| 1353 |
+
"loss": 9.2783,
|
| 1354 |
+
"nll_loss": 0.5582275390625,
|
| 1355 |
+
"rewards/accuracies": 1.0,
|
| 1356 |
+
"rewards/chosen": -0.052490234375,
|
| 1357 |
+
"rewards/margins": 0.200958251953125,
|
| 1358 |
+
"rewards/rejected": -0.25347900390625,
|
| 1359 |
+
"step": 75
|
| 1360 |
+
},
|
| 1361 |
+
{
|
| 1362 |
+
"epoch": 0.31683168316831684,
|
| 1363 |
+
"grad_norm": 0.21327287216080953,
|
| 1364 |
+
"learning_rate": 1.6204338864395683e-05,
|
| 1365 |
+
"log_odds_chosen": 3.2021484375,
|
| 1366 |
+
"log_odds_ratio": -0.09289395809173584,
|
| 1367 |
+
"logits/chosen": 0.41394615173339844,
|
| 1368 |
+
"logits/rejected": 1.296875,
|
| 1369 |
+
"logps/chosen": -0.5283203125,
|
| 1370 |
+
"logps/rejected": -2.9228515625,
|
| 1371 |
+
"loss": 8.793,
|
| 1372 |
+
"nll_loss": 0.5673828125,
|
| 1373 |
+
"rewards/accuracies": 1.0,
|
| 1374 |
+
"rewards/chosen": -0.0528564453125,
|
| 1375 |
+
"rewards/margins": 0.2394561767578125,
|
| 1376 |
+
"rewards/rejected": -0.29241943359375,
|
| 1377 |
+
"step": 76
|
| 1378 |
+
},
|
| 1379 |
+
{
|
| 1380 |
+
"epoch": 0.32100052110474203,
|
| 1381 |
+
"grad_norm": 0.22081572582819636,
|
| 1382 |
+
"learning_rate": 1.609664075399735e-05,
|
| 1383 |
+
"log_odds_chosen": 3.8564453125,
|
| 1384 |
+
"log_odds_ratio": -0.06345272064208984,
|
| 1385 |
+
"logits/chosen": 0.2453155517578125,
|
| 1386 |
+
"logits/rejected": 1.3897705078125,
|
| 1387 |
+
"logps/chosen": -0.47216796875,
|
| 1388 |
+
"logps/rejected": -3.40869140625,
|
| 1389 |
+
"loss": 8.6531,
|
| 1390 |
+
"nll_loss": 0.510498046875,
|
| 1391 |
+
"rewards/accuracies": 1.0,
|
| 1392 |
+
"rewards/chosen": -0.0472259521484375,
|
| 1393 |
+
"rewards/margins": 0.293609619140625,
|
| 1394 |
+
"rewards/rejected": -0.34075927734375,
|
| 1395 |
+
"step": 77
|
| 1396 |
+
},
|
| 1397 |
+
{
|
| 1398 |
+
"epoch": 0.3251693590411673,
|
| 1399 |
+
"grad_norm": 0.21379165530281527,
|
| 1400 |
+
"learning_rate": 1.5987805205094225e-05,
|
| 1401 |
+
"log_odds_chosen": 3.5078125,
|
| 1402 |
+
"log_odds_ratio": -0.060007452964782715,
|
| 1403 |
+
"logits/chosen": 0.2599372863769531,
|
| 1404 |
+
"logits/rejected": 1.30712890625,
|
| 1405 |
+
"logps/chosen": -0.5233154296875,
|
| 1406 |
+
"logps/rejected": -3.1806640625,
|
| 1407 |
+
"loss": 8.3716,
|
| 1408 |
+
"nll_loss": 0.5660400390625,
|
| 1409 |
+
"rewards/accuracies": 1.0,
|
| 1410 |
+
"rewards/chosen": -0.0523529052734375,
|
| 1411 |
+
"rewards/margins": 0.2657470703125,
|
| 1412 |
+
"rewards/rejected": -0.318115234375,
|
| 1413 |
+
"step": 78
|
| 1414 |
+
},
|
| 1415 |
+
{
|
| 1416 |
+
"epoch": 0.3293381969775925,
|
| 1417 |
+
"grad_norm": 0.2285233153975496,
|
| 1418 |
+
"learning_rate": 1.5877852522924733e-05,
|
| 1419 |
+
"log_odds_chosen": 3.60546875,
|
| 1420 |
+
"log_odds_ratio": -0.041787147521972656,
|
| 1421 |
+
"logits/chosen": 0.21383285522460938,
|
| 1422 |
+
"logits/rejected": 1.2878341674804688,
|
| 1423 |
+
"logps/chosen": -0.51556396484375,
|
| 1424 |
+
"logps/rejected": -3.1748046875,
|
| 1425 |
+
"loss": 8.3945,
|
| 1426 |
+
"nll_loss": 0.5489501953125,
|
| 1427 |
+
"rewards/accuracies": 1.0,
|
| 1428 |
+
"rewards/chosen": -0.0515289306640625,
|
| 1429 |
+
"rewards/margins": 0.266082763671875,
|
| 1430 |
+
"rewards/rejected": -0.3175048828125,
|
| 1431 |
+
"step": 79
|
| 1432 |
+
},
|
| 1433 |
+
{
|
| 1434 |
+
"epoch": 0.33350703491401773,
|
| 1435 |
+
"grad_norm": 0.217365661040775,
|
| 1436 |
+
"learning_rate": 1.5766803221148676e-05,
|
| 1437 |
+
"log_odds_chosen": 3.79150390625,
|
| 1438 |
+
"log_odds_ratio": -0.03936195373535156,
|
| 1439 |
+
"logits/chosen": -0.07393646240234375,
|
| 1440 |
+
"logits/rejected": 1.0196533203125,
|
| 1441 |
+
"logps/chosen": -0.41058349609375,
|
| 1442 |
+
"logps/rejected": -3.138671875,
|
| 1443 |
+
"loss": 8.1189,
|
| 1444 |
+
"nll_loss": 0.43505859375,
|
| 1445 |
+
"rewards/accuracies": 1.0,
|
| 1446 |
+
"rewards/chosen": -0.0410614013671875,
|
| 1447 |
+
"rewards/margins": 0.272613525390625,
|
| 1448 |
+
"rewards/rejected": -0.31378173828125,
|
| 1449 |
+
"step": 80
|
| 1450 |
+
}
|
| 1451 |
+
],
|
| 1452 |
+
"logging_steps": 1,
|
| 1453 |
+
"max_steps": 240,
|
| 1454 |
+
"num_input_tokens_seen": 0,
|
| 1455 |
+
"num_train_epochs": 2,
|
| 1456 |
+
"save_steps": 80,
|
| 1457 |
+
"stateful_callbacks": {
|
| 1458 |
+
"TrainerControl": {
|
| 1459 |
+
"args": {
|
| 1460 |
+
"should_epoch_stop": false,
|
| 1461 |
+
"should_evaluate": false,
|
| 1462 |
+
"should_log": false,
|
| 1463 |
+
"should_save": true,
|
| 1464 |
+
"should_training_stop": false
|
| 1465 |
+
},
|
| 1466 |
+
"attributes": {}
|
| 1467 |
+
}
|
| 1468 |
+
},
|
| 1469 |
+
"total_flos": 0.0,
|
| 1470 |
+
"train_batch_size": 1,
|
| 1471 |
+
"trial_name": null,
|
| 1472 |
+
"trial_params": null
|
| 1473 |
+
}
|
ckpt-80/training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d663160fa42d2a5dc56e444c10033529d0fa4a28b7c6e5e99d32a5399f9c1057
|
| 3 |
+
size 8440
|
ckpt-80/zero_to_fp32.py
ADDED
|
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python
|
| 2 |
+
|
| 3 |
+
# Copyright (c) Microsoft Corporation.
|
| 4 |
+
# SPDX-License-Identifier: Apache-2.0
|
| 5 |
+
|
| 6 |
+
# DeepSpeed Team
|
| 7 |
+
|
| 8 |
+
# This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
|
| 9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
| 10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
| 11 |
+
# application.
|
| 12 |
+
#
|
| 13 |
+
# example:
|
| 14 |
+
# python zero_to_fp32.py . output_dir/
|
| 15 |
+
# or
|
| 16 |
+
# python zero_to_fp32.py . output_dir/ --safe_serialization
|
| 17 |
+
|
| 18 |
+
import argparse
|
| 19 |
+
import torch
|
| 20 |
+
import glob
|
| 21 |
+
import math
|
| 22 |
+
import os
|
| 23 |
+
import re
|
| 24 |
+
import gc
|
| 25 |
+
import json
|
| 26 |
+
import numpy as np
|
| 27 |
+
from tqdm import tqdm
|
| 28 |
+
from collections import OrderedDict
|
| 29 |
+
from dataclasses import dataclass
|
| 30 |
+
|
| 31 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
| 32 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
| 33 |
+
from deepspeed.utils import logger
|
| 34 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
| 35 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
| 36 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
@dataclass
|
| 40 |
+
class zero_model_state:
|
| 41 |
+
buffers: dict()
|
| 42 |
+
param_shapes: dict()
|
| 43 |
+
shared_params: list
|
| 44 |
+
ds_version: int
|
| 45 |
+
frozen_param_shapes: dict()
|
| 46 |
+
frozen_param_fragments: dict()
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
debug = 0
|
| 50 |
+
|
| 51 |
+
# load to cpu
|
| 52 |
+
device = torch.device('cpu')
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
def atoi(text):
|
| 56 |
+
return int(text) if text.isdigit() else text
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
def natural_keys(text):
|
| 60 |
+
'''
|
| 61 |
+
alist.sort(key=natural_keys) sorts in human order
|
| 62 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
| 63 |
+
(See Toothy's implementation in the comments)
|
| 64 |
+
'''
|
| 65 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
| 69 |
+
if not os.path.isdir(checkpoint_dir):
|
| 70 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
| 71 |
+
|
| 72 |
+
# there should be only one file
|
| 73 |
+
if zero_stage <= 2:
|
| 74 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
| 75 |
+
elif zero_stage == 3:
|
| 76 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
| 77 |
+
|
| 78 |
+
if not os.path.exists(file):
|
| 79 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
| 80 |
+
|
| 81 |
+
return file
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
| 85 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
| 86 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
| 87 |
+
|
| 88 |
+
if len(ckpt_files) == 0:
|
| 89 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
| 90 |
+
|
| 91 |
+
return ckpt_files
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
def get_optim_files(checkpoint_dir):
|
| 95 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def get_model_state_files(checkpoint_dir):
|
| 99 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
| 100 |
+
|
| 101 |
+
|
| 102 |
+
def parse_model_states(files):
|
| 103 |
+
zero_model_states = []
|
| 104 |
+
for file in files:
|
| 105 |
+
state_dict = torch.load(file, map_location=device, weights_only=False)
|
| 106 |
+
|
| 107 |
+
if BUFFER_NAMES not in state_dict:
|
| 108 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
| 109 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
| 110 |
+
if debug:
|
| 111 |
+
print("Found buffers:", buffer_names)
|
| 112 |
+
|
| 113 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
| 114 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
| 115 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
| 116 |
+
|
| 117 |
+
# collect parameters that are included in param_shapes
|
| 118 |
+
param_names = []
|
| 119 |
+
for s in param_shapes:
|
| 120 |
+
for name in s.keys():
|
| 121 |
+
param_names.append(name)
|
| 122 |
+
|
| 123 |
+
# update with frozen parameters
|
| 124 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
| 125 |
+
if frozen_param_shapes is not None:
|
| 126 |
+
if debug:
|
| 127 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
| 128 |
+
param_names += list(frozen_param_shapes.keys())
|
| 129 |
+
|
| 130 |
+
# handle shared params
|
| 131 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
| 132 |
+
|
| 133 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
| 134 |
+
|
| 135 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
| 136 |
+
|
| 137 |
+
z_model_state = zero_model_state(buffers=buffers,
|
| 138 |
+
param_shapes=param_shapes,
|
| 139 |
+
shared_params=shared_params,
|
| 140 |
+
ds_version=ds_version,
|
| 141 |
+
frozen_param_shapes=frozen_param_shapes,
|
| 142 |
+
frozen_param_fragments=frozen_param_fragments)
|
| 143 |
+
zero_model_states.append(z_model_state)
|
| 144 |
+
|
| 145 |
+
return zero_model_states
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
| 149 |
+
total_files = len(files)
|
| 150 |
+
state_dicts = []
|
| 151 |
+
for f in tqdm(files, desc='Loading checkpoint shards'):
|
| 152 |
+
state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
|
| 153 |
+
# immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
|
| 154 |
+
# and also handle the case where it was already removed by another helper script
|
| 155 |
+
state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
|
| 156 |
+
state_dicts.append(state_dict)
|
| 157 |
+
|
| 158 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
| 159 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
| 160 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
| 161 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
| 162 |
+
|
| 163 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
| 164 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
| 165 |
+
# use the max of the partition_count to get the dp world_size.
|
| 166 |
+
|
| 167 |
+
if type(world_size) is list:
|
| 168 |
+
world_size = max(world_size)
|
| 169 |
+
|
| 170 |
+
if world_size != total_files:
|
| 171 |
+
raise ValueError(
|
| 172 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
| 173 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
| 174 |
+
)
|
| 175 |
+
|
| 176 |
+
# the groups are named differently in each stage
|
| 177 |
+
if zero_stage <= 2:
|
| 178 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
| 179 |
+
elif zero_stage == 3:
|
| 180 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
| 181 |
+
else:
|
| 182 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
| 183 |
+
|
| 184 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
| 185 |
+
return zero_stage, world_size, fp32_flat_groups
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
|
| 189 |
+
"""
|
| 190 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
| 191 |
+
|
| 192 |
+
Args:
|
| 193 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
| 194 |
+
|
| 195 |
+
"""
|
| 196 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
| 197 |
+
|
| 198 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
| 199 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
| 200 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
| 201 |
+
|
| 202 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
| 203 |
+
|
| 204 |
+
zero_model_states = parse_model_states(model_files)
|
| 205 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
| 206 |
+
|
| 207 |
+
if zero_stage <= 2:
|
| 208 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 209 |
+
exclude_frozen_parameters)
|
| 210 |
+
elif zero_stage == 3:
|
| 211 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 212 |
+
exclude_frozen_parameters)
|
| 213 |
+
|
| 214 |
+
|
| 215 |
+
def _zero2_merge_frozen_params(state_dict, zero_model_states):
|
| 216 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
| 217 |
+
return
|
| 218 |
+
|
| 219 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
| 220 |
+
frozen_param_fragments = zero_model_states[0].frozen_param_fragments
|
| 221 |
+
|
| 222 |
+
if debug:
|
| 223 |
+
num_elem = sum(s.numel() for s in frozen_param_shapes.values())
|
| 224 |
+
print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
| 225 |
+
|
| 226 |
+
wanted_params = len(frozen_param_shapes)
|
| 227 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
| 228 |
+
avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
|
| 229 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
| 230 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
| 231 |
+
|
| 232 |
+
total_params = 0
|
| 233 |
+
total_numel = 0
|
| 234 |
+
for name, shape in frozen_param_shapes.items():
|
| 235 |
+
total_params += 1
|
| 236 |
+
unpartitioned_numel = shape.numel()
|
| 237 |
+
total_numel += unpartitioned_numel
|
| 238 |
+
|
| 239 |
+
state_dict[name] = frozen_param_fragments[name]
|
| 240 |
+
|
| 241 |
+
if debug:
|
| 242 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
| 243 |
+
|
| 244 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
def _has_callable(obj, fn):
|
| 248 |
+
attr = getattr(obj, fn, None)
|
| 249 |
+
return callable(attr)
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 253 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 254 |
+
|
| 255 |
+
# Reconstruction protocol:
|
| 256 |
+
#
|
| 257 |
+
# XXX: document this
|
| 258 |
+
|
| 259 |
+
if debug:
|
| 260 |
+
for i in range(world_size):
|
| 261 |
+
for j in range(len(fp32_flat_groups[0])):
|
| 262 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
| 263 |
+
|
| 264 |
+
# XXX: memory usage doubles here (zero2)
|
| 265 |
+
num_param_groups = len(fp32_flat_groups[0])
|
| 266 |
+
merged_single_partition_of_fp32_groups = []
|
| 267 |
+
for i in range(num_param_groups):
|
| 268 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
| 269 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
| 270 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
| 271 |
+
avail_numel = sum(
|
| 272 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
| 273 |
+
|
| 274 |
+
if debug:
|
| 275 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
| 276 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
| 277 |
+
# not asserting if there is a mismatch due to possible padding
|
| 278 |
+
print(f"Have {avail_numel} numels to process.")
|
| 279 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
| 280 |
+
|
| 281 |
+
# params
|
| 282 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 283 |
+
# out-of-core computing solution
|
| 284 |
+
total_numel = 0
|
| 285 |
+
total_params = 0
|
| 286 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
| 287 |
+
offset = 0
|
| 288 |
+
avail_numel = full_single_fp32_vector.numel()
|
| 289 |
+
for name, shape in shapes.items():
|
| 290 |
+
|
| 291 |
+
unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
|
| 292 |
+
total_numel += unpartitioned_numel
|
| 293 |
+
total_params += 1
|
| 294 |
+
|
| 295 |
+
if debug:
|
| 296 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
| 297 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
| 298 |
+
offset += unpartitioned_numel
|
| 299 |
+
|
| 300 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
| 301 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
| 302 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
| 303 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
| 304 |
+
align_to = 2 * world_size
|
| 305 |
+
|
| 306 |
+
def zero2_align(x):
|
| 307 |
+
return align_to * math.ceil(x / align_to)
|
| 308 |
+
|
| 309 |
+
if debug:
|
| 310 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
| 311 |
+
|
| 312 |
+
offset = zero2_align(offset)
|
| 313 |
+
avail_numel = zero2_align(avail_numel)
|
| 314 |
+
|
| 315 |
+
if debug:
|
| 316 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
| 317 |
+
|
| 318 |
+
# Sanity check
|
| 319 |
+
if offset != avail_numel:
|
| 320 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 321 |
+
|
| 322 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
| 323 |
+
|
| 324 |
+
|
| 325 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 326 |
+
exclude_frozen_parameters):
|
| 327 |
+
state_dict = OrderedDict()
|
| 328 |
+
|
| 329 |
+
# buffers
|
| 330 |
+
buffers = zero_model_states[0].buffers
|
| 331 |
+
state_dict.update(buffers)
|
| 332 |
+
if debug:
|
| 333 |
+
print(f"added {len(buffers)} buffers")
|
| 334 |
+
|
| 335 |
+
if not exclude_frozen_parameters:
|
| 336 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
| 337 |
+
|
| 338 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 339 |
+
|
| 340 |
+
# recover shared parameters
|
| 341 |
+
for pair in zero_model_states[0].shared_params:
|
| 342 |
+
if pair[1] in state_dict:
|
| 343 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 344 |
+
|
| 345 |
+
return state_dict
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
| 349 |
+
remainder = unpartitioned_numel % world_size
|
| 350 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
| 351 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
| 352 |
+
return partitioned_numel, padding_numel
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
| 356 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
| 357 |
+
return
|
| 358 |
+
|
| 359 |
+
if debug:
|
| 360 |
+
for i in range(world_size):
|
| 361 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
| 362 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
| 363 |
+
|
| 364 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
| 365 |
+
wanted_params = len(frozen_param_shapes)
|
| 366 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
| 367 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
| 368 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
| 369 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
| 370 |
+
|
| 371 |
+
total_params = 0
|
| 372 |
+
total_numel = 0
|
| 373 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
| 374 |
+
total_params += 1
|
| 375 |
+
unpartitioned_numel = shape.numel()
|
| 376 |
+
total_numel += unpartitioned_numel
|
| 377 |
+
|
| 378 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
| 379 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
| 380 |
+
|
| 381 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 382 |
+
|
| 383 |
+
if debug:
|
| 384 |
+
print(
|
| 385 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 386 |
+
)
|
| 387 |
+
|
| 388 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
| 389 |
+
|
| 390 |
+
|
| 391 |
+
class GatheredTensor:
|
| 392 |
+
"""
|
| 393 |
+
A pseudo tensor that collects partitioned weights.
|
| 394 |
+
It is more memory efficient when there are multiple groups.
|
| 395 |
+
"""
|
| 396 |
+
|
| 397 |
+
def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
|
| 398 |
+
self.flat_groups = flat_groups
|
| 399 |
+
self.flat_groups_offset = flat_groups_offset
|
| 400 |
+
self.offset = offset
|
| 401 |
+
self.partitioned_numel = partitioned_numel
|
| 402 |
+
self.shape = shape
|
| 403 |
+
self.dtype = self.flat_groups[0][0].dtype
|
| 404 |
+
|
| 405 |
+
def contiguous(self):
|
| 406 |
+
"""
|
| 407 |
+
Merge partitioned weights from flat_groups into a single tensor.
|
| 408 |
+
"""
|
| 409 |
+
end_idx = self.offset + self.partitioned_numel
|
| 410 |
+
world_size = len(self.flat_groups)
|
| 411 |
+
pad_flat_param_chunks = []
|
| 412 |
+
|
| 413 |
+
for rank_i in range(world_size):
|
| 414 |
+
# for each rank, we need to collect weights from related group/groups
|
| 415 |
+
flat_groups_at_rank_i = self.flat_groups[rank_i]
|
| 416 |
+
start_group_id = None
|
| 417 |
+
end_group_id = None
|
| 418 |
+
for group_id in range(len(self.flat_groups_offset)):
|
| 419 |
+
if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
|
| 420 |
+
start_group_id = group_id
|
| 421 |
+
if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
|
| 422 |
+
end_group_id = group_id
|
| 423 |
+
break
|
| 424 |
+
# collect weights from related group/groups
|
| 425 |
+
for group_id in range(start_group_id, end_group_id + 1):
|
| 426 |
+
flat_tensor = flat_groups_at_rank_i[group_id]
|
| 427 |
+
start_offset = self.offset - self.flat_groups_offset[group_id]
|
| 428 |
+
end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
|
| 429 |
+
pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
|
| 430 |
+
|
| 431 |
+
# collect weights from all ranks
|
| 432 |
+
pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
|
| 433 |
+
param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
|
| 434 |
+
return param
|
| 435 |
+
|
| 436 |
+
|
| 437 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
| 438 |
+
param_shapes = zero_model_states[0].param_shapes
|
| 439 |
+
avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
|
| 440 |
+
|
| 441 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
| 442 |
+
# param, re-consolidating each param, while dealing with padding if any
|
| 443 |
+
|
| 444 |
+
# merge list of dicts, preserving order
|
| 445 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
| 446 |
+
|
| 447 |
+
if debug:
|
| 448 |
+
for i in range(world_size):
|
| 449 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
| 450 |
+
|
| 451 |
+
wanted_params = len(param_shapes)
|
| 452 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
| 453 |
+
# not asserting if there is a mismatch due to possible padding
|
| 454 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
| 455 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
| 456 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
| 457 |
+
|
| 458 |
+
# params
|
| 459 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
| 460 |
+
# out-of-core computing solution
|
| 461 |
+
offset = 0
|
| 462 |
+
total_numel = 0
|
| 463 |
+
total_params = 0
|
| 464 |
+
flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
|
| 465 |
+
for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
|
| 466 |
+
unpartitioned_numel = shape.numel()
|
| 467 |
+
total_numel += unpartitioned_numel
|
| 468 |
+
total_params += 1
|
| 469 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
| 470 |
+
|
| 471 |
+
if debug:
|
| 472 |
+
print(
|
| 473 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
| 474 |
+
)
|
| 475 |
+
|
| 476 |
+
# memory efficient tensor
|
| 477 |
+
tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
|
| 478 |
+
state_dict[name] = tensor
|
| 479 |
+
offset += partitioned_numel
|
| 480 |
+
|
| 481 |
+
offset *= world_size
|
| 482 |
+
|
| 483 |
+
# Sanity check
|
| 484 |
+
if offset != avail_numel:
|
| 485 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
| 486 |
+
|
| 487 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
| 488 |
+
|
| 489 |
+
|
| 490 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
| 491 |
+
exclude_frozen_parameters):
|
| 492 |
+
state_dict = OrderedDict()
|
| 493 |
+
|
| 494 |
+
# buffers
|
| 495 |
+
buffers = zero_model_states[0].buffers
|
| 496 |
+
state_dict.update(buffers)
|
| 497 |
+
if debug:
|
| 498 |
+
print(f"added {len(buffers)} buffers")
|
| 499 |
+
|
| 500 |
+
if not exclude_frozen_parameters:
|
| 501 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
| 502 |
+
|
| 503 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
| 504 |
+
|
| 505 |
+
# recover shared parameters
|
| 506 |
+
for pair in zero_model_states[0].shared_params:
|
| 507 |
+
if pair[1] in state_dict:
|
| 508 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
| 509 |
+
|
| 510 |
+
return state_dict
|
| 511 |
+
|
| 512 |
+
|
| 513 |
+
def to_torch_tensor(state_dict, return_empty_tensor=False):
|
| 514 |
+
"""
|
| 515 |
+
Convert state_dict of GatheredTensor to torch tensor
|
| 516 |
+
"""
|
| 517 |
+
torch_state_dict = {}
|
| 518 |
+
converted_tensors = {}
|
| 519 |
+
for name, tensor in state_dict.items():
|
| 520 |
+
tensor_id = id(tensor)
|
| 521 |
+
if tensor_id in converted_tensors: # shared tensors
|
| 522 |
+
shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
|
| 523 |
+
torch_state_dict[name] = shared_tensor
|
| 524 |
+
else:
|
| 525 |
+
converted_tensors[tensor_id] = name
|
| 526 |
+
if return_empty_tensor:
|
| 527 |
+
torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
|
| 528 |
+
else:
|
| 529 |
+
torch_state_dict[name] = tensor.contiguous()
|
| 530 |
+
return torch_state_dict
|
| 531 |
+
|
| 532 |
+
|
| 533 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
| 534 |
+
tag=None,
|
| 535 |
+
exclude_frozen_parameters=False,
|
| 536 |
+
lazy_mode=False):
|
| 537 |
+
"""
|
| 538 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
| 539 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
| 540 |
+
via a model hub.
|
| 541 |
+
|
| 542 |
+
Args:
|
| 543 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
| 544 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
|
| 545 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
| 546 |
+
- ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
|
| 547 |
+
Convert the pesduo tensor to torch tensor by ``.contiguous()``
|
| 548 |
+
|
| 549 |
+
Returns:
|
| 550 |
+
- pytorch ``state_dict``
|
| 551 |
+
|
| 552 |
+
A typical usage might be ::
|
| 553 |
+
|
| 554 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
| 555 |
+
# do the training and checkpoint saving
|
| 556 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
| 557 |
+
model = model.cpu() # move to cpu
|
| 558 |
+
model.load_state_dict(state_dict)
|
| 559 |
+
# submit to model hub or save the model to share with others
|
| 560 |
+
|
| 561 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
| 562 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 563 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 564 |
+
|
| 565 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
| 566 |
+
|
| 567 |
+
Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
|
| 568 |
+
You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
| 569 |
+
the checkpoint. Or you can load state_dict in lazy mode ::
|
| 570 |
+
|
| 571 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
| 572 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
|
| 573 |
+
for name, lazy_tensor in state_dict.item():
|
| 574 |
+
tensor = lazy_tensor.contiguous() # to cpu
|
| 575 |
+
print(name, tensor)
|
| 576 |
+
# del tensor to release memory if it no longer in use
|
| 577 |
+
"""
|
| 578 |
+
if tag is None:
|
| 579 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
| 580 |
+
if os.path.isfile(latest_path):
|
| 581 |
+
with open(latest_path, 'r') as fd:
|
| 582 |
+
tag = fd.read().strip()
|
| 583 |
+
else:
|
| 584 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
| 585 |
+
|
| 586 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
| 587 |
+
|
| 588 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
| 589 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
| 590 |
+
|
| 591 |
+
state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
|
| 592 |
+
if lazy_mode:
|
| 593 |
+
return state_dict
|
| 594 |
+
else:
|
| 595 |
+
return to_torch_tensor(state_dict)
|
| 596 |
+
|
| 597 |
+
|
| 598 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
|
| 599 |
+
output_dir,
|
| 600 |
+
max_shard_size="5GB",
|
| 601 |
+
safe_serialization=False,
|
| 602 |
+
tag=None,
|
| 603 |
+
exclude_frozen_parameters=False):
|
| 604 |
+
"""
|
| 605 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
| 606 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
| 607 |
+
|
| 608 |
+
Args:
|
| 609 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 610 |
+
- ``output_dir``: directory to the pytorch fp32 state_dict output files
|
| 611 |
+
- ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
|
| 612 |
+
- ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
|
| 613 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
| 614 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
| 615 |
+
"""
|
| 616 |
+
|
| 617 |
+
# Dependency pre-check
|
| 618 |
+
if safe_serialization:
|
| 619 |
+
try:
|
| 620 |
+
from safetensors.torch import save_file
|
| 621 |
+
except ImportError:
|
| 622 |
+
print('If you want to use `safe_serialization`, please `pip install safetensors`')
|
| 623 |
+
raise
|
| 624 |
+
if max_shard_size is not None:
|
| 625 |
+
try:
|
| 626 |
+
from huggingface_hub import split_torch_state_dict_into_shards
|
| 627 |
+
except ImportError:
|
| 628 |
+
print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
|
| 629 |
+
raise
|
| 630 |
+
|
| 631 |
+
# Convert zero checkpoint to state_dict
|
| 632 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
| 633 |
+
tag,
|
| 634 |
+
exclude_frozen_parameters,
|
| 635 |
+
lazy_mode=True)
|
| 636 |
+
|
| 637 |
+
# Shard the model if it is too big.
|
| 638 |
+
weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
|
| 639 |
+
if max_shard_size is not None:
|
| 640 |
+
filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
|
| 641 |
+
# an memory-efficient approach for sharding
|
| 642 |
+
empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
|
| 643 |
+
state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
|
| 644 |
+
filename_pattern=filename_pattern,
|
| 645 |
+
max_shard_size=max_shard_size)
|
| 646 |
+
else:
|
| 647 |
+
from collections import namedtuple
|
| 648 |
+
StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
|
| 649 |
+
state_dict_split = StateDictSplit(is_sharded=False,
|
| 650 |
+
filename_to_tensors={weights_name: list(state_dict.keys())})
|
| 651 |
+
|
| 652 |
+
# Save the model by shard
|
| 653 |
+
os.makedirs(output_dir, exist_ok=True)
|
| 654 |
+
filename_to_tensors = state_dict_split.filename_to_tensors.items()
|
| 655 |
+
for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
|
| 656 |
+
shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
|
| 657 |
+
shard_state_dict = to_torch_tensor(shard_state_dict)
|
| 658 |
+
output_path = os.path.join(output_dir, shard_file)
|
| 659 |
+
if safe_serialization:
|
| 660 |
+
save_file(shard_state_dict, output_path, metadata={"format": "pt"})
|
| 661 |
+
else:
|
| 662 |
+
torch.save(shard_state_dict, output_path)
|
| 663 |
+
# release the memory of current shard
|
| 664 |
+
for tensor_name in list(shard_state_dict.keys()):
|
| 665 |
+
del state_dict[tensor_name]
|
| 666 |
+
del shard_state_dict[tensor_name]
|
| 667 |
+
del shard_state_dict
|
| 668 |
+
gc.collect()
|
| 669 |
+
|
| 670 |
+
# Save index if sharded
|
| 671 |
+
if state_dict_split.is_sharded:
|
| 672 |
+
index = {
|
| 673 |
+
"metadata": state_dict_split.metadata,
|
| 674 |
+
"weight_map": state_dict_split.tensor_to_filename,
|
| 675 |
+
}
|
| 676 |
+
save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
|
| 677 |
+
save_index_file = os.path.join(output_dir, save_index_file)
|
| 678 |
+
with open(save_index_file, "w", encoding="utf-8") as f:
|
| 679 |
+
content = json.dumps(index, indent=2, sort_keys=True) + "\n"
|
| 680 |
+
f.write(content)
|
| 681 |
+
|
| 682 |
+
|
| 683 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
| 684 |
+
"""
|
| 685 |
+
1. Put the provided model to cpu
|
| 686 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
| 687 |
+
3. Load it into the provided model
|
| 688 |
+
|
| 689 |
+
Args:
|
| 690 |
+
- ``model``: the model object to update
|
| 691 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
| 692 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
| 693 |
+
|
| 694 |
+
Returns:
|
| 695 |
+
- ``model`: modified model
|
| 696 |
+
|
| 697 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
| 698 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
| 699 |
+
conveniently placed for you in the checkpoint folder.
|
| 700 |
+
|
| 701 |
+
A typical usage might be ::
|
| 702 |
+
|
| 703 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
| 704 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
| 705 |
+
# submit to model hub or save the model to share with others
|
| 706 |
+
|
| 707 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
| 708 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
| 709 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
| 710 |
+
|
| 711 |
+
"""
|
| 712 |
+
logger.info(f"Extracting fp32 weights")
|
| 713 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
| 714 |
+
|
| 715 |
+
logger.info(f"Overwriting model with fp32 weights")
|
| 716 |
+
model = model.cpu()
|
| 717 |
+
model.load_state_dict(state_dict, strict=False)
|
| 718 |
+
|
| 719 |
+
return model
|
| 720 |
+
|
| 721 |
+
|
| 722 |
+
if __name__ == "__main__":
|
| 723 |
+
parser = argparse.ArgumentParser()
|
| 724 |
+
parser.add_argument("checkpoint_dir",
|
| 725 |
+
type=str,
|
| 726 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
| 727 |
+
parser.add_argument("output_dir",
|
| 728 |
+
type=str,
|
| 729 |
+
help="directory to the pytorch fp32 state_dict output files"
|
| 730 |
+
"(e.g. path/checkpoint-12-output/)")
|
| 731 |
+
parser.add_argument(
|
| 732 |
+
"--max_shard_size",
|
| 733 |
+
type=str,
|
| 734 |
+
default="5GB",
|
| 735 |
+
help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
|
| 736 |
+
"lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
|
| 737 |
+
"We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
|
| 738 |
+
"without CPU OOM issues.")
|
| 739 |
+
parser.add_argument(
|
| 740 |
+
"--safe_serialization",
|
| 741 |
+
default=False,
|
| 742 |
+
action='store_true',
|
| 743 |
+
help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
|
| 744 |
+
parser.add_argument("-t",
|
| 745 |
+
"--tag",
|
| 746 |
+
type=str,
|
| 747 |
+
default=None,
|
| 748 |
+
help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
|
| 749 |
+
parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
|
| 750 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
| 751 |
+
args = parser.parse_args()
|
| 752 |
+
|
| 753 |
+
debug = args.debug
|
| 754 |
+
|
| 755 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
|
| 756 |
+
args.output_dir,
|
| 757 |
+
max_shard_size=args.max_shard_size,
|
| 758 |
+
safe_serialization=args.safe_serialization,
|
| 759 |
+
tag=args.tag,
|
| 760 |
+
exclude_frozen_parameters=args.exclude_frozen_parameters)
|