Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- added_tokens.json +24 -0
- config.json +29 -0
- generation_config.json +14 -0
- latest +1 -0
- merges.txt +0 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +441 -0
- special_tokens_map.json +25 -0
- tokenizer.json +3 -0
- tokenizer_config.json +209 -0
- trainer_state.json +1234 -0
- training_args.bin +3 -0
- vocab.json +0 -0
- 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 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
added_tokens.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</tool_call>": 151658,
|
| 3 |
+
"<tool_call>": 151657,
|
| 4 |
+
"<|box_end|>": 151649,
|
| 5 |
+
"<|box_start|>": 151648,
|
| 6 |
+
"<|endoftext|>": 151643,
|
| 7 |
+
"<|file_sep|>": 151664,
|
| 8 |
+
"<|fim_middle|>": 151660,
|
| 9 |
+
"<|fim_pad|>": 151662,
|
| 10 |
+
"<|fim_prefix|>": 151659,
|
| 11 |
+
"<|fim_suffix|>": 151661,
|
| 12 |
+
"<|im_end|>": 151645,
|
| 13 |
+
"<|im_start|>": 151644,
|
| 14 |
+
"<|image_pad|>": 151655,
|
| 15 |
+
"<|object_ref_end|>": 151647,
|
| 16 |
+
"<|object_ref_start|>": 151646,
|
| 17 |
+
"<|quad_end|>": 151651,
|
| 18 |
+
"<|quad_start|>": 151650,
|
| 19 |
+
"<|repo_name|>": 151663,
|
| 20 |
+
"<|video_pad|>": 151656,
|
| 21 |
+
"<|vision_end|>": 151653,
|
| 22 |
+
"<|vision_pad|>": 151654,
|
| 23 |
+
"<|vision_start|>": 151652
|
| 24 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen2ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_dropout": 0.0,
|
| 6 |
+
"bos_token_id": 151643,
|
| 7 |
+
"eos_token_id": 151645,
|
| 8 |
+
"hidden_act": "silu",
|
| 9 |
+
"hidden_size": 2048,
|
| 10 |
+
"initializer_range": 0.02,
|
| 11 |
+
"intermediate_size": 11008,
|
| 12 |
+
"max_position_embeddings": 32768,
|
| 13 |
+
"max_window_layers": 70,
|
| 14 |
+
"model_type": "qwen2",
|
| 15 |
+
"num_attention_heads": 16,
|
| 16 |
+
"num_hidden_layers": 36,
|
| 17 |
+
"num_key_value_heads": 2,
|
| 18 |
+
"pad_token_id": 151645,
|
| 19 |
+
"rms_norm_eps": 1e-06,
|
| 20 |
+
"rope_scaling": null,
|
| 21 |
+
"rope_theta": 1000000.0,
|
| 22 |
+
"sliding_window": 32768,
|
| 23 |
+
"tie_word_embeddings": true,
|
| 24 |
+
"torch_dtype": "bfloat16",
|
| 25 |
+
"transformers_version": "4.50.0",
|
| 26 |
+
"use_cache": false,
|
| 27 |
+
"use_sliding_window": false,
|
| 28 |
+
"vocab_size": 151936
|
| 29 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 151643,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
151645,
|
| 6 |
+
151643
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 151643,
|
| 9 |
+
"repetition_penalty": 1.05,
|
| 10 |
+
"temperature": 0.7,
|
| 11 |
+
"top_k": 20,
|
| 12 |
+
"top_p": 0.8,
|
| 13 |
+
"transformers_version": "4.50.0"
|
| 14 |
+
}
|
latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step80
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1702601012dad800407aa403642cc2b2930b6671bf651b43aa71dfd728a62aa7
|
| 3 |
+
size 4957560304
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77f780a78677484b2dc2a7043dc00b2bbcad3e27d890eda7b6f324bbed23e581
|
| 3 |
+
size 1214366696
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,441 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 6171877376
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
| 7 |
+
"model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 8 |
+
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 9 |
+
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 10 |
+
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 11 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 12 |
+
"model.layers.0.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 13 |
+
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 14 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 15 |
+
"model.layers.0.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 16 |
+
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 17 |
+
"model.layers.0.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 18 |
+
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 19 |
+
"model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 20 |
+
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 21 |
+
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 22 |
+
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 23 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 24 |
+
"model.layers.1.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 25 |
+
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 26 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 27 |
+
"model.layers.1.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 28 |
+
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 29 |
+
"model.layers.1.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 30 |
+
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 31 |
+
"model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 32 |
+
"model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 33 |
+
"model.layers.10.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 34 |
+
"model.layers.10.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 35 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 36 |
+
"model.layers.10.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 37 |
+
"model.layers.10.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 38 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 39 |
+
"model.layers.10.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 40 |
+
"model.layers.10.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 41 |
+
"model.layers.10.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 42 |
+
"model.layers.10.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 43 |
+
"model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 44 |
+
"model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 45 |
+
"model.layers.11.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 46 |
+
"model.layers.11.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 47 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 48 |
+
"model.layers.11.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 49 |
+
"model.layers.11.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 50 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 51 |
+
"model.layers.11.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 52 |
+
"model.layers.11.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 53 |
+
"model.layers.11.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 54 |
+
"model.layers.11.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 55 |
+
"model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 56 |
+
"model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 57 |
+
"model.layers.12.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 58 |
+
"model.layers.12.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 59 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 60 |
+
"model.layers.12.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 61 |
+
"model.layers.12.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 62 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 63 |
+
"model.layers.12.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 64 |
+
"model.layers.12.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 65 |
+
"model.layers.12.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 66 |
+
"model.layers.12.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 67 |
+
"model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 68 |
+
"model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 69 |
+
"model.layers.13.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 70 |
+
"model.layers.13.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 71 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 72 |
+
"model.layers.13.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 73 |
+
"model.layers.13.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 74 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 75 |
+
"model.layers.13.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 76 |
+
"model.layers.13.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 77 |
+
"model.layers.13.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 78 |
+
"model.layers.13.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 79 |
+
"model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 80 |
+
"model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 81 |
+
"model.layers.14.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 82 |
+
"model.layers.14.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 83 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 84 |
+
"model.layers.14.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 85 |
+
"model.layers.14.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 86 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 87 |
+
"model.layers.14.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 88 |
+
"model.layers.14.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 89 |
+
"model.layers.14.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 90 |
+
"model.layers.14.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 91 |
+
"model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 92 |
+
"model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 93 |
+
"model.layers.15.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 94 |
+
"model.layers.15.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 95 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 96 |
+
"model.layers.15.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 97 |
+
"model.layers.15.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 98 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 99 |
+
"model.layers.15.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 100 |
+
"model.layers.15.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 101 |
+
"model.layers.15.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 102 |
+
"model.layers.15.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 103 |
+
"model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 104 |
+
"model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 105 |
+
"model.layers.16.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 106 |
+
"model.layers.16.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 107 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 108 |
+
"model.layers.16.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 109 |
+
"model.layers.16.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 110 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 111 |
+
"model.layers.16.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 112 |
+
"model.layers.16.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 113 |
+
"model.layers.16.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 114 |
+
"model.layers.16.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 115 |
+
"model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 116 |
+
"model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 117 |
+
"model.layers.17.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 118 |
+
"model.layers.17.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 119 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 120 |
+
"model.layers.17.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 121 |
+
"model.layers.17.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 122 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 123 |
+
"model.layers.17.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 124 |
+
"model.layers.17.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 125 |
+
"model.layers.17.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 126 |
+
"model.layers.17.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 127 |
+
"model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 128 |
+
"model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 129 |
+
"model.layers.18.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 130 |
+
"model.layers.18.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 131 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 132 |
+
"model.layers.18.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 133 |
+
"model.layers.18.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 134 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 135 |
+
"model.layers.18.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 136 |
+
"model.layers.18.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 137 |
+
"model.layers.18.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 138 |
+
"model.layers.18.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 139 |
+
"model.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 140 |
+
"model.layers.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 141 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 142 |
+
"model.layers.19.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 143 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 144 |
+
"model.layers.19.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 145 |
+
"model.layers.19.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 146 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 147 |
+
"model.layers.19.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 148 |
+
"model.layers.19.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 149 |
+
"model.layers.19.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 150 |
+
"model.layers.19.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 151 |
+
"model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 152 |
+
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 153 |
+
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 154 |
+
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 155 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 156 |
+
"model.layers.2.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 157 |
+
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 158 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 159 |
+
"model.layers.2.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 160 |
+
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 161 |
+
"model.layers.2.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 162 |
+
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 163 |
+
"model.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 164 |
+
"model.layers.20.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 165 |
+
"model.layers.20.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 166 |
+
"model.layers.20.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 167 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 168 |
+
"model.layers.20.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 169 |
+
"model.layers.20.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 170 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 171 |
+
"model.layers.20.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 172 |
+
"model.layers.20.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 173 |
+
"model.layers.20.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 174 |
+
"model.layers.20.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 175 |
+
"model.layers.21.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 176 |
+
"model.layers.21.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 177 |
+
"model.layers.21.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 178 |
+
"model.layers.21.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 179 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 180 |
+
"model.layers.21.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 181 |
+
"model.layers.21.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 182 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 183 |
+
"model.layers.21.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 184 |
+
"model.layers.21.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 185 |
+
"model.layers.21.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 186 |
+
"model.layers.21.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 187 |
+
"model.layers.22.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 188 |
+
"model.layers.22.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 189 |
+
"model.layers.22.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 190 |
+
"model.layers.22.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 191 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 192 |
+
"model.layers.22.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 193 |
+
"model.layers.22.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 194 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 195 |
+
"model.layers.22.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 196 |
+
"model.layers.22.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 197 |
+
"model.layers.22.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 198 |
+
"model.layers.22.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 199 |
+
"model.layers.23.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 200 |
+
"model.layers.23.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 201 |
+
"model.layers.23.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 202 |
+
"model.layers.23.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 203 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 204 |
+
"model.layers.23.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 205 |
+
"model.layers.23.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 206 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 207 |
+
"model.layers.23.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 208 |
+
"model.layers.23.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 209 |
+
"model.layers.23.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 210 |
+
"model.layers.23.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 211 |
+
"model.layers.24.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 212 |
+
"model.layers.24.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 213 |
+
"model.layers.24.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 214 |
+
"model.layers.24.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 215 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 216 |
+
"model.layers.24.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 217 |
+
"model.layers.24.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 218 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 219 |
+
"model.layers.24.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 220 |
+
"model.layers.24.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 221 |
+
"model.layers.24.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 222 |
+
"model.layers.24.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 223 |
+
"model.layers.25.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 224 |
+
"model.layers.25.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 225 |
+
"model.layers.25.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 226 |
+
"model.layers.25.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 227 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 228 |
+
"model.layers.25.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 229 |
+
"model.layers.25.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 230 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 231 |
+
"model.layers.25.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 232 |
+
"model.layers.25.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 233 |
+
"model.layers.25.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 234 |
+
"model.layers.25.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 235 |
+
"model.layers.26.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 236 |
+
"model.layers.26.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 237 |
+
"model.layers.26.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 238 |
+
"model.layers.26.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 239 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 240 |
+
"model.layers.26.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 241 |
+
"model.layers.26.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 242 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 243 |
+
"model.layers.26.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 244 |
+
"model.layers.26.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 245 |
+
"model.layers.26.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 246 |
+
"model.layers.26.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 247 |
+
"model.layers.27.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 248 |
+
"model.layers.27.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 249 |
+
"model.layers.27.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 250 |
+
"model.layers.27.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 251 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 252 |
+
"model.layers.27.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 253 |
+
"model.layers.27.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 254 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 255 |
+
"model.layers.27.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 256 |
+
"model.layers.27.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 257 |
+
"model.layers.27.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 258 |
+
"model.layers.27.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 259 |
+
"model.layers.28.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 260 |
+
"model.layers.28.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 261 |
+
"model.layers.28.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 262 |
+
"model.layers.28.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 263 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 264 |
+
"model.layers.28.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 265 |
+
"model.layers.28.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 266 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 267 |
+
"model.layers.28.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 268 |
+
"model.layers.28.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 269 |
+
"model.layers.28.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 270 |
+
"model.layers.28.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 271 |
+
"model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 272 |
+
"model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 273 |
+
"model.layers.29.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 274 |
+
"model.layers.29.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 275 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 276 |
+
"model.layers.29.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 277 |
+
"model.layers.29.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 278 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 279 |
+
"model.layers.29.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 280 |
+
"model.layers.29.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 281 |
+
"model.layers.29.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 282 |
+
"model.layers.29.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 283 |
+
"model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 284 |
+
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 285 |
+
"model.layers.3.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 286 |
+
"model.layers.3.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 287 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 288 |
+
"model.layers.3.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 289 |
+
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 290 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 291 |
+
"model.layers.3.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 292 |
+
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 293 |
+
"model.layers.3.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 294 |
+
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 295 |
+
"model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 296 |
+
"model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 297 |
+
"model.layers.30.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 298 |
+
"model.layers.30.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 299 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 300 |
+
"model.layers.30.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 301 |
+
"model.layers.30.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 302 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 303 |
+
"model.layers.30.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 304 |
+
"model.layers.30.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 305 |
+
"model.layers.30.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 306 |
+
"model.layers.30.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 307 |
+
"model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 308 |
+
"model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 309 |
+
"model.layers.31.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 310 |
+
"model.layers.31.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 311 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 312 |
+
"model.layers.31.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 313 |
+
"model.layers.31.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 314 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 315 |
+
"model.layers.31.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 316 |
+
"model.layers.31.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 317 |
+
"model.layers.31.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 318 |
+
"model.layers.31.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 319 |
+
"model.layers.32.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 320 |
+
"model.layers.32.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 321 |
+
"model.layers.32.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 322 |
+
"model.layers.32.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 323 |
+
"model.layers.32.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 324 |
+
"model.layers.32.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 325 |
+
"model.layers.32.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 326 |
+
"model.layers.32.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 327 |
+
"model.layers.32.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 328 |
+
"model.layers.32.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 329 |
+
"model.layers.32.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 330 |
+
"model.layers.32.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 331 |
+
"model.layers.33.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 332 |
+
"model.layers.33.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 333 |
+
"model.layers.33.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 334 |
+
"model.layers.33.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 335 |
+
"model.layers.33.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 336 |
+
"model.layers.33.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 337 |
+
"model.layers.33.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 338 |
+
"model.layers.33.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 339 |
+
"model.layers.33.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 340 |
+
"model.layers.33.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 341 |
+
"model.layers.33.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 342 |
+
"model.layers.33.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 343 |
+
"model.layers.34.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 344 |
+
"model.layers.34.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 345 |
+
"model.layers.34.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 346 |
+
"model.layers.34.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 347 |
+
"model.layers.34.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 348 |
+
"model.layers.34.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 349 |
+
"model.layers.34.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 350 |
+
"model.layers.34.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 351 |
+
"model.layers.34.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 352 |
+
"model.layers.34.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 353 |
+
"model.layers.34.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 354 |
+
"model.layers.34.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 355 |
+
"model.layers.35.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 356 |
+
"model.layers.35.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 357 |
+
"model.layers.35.mlp.gate_proj.weight": "model-00002-of-00002.safetensors",
|
| 358 |
+
"model.layers.35.mlp.up_proj.weight": "model-00002-of-00002.safetensors",
|
| 359 |
+
"model.layers.35.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 360 |
+
"model.layers.35.self_attn.k_proj.bias": "model-00002-of-00002.safetensors",
|
| 361 |
+
"model.layers.35.self_attn.k_proj.weight": "model-00002-of-00002.safetensors",
|
| 362 |
+
"model.layers.35.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 363 |
+
"model.layers.35.self_attn.q_proj.bias": "model-00002-of-00002.safetensors",
|
| 364 |
+
"model.layers.35.self_attn.q_proj.weight": "model-00002-of-00002.safetensors",
|
| 365 |
+
"model.layers.35.self_attn.v_proj.bias": "model-00002-of-00002.safetensors",
|
| 366 |
+
"model.layers.35.self_attn.v_proj.weight": "model-00002-of-00002.safetensors",
|
| 367 |
+
"model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 368 |
+
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 369 |
+
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 370 |
+
"model.layers.4.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 371 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 372 |
+
"model.layers.4.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 373 |
+
"model.layers.4.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 374 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 375 |
+
"model.layers.4.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 376 |
+
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 377 |
+
"model.layers.4.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 378 |
+
"model.layers.4.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 379 |
+
"model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 380 |
+
"model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 381 |
+
"model.layers.5.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 382 |
+
"model.layers.5.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 383 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 384 |
+
"model.layers.5.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 385 |
+
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 386 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 387 |
+
"model.layers.5.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 388 |
+
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 389 |
+
"model.layers.5.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 390 |
+
"model.layers.5.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 391 |
+
"model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 392 |
+
"model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 393 |
+
"model.layers.6.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 394 |
+
"model.layers.6.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 395 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 396 |
+
"model.layers.6.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 397 |
+
"model.layers.6.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 398 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 399 |
+
"model.layers.6.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 400 |
+
"model.layers.6.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 401 |
+
"model.layers.6.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 402 |
+
"model.layers.6.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 403 |
+
"model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 404 |
+
"model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 405 |
+
"model.layers.7.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 406 |
+
"model.layers.7.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 407 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 408 |
+
"model.layers.7.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 409 |
+
"model.layers.7.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 410 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 411 |
+
"model.layers.7.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 412 |
+
"model.layers.7.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 413 |
+
"model.layers.7.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 414 |
+
"model.layers.7.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 415 |
+
"model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 416 |
+
"model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 417 |
+
"model.layers.8.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 418 |
+
"model.layers.8.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 419 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 420 |
+
"model.layers.8.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 421 |
+
"model.layers.8.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 422 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 423 |
+
"model.layers.8.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 424 |
+
"model.layers.8.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 425 |
+
"model.layers.8.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 426 |
+
"model.layers.8.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 427 |
+
"model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 428 |
+
"model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 429 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00001-of-00002.safetensors",
|
| 430 |
+
"model.layers.9.mlp.up_proj.weight": "model-00001-of-00002.safetensors",
|
| 431 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 432 |
+
"model.layers.9.self_attn.k_proj.bias": "model-00001-of-00002.safetensors",
|
| 433 |
+
"model.layers.9.self_attn.k_proj.weight": "model-00001-of-00002.safetensors",
|
| 434 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 435 |
+
"model.layers.9.self_attn.q_proj.bias": "model-00001-of-00002.safetensors",
|
| 436 |
+
"model.layers.9.self_attn.q_proj.weight": "model-00001-of-00002.safetensors",
|
| 437 |
+
"model.layers.9.self_attn.v_proj.bias": "model-00001-of-00002.safetensors",
|
| 438 |
+
"model.layers.9.self_attn.v_proj.weight": "model-00001-of-00002.safetensors",
|
| 439 |
+
"model.norm.weight": "model-00002-of-00002.safetensors"
|
| 440 |
+
}
|
| 441 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|im_start|>",
|
| 4 |
+
"<|im_end|>",
|
| 5 |
+
"<|object_ref_start|>",
|
| 6 |
+
"<|object_ref_end|>",
|
| 7 |
+
"<|box_start|>",
|
| 8 |
+
"<|box_end|>",
|
| 9 |
+
"<|quad_start|>",
|
| 10 |
+
"<|quad_end|>",
|
| 11 |
+
"<|vision_start|>",
|
| 12 |
+
"<|vision_end|>",
|
| 13 |
+
"<|vision_pad|>",
|
| 14 |
+
"<|image_pad|>",
|
| 15 |
+
"<|video_pad|>"
|
| 16 |
+
],
|
| 17 |
+
"eos_token": {
|
| 18 |
+
"content": "<|im_end|>",
|
| 19 |
+
"lstrip": false,
|
| 20 |
+
"normalized": false,
|
| 21 |
+
"rstrip": false,
|
| 22 |
+
"single_word": false
|
| 23 |
+
},
|
| 24 |
+
"pad_token": "<|im_end|>"
|
| 25 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:63a2951d5edfa5cc0a2346ef872f8c77a2920274cfc3b503b04e3799104dee80
|
| 3 |
+
size 11422060
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"151644": {
|
| 14 |
+
"content": "<|im_start|>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": false,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"151645": {
|
| 22 |
+
"content": "<|im_end|>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": false,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
},
|
| 29 |
+
"151646": {
|
| 30 |
+
"content": "<|object_ref_start|>",
|
| 31 |
+
"lstrip": false,
|
| 32 |
+
"normalized": false,
|
| 33 |
+
"rstrip": false,
|
| 34 |
+
"single_word": false,
|
| 35 |
+
"special": true
|
| 36 |
+
},
|
| 37 |
+
"151647": {
|
| 38 |
+
"content": "<|object_ref_end|>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false,
|
| 43 |
+
"special": true
|
| 44 |
+
},
|
| 45 |
+
"151648": {
|
| 46 |
+
"content": "<|box_start|>",
|
| 47 |
+
"lstrip": false,
|
| 48 |
+
"normalized": false,
|
| 49 |
+
"rstrip": false,
|
| 50 |
+
"single_word": false,
|
| 51 |
+
"special": true
|
| 52 |
+
},
|
| 53 |
+
"151649": {
|
| 54 |
+
"content": "<|box_end|>",
|
| 55 |
+
"lstrip": false,
|
| 56 |
+
"normalized": false,
|
| 57 |
+
"rstrip": false,
|
| 58 |
+
"single_word": false,
|
| 59 |
+
"special": true
|
| 60 |
+
},
|
| 61 |
+
"151650": {
|
| 62 |
+
"content": "<|quad_start|>",
|
| 63 |
+
"lstrip": false,
|
| 64 |
+
"normalized": false,
|
| 65 |
+
"rstrip": false,
|
| 66 |
+
"single_word": false,
|
| 67 |
+
"special": true
|
| 68 |
+
},
|
| 69 |
+
"151651": {
|
| 70 |
+
"content": "<|quad_end|>",
|
| 71 |
+
"lstrip": false,
|
| 72 |
+
"normalized": false,
|
| 73 |
+
"rstrip": false,
|
| 74 |
+
"single_word": false,
|
| 75 |
+
"special": true
|
| 76 |
+
},
|
| 77 |
+
"151652": {
|
| 78 |
+
"content": "<|vision_start|>",
|
| 79 |
+
"lstrip": false,
|
| 80 |
+
"normalized": false,
|
| 81 |
+
"rstrip": false,
|
| 82 |
+
"single_word": false,
|
| 83 |
+
"special": true
|
| 84 |
+
},
|
| 85 |
+
"151653": {
|
| 86 |
+
"content": "<|vision_end|>",
|
| 87 |
+
"lstrip": false,
|
| 88 |
+
"normalized": false,
|
| 89 |
+
"rstrip": false,
|
| 90 |
+
"single_word": false,
|
| 91 |
+
"special": true
|
| 92 |
+
},
|
| 93 |
+
"151654": {
|
| 94 |
+
"content": "<|vision_pad|>",
|
| 95 |
+
"lstrip": false,
|
| 96 |
+
"normalized": false,
|
| 97 |
+
"rstrip": false,
|
| 98 |
+
"single_word": false,
|
| 99 |
+
"special": true
|
| 100 |
+
},
|
| 101 |
+
"151655": {
|
| 102 |
+
"content": "<|image_pad|>",
|
| 103 |
+
"lstrip": false,
|
| 104 |
+
"normalized": false,
|
| 105 |
+
"rstrip": false,
|
| 106 |
+
"single_word": false,
|
| 107 |
+
"special": true
|
| 108 |
+
},
|
| 109 |
+
"151656": {
|
| 110 |
+
"content": "<|video_pad|>",
|
| 111 |
+
"lstrip": false,
|
| 112 |
+
"normalized": false,
|
| 113 |
+
"rstrip": false,
|
| 114 |
+
"single_word": false,
|
| 115 |
+
"special": true
|
| 116 |
+
},
|
| 117 |
+
"151657": {
|
| 118 |
+
"content": "<tool_call>",
|
| 119 |
+
"lstrip": false,
|
| 120 |
+
"normalized": false,
|
| 121 |
+
"rstrip": false,
|
| 122 |
+
"single_word": false,
|
| 123 |
+
"special": false
|
| 124 |
+
},
|
| 125 |
+
"151658": {
|
| 126 |
+
"content": "</tool_call>",
|
| 127 |
+
"lstrip": false,
|
| 128 |
+
"normalized": false,
|
| 129 |
+
"rstrip": false,
|
| 130 |
+
"single_word": false,
|
| 131 |
+
"special": false
|
| 132 |
+
},
|
| 133 |
+
"151659": {
|
| 134 |
+
"content": "<|fim_prefix|>",
|
| 135 |
+
"lstrip": false,
|
| 136 |
+
"normalized": false,
|
| 137 |
+
"rstrip": false,
|
| 138 |
+
"single_word": false,
|
| 139 |
+
"special": false
|
| 140 |
+
},
|
| 141 |
+
"151660": {
|
| 142 |
+
"content": "<|fim_middle|>",
|
| 143 |
+
"lstrip": false,
|
| 144 |
+
"normalized": false,
|
| 145 |
+
"rstrip": false,
|
| 146 |
+
"single_word": false,
|
| 147 |
+
"special": false
|
| 148 |
+
},
|
| 149 |
+
"151661": {
|
| 150 |
+
"content": "<|fim_suffix|>",
|
| 151 |
+
"lstrip": false,
|
| 152 |
+
"normalized": false,
|
| 153 |
+
"rstrip": false,
|
| 154 |
+
"single_word": false,
|
| 155 |
+
"special": false
|
| 156 |
+
},
|
| 157 |
+
"151662": {
|
| 158 |
+
"content": "<|fim_pad|>",
|
| 159 |
+
"lstrip": false,
|
| 160 |
+
"normalized": false,
|
| 161 |
+
"rstrip": false,
|
| 162 |
+
"single_word": false,
|
| 163 |
+
"special": false
|
| 164 |
+
},
|
| 165 |
+
"151663": {
|
| 166 |
+
"content": "<|repo_name|>",
|
| 167 |
+
"lstrip": false,
|
| 168 |
+
"normalized": false,
|
| 169 |
+
"rstrip": false,
|
| 170 |
+
"single_word": false,
|
| 171 |
+
"special": false
|
| 172 |
+
},
|
| 173 |
+
"151664": {
|
| 174 |
+
"content": "<|file_sep|>",
|
| 175 |
+
"lstrip": false,
|
| 176 |
+
"normalized": false,
|
| 177 |
+
"rstrip": false,
|
| 178 |
+
"single_word": false,
|
| 179 |
+
"special": false
|
| 180 |
+
}
|
| 181 |
+
},
|
| 182 |
+
"additional_special_tokens": [
|
| 183 |
+
"<|im_start|>",
|
| 184 |
+
"<|im_end|>",
|
| 185 |
+
"<|object_ref_start|>",
|
| 186 |
+
"<|object_ref_end|>",
|
| 187 |
+
"<|box_start|>",
|
| 188 |
+
"<|box_end|>",
|
| 189 |
+
"<|quad_start|>",
|
| 190 |
+
"<|quad_end|>",
|
| 191 |
+
"<|vision_start|>",
|
| 192 |
+
"<|vision_end|>",
|
| 193 |
+
"<|vision_pad|>",
|
| 194 |
+
"<|image_pad|>",
|
| 195 |
+
"<|video_pad|>"
|
| 196 |
+
],
|
| 197 |
+
"bos_token": null,
|
| 198 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 199 |
+
"clean_up_tokenization_spaces": false,
|
| 200 |
+
"eos_token": "<|im_end|>",
|
| 201 |
+
"errors": "replace",
|
| 202 |
+
"extra_special_tokens": {},
|
| 203 |
+
"model_max_length": 131072,
|
| 204 |
+
"pad_token": "<|im_end|>",
|
| 205 |
+
"padding_side": "right",
|
| 206 |
+
"split_special_tokens": false,
|
| 207 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 208 |
+
"unk_token": null
|
| 209 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,1234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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| 2 |
+
"best_global_step": null,
|
| 3 |
+
"best_metric": null,
|
| 4 |
+
"best_model_checkpoint": null,
|
| 5 |
+
"epoch": 0.8333333333333334,
|
| 6 |
+
"eval_steps": 500,
|
| 7 |
+
"global_step": 80,
|
| 8 |
+
"is_hyper_param_search": false,
|
| 9 |
+
"is_local_process_zero": true,
|
| 10 |
+
"is_world_process_zero": true,
|
| 11 |
+
"log_history": [
|
| 12 |
+
{
|
| 13 |
+
"clip_ratio": 0.0,
|
| 14 |
+
"completion_length": 153.1875,
|
| 15 |
+
"epoch": 0.010416666666666666,
|
| 16 |
+
"grad_norm": 2.2964696301344203,
|
| 17 |
+
"kl": 0.0008754730224609375,
|
| 18 |
+
"learning_rate": 1e-06,
|
| 19 |
+
"loss": -0.0104,
|
| 20 |
+
"num_tokens": 44706.0,
|
| 21 |
+
"reward": 0.46666670590639114,
|
| 22 |
+
"reward_std": 0.7099685594439507,
|
| 23 |
+
"rewards/warm_up_reward/mean": 0.3888888955116272,
|
| 24 |
+
"rewards/warm_up_reward/std": 0.7168056517839432,
|
| 25 |
+
"step": 1
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
"clip_ratio": 0.0,
|
| 29 |
+
"completion_length": 147.95833587646484,
|
| 30 |
+
"epoch": 0.020833333333333332,
|
| 31 |
+
"grad_norm": 2.332332033549255,
|
| 32 |
+
"kl": 0.0011844635009765625,
|
| 33 |
+
"learning_rate": 1e-06,
|
| 34 |
+
"loss": 0.0071,
|
| 35 |
+
"num_tokens": 88904.0,
|
| 36 |
+
"reward": 0.5250000506639481,
|
| 37 |
+
"reward_std": 0.748512014746666,
|
| 38 |
+
"rewards/warm_up_reward/mean": 0.4375,
|
| 39 |
+
"rewards/warm_up_reward/std": 0.6997176110744476,
|
| 40 |
+
"step": 2
|
| 41 |
+
},
|
| 42 |
+
{
|
| 43 |
+
"clip_ratio": 0.0,
|
| 44 |
+
"completion_length": 154.00000381469727,
|
| 45 |
+
"epoch": 0.03125,
|
| 46 |
+
"grad_norm": 2.04671487874671,
|
| 47 |
+
"kl": 0.0013523101806640625,
|
| 48 |
+
"learning_rate": 1e-06,
|
| 49 |
+
"loss": 0.0124,
|
| 50 |
+
"num_tokens": 133634.0,
|
| 51 |
+
"reward": 0.500000037252903,
|
| 52 |
+
"reward_std": 0.667382538318634,
|
| 53 |
+
"rewards/warm_up_reward/mean": 0.416666679084301,
|
| 54 |
+
"rewards/warm_up_reward/std": 0.7197580486536026,
|
| 55 |
+
"step": 3
|
| 56 |
+
},
|
| 57 |
+
{
|
| 58 |
+
"clip_ratio": 0.0,
|
| 59 |
+
"completion_length": 151.69792556762695,
|
| 60 |
+
"epoch": 0.041666666666666664,
|
| 61 |
+
"grad_norm": 2.2153093232246226,
|
| 62 |
+
"kl": 0.00243377685546875,
|
| 63 |
+
"learning_rate": 1e-06,
|
| 64 |
+
"loss": 0.0232,
|
| 65 |
+
"num_tokens": 178089.0,
|
| 66 |
+
"reward": 0.43125002086162567,
|
| 67 |
+
"reward_std": 0.662388876080513,
|
| 68 |
+
"rewards/warm_up_reward/mean": 0.359375,
|
| 69 |
+
"rewards/warm_up_reward/std": 0.6697845309972763,
|
| 70 |
+
"step": 4
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"clip_ratio": 0.0,
|
| 74 |
+
"completion_length": 148.84375762939453,
|
| 75 |
+
"epoch": 0.052083333333333336,
|
| 76 |
+
"grad_norm": 2.4723944423129782,
|
| 77 |
+
"kl": 0.004669189453125,
|
| 78 |
+
"learning_rate": 1e-06,
|
| 79 |
+
"loss": 0.0002,
|
| 80 |
+
"num_tokens": 222360.0,
|
| 81 |
+
"reward": 0.6250000596046448,
|
| 82 |
+
"reward_std": 0.8341160118579865,
|
| 83 |
+
"rewards/warm_up_reward/mean": 0.5208333358168602,
|
| 84 |
+
"rewards/warm_up_reward/std": 0.7749323397874832,
|
| 85 |
+
"step": 5
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
"clip_ratio": 0.0,
|
| 89 |
+
"completion_length": 147.4791717529297,
|
| 90 |
+
"epoch": 0.0625,
|
| 91 |
+
"grad_norm": 2.452268566541841,
|
| 92 |
+
"kl": 0.00980377197265625,
|
| 93 |
+
"learning_rate": 1e-06,
|
| 94 |
+
"loss": 0.05,
|
| 95 |
+
"num_tokens": 266434.0,
|
| 96 |
+
"reward": 0.5625000298023224,
|
| 97 |
+
"reward_std": 0.8674589395523071,
|
| 98 |
+
"rewards/warm_up_reward/mean": 0.46875,
|
| 99 |
+
"rewards/warm_up_reward/std": 0.7468476742506027,
|
| 100 |
+
"step": 6
|
| 101 |
+
},
|
| 102 |
+
{
|
| 103 |
+
"clip_ratio": 0.0,
|
| 104 |
+
"completion_length": 147.79166793823242,
|
| 105 |
+
"epoch": 0.07291666666666667,
|
| 106 |
+
"grad_norm": 55.84129867431237,
|
| 107 |
+
"kl": 0.194091796875,
|
| 108 |
+
"learning_rate": 1e-06,
|
| 109 |
+
"loss": 0.0511,
|
| 110 |
+
"num_tokens": 310532.0,
|
| 111 |
+
"reward": 0.9333333820104599,
|
| 112 |
+
"reward_std": 0.9551109671592712,
|
| 113 |
+
"rewards/warm_up_reward/mean": 0.7777777910232544,
|
| 114 |
+
"rewards/warm_up_reward/std": 0.8151216059923172,
|
| 115 |
+
"step": 7
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"clip_ratio": 0.0,
|
| 119 |
+
"completion_length": 157.65625381469727,
|
| 120 |
+
"epoch": 0.08333333333333333,
|
| 121 |
+
"grad_norm": 29.072228981795064,
|
| 122 |
+
"kl": 0.1204376220703125,
|
| 123 |
+
"learning_rate": 1e-06,
|
| 124 |
+
"loss": 0.0653,
|
| 125 |
+
"num_tokens": 355673.0,
|
| 126 |
+
"reward": 0.8281250894069672,
|
| 127 |
+
"reward_std": 0.9019797444343567,
|
| 128 |
+
"rewards/warm_up_reward/mean": 0.6901041716337204,
|
| 129 |
+
"rewards/warm_up_reward/std": 0.800490528345108,
|
| 130 |
+
"step": 8
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"clip_ratio": 0.0,
|
| 134 |
+
"completion_length": 147.62500381469727,
|
| 135 |
+
"epoch": 0.09375,
|
| 136 |
+
"grad_norm": 6.698990666563141,
|
| 137 |
+
"kl": 0.04058837890625,
|
| 138 |
+
"learning_rate": 1e-06,
|
| 139 |
+
"loss": 0.0742,
|
| 140 |
+
"num_tokens": 399929.0,
|
| 141 |
+
"reward": 0.6916667073965073,
|
| 142 |
+
"reward_std": 0.7857400476932526,
|
| 143 |
+
"rewards/warm_up_reward/mean": 0.5763888955116272,
|
| 144 |
+
"rewards/warm_up_reward/std": 0.7836765646934509,
|
| 145 |
+
"step": 9
|
| 146 |
+
},
|
| 147 |
+
{
|
| 148 |
+
"clip_ratio": 0.0,
|
| 149 |
+
"completion_length": 150.2291717529297,
|
| 150 |
+
"epoch": 0.10416666666666667,
|
| 151 |
+
"grad_norm": 5.758187436239667,
|
| 152 |
+
"kl": 0.1109619140625,
|
| 153 |
+
"learning_rate": 1e-06,
|
| 154 |
+
"loss": 0.0303,
|
| 155 |
+
"num_tokens": 444279.0,
|
| 156 |
+
"reward": 0.9000000357627869,
|
| 157 |
+
"reward_std": 0.9381224364042282,
|
| 158 |
+
"rewards/warm_up_reward/mean": 0.75,
|
| 159 |
+
"rewards/warm_up_reward/std": 0.820982426404953,
|
| 160 |
+
"step": 10
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"clip_ratio": 0.0,
|
| 164 |
+
"completion_length": 150.67708587646484,
|
| 165 |
+
"epoch": 0.11458333333333333,
|
| 166 |
+
"grad_norm": 24.363046434997802,
|
| 167 |
+
"kl": 0.2352294921875,
|
| 168 |
+
"learning_rate": 1e-06,
|
| 169 |
+
"loss": 0.0567,
|
| 170 |
+
"num_tokens": 488708.0,
|
| 171 |
+
"reward": 0.8645834177732468,
|
| 172 |
+
"reward_std": 0.9693308770656586,
|
| 173 |
+
"rewards/warm_up_reward/mean": 0.720486119389534,
|
| 174 |
+
"rewards/warm_up_reward/std": 0.8197668194770813,
|
| 175 |
+
"step": 11
|
| 176 |
+
},
|
| 177 |
+
{
|
| 178 |
+
"clip_ratio": 0.0,
|
| 179 |
+
"completion_length": 155.2916717529297,
|
| 180 |
+
"epoch": 0.125,
|
| 181 |
+
"grad_norm": 3.1714199544174053,
|
| 182 |
+
"kl": 0.08984375,
|
| 183 |
+
"learning_rate": 1e-06,
|
| 184 |
+
"loss": 0.0481,
|
| 185 |
+
"num_tokens": 533526.0,
|
| 186 |
+
"reward": 1.0781250596046448,
|
| 187 |
+
"reward_std": 0.9790745824575424,
|
| 188 |
+
"rewards/warm_up_reward/mean": 0.8984375,
|
| 189 |
+
"rewards/warm_up_reward/std": 0.8148495256900787,
|
| 190 |
+
"step": 12
|
| 191 |
+
},
|
| 192 |
+
{
|
| 193 |
+
"clip_ratio": 0.0,
|
| 194 |
+
"completion_length": 140.2395896911621,
|
| 195 |
+
"epoch": 0.13541666666666666,
|
| 196 |
+
"grad_norm": 5.687529927842251,
|
| 197 |
+
"kl": 0.12872314453125,
|
| 198 |
+
"learning_rate": 1e-06,
|
| 199 |
+
"loss": 0.0633,
|
| 200 |
+
"num_tokens": 576965.0,
|
| 201 |
+
"reward": 0.9635417610406876,
|
| 202 |
+
"reward_std": 0.9496043026447296,
|
| 203 |
+
"rewards/warm_up_reward/mean": 0.802951380610466,
|
| 204 |
+
"rewards/warm_up_reward/std": 0.7969174236059189,
|
| 205 |
+
"step": 13
|
| 206 |
+
},
|
| 207 |
+
{
|
| 208 |
+
"clip_ratio": 0.0,
|
| 209 |
+
"completion_length": 137.87500762939453,
|
| 210 |
+
"epoch": 0.14583333333333334,
|
| 211 |
+
"grad_norm": 4.785248899065895,
|
| 212 |
+
"kl": 0.09088134765625,
|
| 213 |
+
"learning_rate": 1e-06,
|
| 214 |
+
"loss": 0.0956,
|
| 215 |
+
"num_tokens": 620003.0,
|
| 216 |
+
"reward": 0.8687500655651093,
|
| 217 |
+
"reward_std": 0.8496406525373459,
|
| 218 |
+
"rewards/warm_up_reward/mean": 0.7239583283662796,
|
| 219 |
+
"rewards/warm_up_reward/std": 0.7836050242185593,
|
| 220 |
+
"step": 14
|
| 221 |
+
},
|
| 222 |
+
{
|
| 223 |
+
"clip_ratio": 0.0,
|
| 224 |
+
"completion_length": 140.87500381469727,
|
| 225 |
+
"epoch": 0.15625,
|
| 226 |
+
"grad_norm": 3.043938278706536,
|
| 227 |
+
"kl": 0.06243896484375,
|
| 228 |
+
"learning_rate": 1e-06,
|
| 229 |
+
"loss": 0.048,
|
| 230 |
+
"num_tokens": 663347.0,
|
| 231 |
+
"reward": 0.8843750804662704,
|
| 232 |
+
"reward_std": 0.9135490357875824,
|
| 233 |
+
"rewards/warm_up_reward/mean": 0.7369791716337204,
|
| 234 |
+
"rewards/warm_up_reward/std": 0.8226732462644577,
|
| 235 |
+
"step": 15
|
| 236 |
+
},
|
| 237 |
+
{
|
| 238 |
+
"clip_ratio": 0.0,
|
| 239 |
+
"completion_length": 145.0833396911621,
|
| 240 |
+
"epoch": 0.16666666666666666,
|
| 241 |
+
"grad_norm": 4.964409464782977,
|
| 242 |
+
"kl": 0.0794677734375,
|
| 243 |
+
"learning_rate": 1e-06,
|
| 244 |
+
"loss": 0.0574,
|
| 245 |
+
"num_tokens": 707341.0,
|
| 246 |
+
"reward": 0.9437500536441803,
|
| 247 |
+
"reward_std": 0.8649309277534485,
|
| 248 |
+
"rewards/warm_up_reward/mean": 0.7864583283662796,
|
| 249 |
+
"rewards/warm_up_reward/std": 0.795333594083786,
|
| 250 |
+
"step": 16
|
| 251 |
+
},
|
| 252 |
+
{
|
| 253 |
+
"clip_ratio": 0.0,
|
| 254 |
+
"completion_length": 143.76041793823242,
|
| 255 |
+
"epoch": 0.17708333333333334,
|
| 256 |
+
"grad_norm": 2.5933725635254965,
|
| 257 |
+
"kl": 0.0601806640625,
|
| 258 |
+
"learning_rate": 1e-06,
|
| 259 |
+
"loss": 0.0293,
|
| 260 |
+
"num_tokens": 751028.0,
|
| 261 |
+
"reward": 0.7000000327825546,
|
| 262 |
+
"reward_std": 0.9639299660921097,
|
| 263 |
+
"rewards/warm_up_reward/mean": 0.5833333283662796,
|
| 264 |
+
"rewards/warm_up_reward/std": 0.7868598401546478,
|
| 265 |
+
"step": 17
|
| 266 |
+
},
|
| 267 |
+
{
|
| 268 |
+
"clip_ratio": 0.0,
|
| 269 |
+
"completion_length": 140.90625381469727,
|
| 270 |
+
"epoch": 0.1875,
|
| 271 |
+
"grad_norm": 2.560263758795748,
|
| 272 |
+
"kl": 0.0513916015625,
|
| 273 |
+
"learning_rate": 1e-06,
|
| 274 |
+
"loss": 0.0333,
|
| 275 |
+
"num_tokens": 794597.0,
|
| 276 |
+
"reward": 0.947916716337204,
|
| 277 |
+
"reward_std": 0.9378172904253006,
|
| 278 |
+
"rewards/warm_up_reward/mean": 0.7899305373430252,
|
| 279 |
+
"rewards/warm_up_reward/std": 0.8166805952787399,
|
| 280 |
+
"step": 18
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"clip_ratio": 0.0,
|
| 284 |
+
"completion_length": 134.42708587646484,
|
| 285 |
+
"epoch": 0.19791666666666666,
|
| 286 |
+
"grad_norm": 2.827678010439988,
|
| 287 |
+
"kl": 0.05694580078125,
|
| 288 |
+
"learning_rate": 1e-06,
|
| 289 |
+
"loss": 0.0819,
|
| 290 |
+
"num_tokens": 837364.0,
|
| 291 |
+
"reward": 0.9250000715255737,
|
| 292 |
+
"reward_std": 0.9560818523168564,
|
| 293 |
+
"rewards/warm_up_reward/mean": 0.7708333283662796,
|
| 294 |
+
"rewards/warm_up_reward/std": 0.8091117739677429,
|
| 295 |
+
"step": 19
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"clip_ratio": 0.0,
|
| 299 |
+
"completion_length": 137.16666793823242,
|
| 300 |
+
"epoch": 0.20833333333333334,
|
| 301 |
+
"grad_norm": 2.92256682920272,
|
| 302 |
+
"kl": 0.05963134765625,
|
| 303 |
+
"learning_rate": 1e-06,
|
| 304 |
+
"loss": 0.0522,
|
| 305 |
+
"num_tokens": 880442.0,
|
| 306 |
+
"reward": 0.9791667610406876,
|
| 307 |
+
"reward_std": 0.9076904356479645,
|
| 308 |
+
"rewards/warm_up_reward/mean": 0.8159722089767456,
|
| 309 |
+
"rewards/warm_up_reward/std": 0.8102934062480927,
|
| 310 |
+
"step": 20
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"clip_ratio": 0.0,
|
| 314 |
+
"completion_length": 137.84375381469727,
|
| 315 |
+
"epoch": 0.21875,
|
| 316 |
+
"grad_norm": 2.864931852177023,
|
| 317 |
+
"kl": 0.04974365234375,
|
| 318 |
+
"learning_rate": 1e-06,
|
| 319 |
+
"loss": 0.0248,
|
| 320 |
+
"num_tokens": 923615.0,
|
| 321 |
+
"reward": 0.9281250536441803,
|
| 322 |
+
"reward_std": 0.9918985664844513,
|
| 323 |
+
"rewards/warm_up_reward/mean": 0.7734375,
|
| 324 |
+
"rewards/warm_up_reward/std": 0.8185379058122635,
|
| 325 |
+
"step": 21
|
| 326 |
+
},
|
| 327 |
+
{
|
| 328 |
+
"clip_ratio": 0.0,
|
| 329 |
+
"completion_length": 130.8750057220459,
|
| 330 |
+
"epoch": 0.22916666666666666,
|
| 331 |
+
"grad_norm": 2.8348309851740456,
|
| 332 |
+
"kl": 0.05242919921875,
|
| 333 |
+
"learning_rate": 1e-06,
|
| 334 |
+
"loss": 0.0427,
|
| 335 |
+
"num_tokens": 966107.0,
|
| 336 |
+
"reward": 1.0531250834465027,
|
| 337 |
+
"reward_std": 0.9989801347255707,
|
| 338 |
+
"rewards/warm_up_reward/mean": 0.8776041567325592,
|
| 339 |
+
"rewards/warm_up_reward/std": 0.8102044314146042,
|
| 340 |
+
"step": 22
|
| 341 |
+
},
|
| 342 |
+
{
|
| 343 |
+
"clip_ratio": 0.0,
|
| 344 |
+
"completion_length": 144.26041793823242,
|
| 345 |
+
"epoch": 0.23958333333333334,
|
| 346 |
+
"grad_norm": 2.6071380741149004,
|
| 347 |
+
"kl": 0.06549072265625,
|
| 348 |
+
"learning_rate": 1e-06,
|
| 349 |
+
"loss": 0.0523,
|
| 350 |
+
"num_tokens": 1009998.0,
|
| 351 |
+
"reward": 0.9625000357627869,
|
| 352 |
+
"reward_std": 0.9378929734230042,
|
| 353 |
+
"rewards/warm_up_reward/mean": 0.8020833432674408,
|
| 354 |
+
"rewards/warm_up_reward/std": 0.8023640215396881,
|
| 355 |
+
"step": 23
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"clip_ratio": 0.0,
|
| 359 |
+
"completion_length": 139.73958587646484,
|
| 360 |
+
"epoch": 0.25,
|
| 361 |
+
"grad_norm": 2.697375275936146,
|
| 362 |
+
"kl": 0.05670166015625,
|
| 363 |
+
"learning_rate": 1e-06,
|
| 364 |
+
"loss": 0.0705,
|
| 365 |
+
"num_tokens": 1053401.0,
|
| 366 |
+
"reward": 1.031250074505806,
|
| 367 |
+
"reward_std": 0.9829376488924026,
|
| 368 |
+
"rewards/warm_up_reward/mean": 0.859375,
|
| 369 |
+
"rewards/warm_up_reward/std": 0.813440352678299,
|
| 370 |
+
"step": 24
|
| 371 |
+
},
|
| 372 |
+
{
|
| 373 |
+
"clip_ratio": 0.0,
|
| 374 |
+
"completion_length": 138.8854217529297,
|
| 375 |
+
"epoch": 0.2604166666666667,
|
| 376 |
+
"grad_norm": 85.52835351864486,
|
| 377 |
+
"kl": 0.198486328125,
|
| 378 |
+
"learning_rate": 1e-06,
|
| 379 |
+
"loss": 0.0333,
|
| 380 |
+
"num_tokens": 1096650.0,
|
| 381 |
+
"reward": 1.089583471417427,
|
| 382 |
+
"reward_std": 0.9481612741947174,
|
| 383 |
+
"rewards/warm_up_reward/mean": 0.9079861044883728,
|
| 384 |
+
"rewards/warm_up_reward/std": 0.7854074388742447,
|
| 385 |
+
"step": 25
|
| 386 |
+
},
|
| 387 |
+
{
|
| 388 |
+
"clip_ratio": 0.0,
|
| 389 |
+
"completion_length": 130.62500381469727,
|
| 390 |
+
"epoch": 0.2708333333333333,
|
| 391 |
+
"grad_norm": 3.4064495832019297,
|
| 392 |
+
"kl": 0.07513427734375,
|
| 393 |
+
"learning_rate": 1e-06,
|
| 394 |
+
"loss": 0.0544,
|
| 395 |
+
"num_tokens": 1139058.0,
|
| 396 |
+
"reward": 0.9885417520999908,
|
| 397 |
+
"reward_std": 0.990489736199379,
|
| 398 |
+
"rewards/warm_up_reward/mean": 0.8237847238779068,
|
| 399 |
+
"rewards/warm_up_reward/std": 0.8235566318035126,
|
| 400 |
+
"step": 26
|
| 401 |
+
},
|
| 402 |
+
{
|
| 403 |
+
"clip_ratio": 0.0,
|
| 404 |
+
"completion_length": 134.50000381469727,
|
| 405 |
+
"epoch": 0.28125,
|
| 406 |
+
"grad_norm": 118.32186343464612,
|
| 407 |
+
"kl": 0.2930908203125,
|
| 408 |
+
"learning_rate": 1e-06,
|
| 409 |
+
"loss": 0.011,
|
| 410 |
+
"num_tokens": 1181802.0,
|
| 411 |
+
"reward": 1.0552084296941757,
|
| 412 |
+
"reward_std": 0.868858814239502,
|
| 413 |
+
"rewards/warm_up_reward/mean": 0.8793402910232544,
|
| 414 |
+
"rewards/warm_up_reward/std": 0.8186527788639069,
|
| 415 |
+
"step": 27
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"clip_ratio": 0.0,
|
| 419 |
+
"completion_length": 140.8541717529297,
|
| 420 |
+
"epoch": 0.2916666666666667,
|
| 421 |
+
"grad_norm": 6.711195724360143,
|
| 422 |
+
"kl": 0.1092529296875,
|
| 423 |
+
"learning_rate": 1e-06,
|
| 424 |
+
"loss": 0.0187,
|
| 425 |
+
"num_tokens": 1225408.0,
|
| 426 |
+
"reward": 0.9666667431592941,
|
| 427 |
+
"reward_std": 0.9556048065423965,
|
| 428 |
+
"rewards/warm_up_reward/mean": 0.8055555671453476,
|
| 429 |
+
"rewards/warm_up_reward/std": 0.8192583322525024,
|
| 430 |
+
"step": 28
|
| 431 |
+
},
|
| 432 |
+
{
|
| 433 |
+
"clip_ratio": 0.0,
|
| 434 |
+
"completion_length": 137.48958778381348,
|
| 435 |
+
"epoch": 0.3020833333333333,
|
| 436 |
+
"grad_norm": 4.712858469896548,
|
| 437 |
+
"kl": 0.13214111328125,
|
| 438 |
+
"learning_rate": 1e-06,
|
| 439 |
+
"loss": 0.0356,
|
| 440 |
+
"num_tokens": 1268481.0,
|
| 441 |
+
"reward": 0.9000000655651093,
|
| 442 |
+
"reward_std": 1.0170713812112808,
|
| 443 |
+
"rewards/warm_up_reward/mean": 0.7500000149011612,
|
| 444 |
+
"rewards/warm_up_reward/std": 0.8409183472394943,
|
| 445 |
+
"step": 29
|
| 446 |
+
},
|
| 447 |
+
{
|
| 448 |
+
"clip_ratio": 0.0,
|
| 449 |
+
"completion_length": 142.09375381469727,
|
| 450 |
+
"epoch": 0.3125,
|
| 451 |
+
"grad_norm": 2.604660112727859,
|
| 452 |
+
"kl": 0.063720703125,
|
| 453 |
+
"learning_rate": 1e-06,
|
| 454 |
+
"loss": -0.0023,
|
| 455 |
+
"num_tokens": 1312008.0,
|
| 456 |
+
"reward": 0.9000000059604645,
|
| 457 |
+
"reward_std": 0.9869166016578674,
|
| 458 |
+
"rewards/warm_up_reward/mean": 0.75,
|
| 459 |
+
"rewards/warm_up_reward/std": 0.8337783664464951,
|
| 460 |
+
"step": 30
|
| 461 |
+
},
|
| 462 |
+
{
|
| 463 |
+
"clip_ratio": 0.0,
|
| 464 |
+
"completion_length": 145.59375381469727,
|
| 465 |
+
"epoch": 0.3229166666666667,
|
| 466 |
+
"grad_norm": 6.185404235919849,
|
| 467 |
+
"kl": 0.157470703125,
|
| 468 |
+
"learning_rate": 1e-06,
|
| 469 |
+
"loss": 0.0097,
|
| 470 |
+
"num_tokens": 1356039.0,
|
| 471 |
+
"reward": 1.0770834237337112,
|
| 472 |
+
"reward_std": 0.9777155965566635,
|
| 473 |
+
"rewards/warm_up_reward/mean": 0.8975694477558136,
|
| 474 |
+
"rewards/warm_up_reward/std": 0.7948237210512161,
|
| 475 |
+
"step": 31
|
| 476 |
+
},
|
| 477 |
+
{
|
| 478 |
+
"clip_ratio": 0.0,
|
| 479 |
+
"completion_length": 146.37500762939453,
|
| 480 |
+
"epoch": 0.3333333333333333,
|
| 481 |
+
"grad_norm": 2.4537091049295956,
|
| 482 |
+
"kl": 0.06231689453125,
|
| 483 |
+
"learning_rate": 1e-06,
|
| 484 |
+
"loss": 0.0046,
|
| 485 |
+
"num_tokens": 1400007.0,
|
| 486 |
+
"reward": 0.9812500327825546,
|
| 487 |
+
"reward_std": 0.911426916718483,
|
| 488 |
+
"rewards/warm_up_reward/mean": 0.8177083283662796,
|
| 489 |
+
"rewards/warm_up_reward/std": 0.7836276739835739,
|
| 490 |
+
"step": 32
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"clip_ratio": 0.0,
|
| 494 |
+
"completion_length": 145.19792556762695,
|
| 495 |
+
"epoch": 0.34375,
|
| 496 |
+
"grad_norm": 3.0265092714690702,
|
| 497 |
+
"kl": 0.061767578125,
|
| 498 |
+
"learning_rate": 1e-06,
|
| 499 |
+
"loss": 0.0423,
|
| 500 |
+
"num_tokens": 1443874.0,
|
| 501 |
+
"reward": 1.0354167222976685,
|
| 502 |
+
"reward_std": 0.9364243745803833,
|
| 503 |
+
"rewards/warm_up_reward/mean": 0.8628472238779068,
|
| 504 |
+
"rewards/warm_up_reward/std": 0.8118415027856827,
|
| 505 |
+
"step": 33
|
| 506 |
+
},
|
| 507 |
+
{
|
| 508 |
+
"clip_ratio": 0.0,
|
| 509 |
+
"completion_length": 143.8645896911621,
|
| 510 |
+
"epoch": 0.3541666666666667,
|
| 511 |
+
"grad_norm": 2.4770416085087477,
|
| 512 |
+
"kl": 0.05682373046875,
|
| 513 |
+
"learning_rate": 1e-06,
|
| 514 |
+
"loss": 0.0242,
|
| 515 |
+
"num_tokens": 1487601.0,
|
| 516 |
+
"reward": 0.9906250834465027,
|
| 517 |
+
"reward_std": 1.0336193144321442,
|
| 518 |
+
"rewards/warm_up_reward/mean": 0.8255208432674408,
|
| 519 |
+
"rewards/warm_up_reward/std": 0.8268236815929413,
|
| 520 |
+
"step": 34
|
| 521 |
+
},
|
| 522 |
+
{
|
| 523 |
+
"clip_ratio": 0.0,
|
| 524 |
+
"completion_length": 137.34375762939453,
|
| 525 |
+
"epoch": 0.3645833333333333,
|
| 526 |
+
"grad_norm": 2.787024849258649,
|
| 527 |
+
"kl": 0.051513671875,
|
| 528 |
+
"learning_rate": 1e-06,
|
| 529 |
+
"loss": 0.0409,
|
| 530 |
+
"num_tokens": 1530594.0,
|
| 531 |
+
"reward": 1.0822917073965073,
|
| 532 |
+
"reward_std": 0.8545732349157333,
|
| 533 |
+
"rewards/warm_up_reward/mean": 0.9019097238779068,
|
| 534 |
+
"rewards/warm_up_reward/std": 0.7748938798904419,
|
| 535 |
+
"step": 35
|
| 536 |
+
},
|
| 537 |
+
{
|
| 538 |
+
"clip_ratio": 0.0,
|
| 539 |
+
"completion_length": 145.71875381469727,
|
| 540 |
+
"epoch": 0.375,
|
| 541 |
+
"grad_norm": 2.515335560097886,
|
| 542 |
+
"kl": 0.0687255859375,
|
| 543 |
+
"learning_rate": 1e-06,
|
| 544 |
+
"loss": 0.0284,
|
| 545 |
+
"num_tokens": 1574409.0,
|
| 546 |
+
"reward": 0.9875000715255737,
|
| 547 |
+
"reward_std": 0.9168877303600311,
|
| 548 |
+
"rewards/warm_up_reward/mean": 0.8229166567325592,
|
| 549 |
+
"rewards/warm_up_reward/std": 0.8267286717891693,
|
| 550 |
+
"step": 36
|
| 551 |
+
},
|
| 552 |
+
{
|
| 553 |
+
"clip_ratio": 0.0,
|
| 554 |
+
"completion_length": 136.58333778381348,
|
| 555 |
+
"epoch": 0.3854166666666667,
|
| 556 |
+
"grad_norm": 11.790654099301383,
|
| 557 |
+
"kl": 0.1207275390625,
|
| 558 |
+
"learning_rate": 1e-06,
|
| 559 |
+
"loss": 0.0652,
|
| 560 |
+
"num_tokens": 1617503.0,
|
| 561 |
+
"reward": 1.031250074505806,
|
| 562 |
+
"reward_std": 0.9142753481864929,
|
| 563 |
+
"rewards/warm_up_reward/mean": 0.859375,
|
| 564 |
+
"rewards/warm_up_reward/std": 0.7878352403640747,
|
| 565 |
+
"step": 37
|
| 566 |
+
},
|
| 567 |
+
{
|
| 568 |
+
"clip_ratio": 0.0,
|
| 569 |
+
"completion_length": 151.8645896911621,
|
| 570 |
+
"epoch": 0.3958333333333333,
|
| 571 |
+
"grad_norm": 3.4202024786499643,
|
| 572 |
+
"kl": 0.08099365234375,
|
| 573 |
+
"learning_rate": 1e-06,
|
| 574 |
+
"loss": 0.0212,
|
| 575 |
+
"num_tokens": 1661980.0,
|
| 576 |
+
"reward": 0.6229167133569717,
|
| 577 |
+
"reward_std": 0.8097958564758301,
|
| 578 |
+
"rewards/warm_up_reward/mean": 0.5190972313284874,
|
| 579 |
+
"rewards/warm_up_reward/std": 0.7617596387863159,
|
| 580 |
+
"step": 38
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"clip_ratio": 0.0,
|
| 584 |
+
"completion_length": 142.8854217529297,
|
| 585 |
+
"epoch": 0.40625,
|
| 586 |
+
"grad_norm": 2.4994048524913364,
|
| 587 |
+
"kl": 0.06414794921875,
|
| 588 |
+
"learning_rate": 1e-06,
|
| 589 |
+
"loss": 0.0569,
|
| 590 |
+
"num_tokens": 1705637.0,
|
| 591 |
+
"reward": 1.0656251087784767,
|
| 592 |
+
"reward_std": 0.8034301698207855,
|
| 593 |
+
"rewards/warm_up_reward/mean": 0.8880208432674408,
|
| 594 |
+
"rewards/warm_up_reward/std": 0.7390912175178528,
|
| 595 |
+
"step": 39
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"clip_ratio": 0.0,
|
| 599 |
+
"completion_length": 146.18750762939453,
|
| 600 |
+
"epoch": 0.4166666666666667,
|
| 601 |
+
"grad_norm": 2.4999575203414186,
|
| 602 |
+
"kl": 0.0628662109375,
|
| 603 |
+
"learning_rate": 1e-06,
|
| 604 |
+
"loss": 0.0137,
|
| 605 |
+
"num_tokens": 1749719.0,
|
| 606 |
+
"reward": 1.0104167312383652,
|
| 607 |
+
"reward_std": 0.9736887365579605,
|
| 608 |
+
"rewards/warm_up_reward/mean": 0.8420138955116272,
|
| 609 |
+
"rewards/warm_up_reward/std": 0.822531133890152,
|
| 610 |
+
"step": 40
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"clip_ratio": 0.0,
|
| 614 |
+
"completion_length": 143.9479217529297,
|
| 615 |
+
"epoch": 0.4270833333333333,
|
| 616 |
+
"grad_norm": 2.2639443093591205,
|
| 617 |
+
"kl": 0.0675048828125,
|
| 618 |
+
"learning_rate": 1e-06,
|
| 619 |
+
"loss": 0.0087,
|
| 620 |
+
"num_tokens": 1793436.0,
|
| 621 |
+
"reward": 0.9229167401790619,
|
| 622 |
+
"reward_std": 0.9153347015380859,
|
| 623 |
+
"rewards/warm_up_reward/mean": 0.7690972089767456,
|
| 624 |
+
"rewards/warm_up_reward/std": 0.8183709383010864,
|
| 625 |
+
"step": 41
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"clip_ratio": 0.0,
|
| 629 |
+
"completion_length": 147.58333587646484,
|
| 630 |
+
"epoch": 0.4375,
|
| 631 |
+
"grad_norm": 2.5193978009218965,
|
| 632 |
+
"kl": 0.07177734375,
|
| 633 |
+
"learning_rate": 1e-06,
|
| 634 |
+
"loss": 0.0392,
|
| 635 |
+
"num_tokens": 1837562.0,
|
| 636 |
+
"reward": 1.006250038743019,
|
| 637 |
+
"reward_std": 0.8919505327939987,
|
| 638 |
+
"rewards/warm_up_reward/mean": 0.8385416716337204,
|
| 639 |
+
"rewards/warm_up_reward/std": 0.8046689182519913,
|
| 640 |
+
"step": 42
|
| 641 |
+
},
|
| 642 |
+
{
|
| 643 |
+
"clip_ratio": 0.0,
|
| 644 |
+
"completion_length": 141.37500381469727,
|
| 645 |
+
"epoch": 0.4479166666666667,
|
| 646 |
+
"grad_norm": 2.5496207567669034,
|
| 647 |
+
"kl": 0.06622314453125,
|
| 648 |
+
"learning_rate": 1e-06,
|
| 649 |
+
"loss": 0.0452,
|
| 650 |
+
"num_tokens": 1880972.0,
|
| 651 |
+
"reward": 1.068750038743019,
|
| 652 |
+
"reward_std": 0.9111972749233246,
|
| 653 |
+
"rewards/warm_up_reward/mean": 0.890625,
|
| 654 |
+
"rewards/warm_up_reward/std": 0.7989336252212524,
|
| 655 |
+
"step": 43
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"clip_ratio": 0.0,
|
| 659 |
+
"completion_length": 130.83333587646484,
|
| 660 |
+
"epoch": 0.4583333333333333,
|
| 661 |
+
"grad_norm": 5.245713134644536,
|
| 662 |
+
"kl": 0.0999755859375,
|
| 663 |
+
"learning_rate": 1e-06,
|
| 664 |
+
"loss": -0.0051,
|
| 665 |
+
"num_tokens": 1923460.0,
|
| 666 |
+
"reward": 0.929166704416275,
|
| 667 |
+
"reward_std": 0.8137651234865189,
|
| 668 |
+
"rewards/warm_up_reward/mean": 0.7743055373430252,
|
| 669 |
+
"rewards/warm_up_reward/std": 0.8136637955904007,
|
| 670 |
+
"step": 44
|
| 671 |
+
},
|
| 672 |
+
{
|
| 673 |
+
"clip_ratio": 0.0,
|
| 674 |
+
"completion_length": 144.2604217529297,
|
| 675 |
+
"epoch": 0.46875,
|
| 676 |
+
"grad_norm": 6.317144379422631,
|
| 677 |
+
"kl": 0.10107421875,
|
| 678 |
+
"learning_rate": 1e-06,
|
| 679 |
+
"loss": -0.0175,
|
| 680 |
+
"num_tokens": 1967315.0,
|
| 681 |
+
"reward": 1.1012500673532486,
|
| 682 |
+
"reward_std": 0.7948171943426132,
|
| 683 |
+
"rewards/warm_up_reward/mean": 0.9177083224058151,
|
| 684 |
+
"rewards/warm_up_reward/std": 0.7791551500558853,
|
| 685 |
+
"step": 45
|
| 686 |
+
},
|
| 687 |
+
{
|
| 688 |
+
"clip_ratio": 0.0,
|
| 689 |
+
"completion_length": 141.5104217529297,
|
| 690 |
+
"epoch": 0.4791666666666667,
|
| 691 |
+
"grad_norm": 2.8932825846308172,
|
| 692 |
+
"kl": 0.0859375,
|
| 693 |
+
"learning_rate": 1e-06,
|
| 694 |
+
"loss": 0.0029,
|
| 695 |
+
"num_tokens": 2010882.0,
|
| 696 |
+
"reward": 1.0656251162290573,
|
| 697 |
+
"reward_std": 0.9644656330347061,
|
| 698 |
+
"rewards/warm_up_reward/mean": 0.8880208432674408,
|
| 699 |
+
"rewards/warm_up_reward/std": 0.8194199502468109,
|
| 700 |
+
"step": 46
|
| 701 |
+
},
|
| 702 |
+
{
|
| 703 |
+
"clip_ratio": 0.0,
|
| 704 |
+
"completion_length": 140.21875762939453,
|
| 705 |
+
"epoch": 0.4895833333333333,
|
| 706 |
+
"grad_norm": 2.9093719889125174,
|
| 707 |
+
"kl": 0.1007080078125,
|
| 708 |
+
"learning_rate": 1e-06,
|
| 709 |
+
"loss": -0.0275,
|
| 710 |
+
"num_tokens": 2054307.0,
|
| 711 |
+
"reward": 0.991666704416275,
|
| 712 |
+
"reward_std": 0.9324973523616791,
|
| 713 |
+
"rewards/warm_up_reward/mean": 0.8263888955116272,
|
| 714 |
+
"rewards/warm_up_reward/std": 0.8247981667518616,
|
| 715 |
+
"step": 47
|
| 716 |
+
},
|
| 717 |
+
{
|
| 718 |
+
"clip_ratio": 0.0,
|
| 719 |
+
"completion_length": 136.5729217529297,
|
| 720 |
+
"epoch": 0.5,
|
| 721 |
+
"grad_norm": 2.3209209113606146,
|
| 722 |
+
"kl": 0.08441162109375,
|
| 723 |
+
"learning_rate": 1e-06,
|
| 724 |
+
"loss": 0.001,
|
| 725 |
+
"num_tokens": 2097424.0,
|
| 726 |
+
"reward": 1.1010417491197586,
|
| 727 |
+
"reward_std": 0.8305719494819641,
|
| 728 |
+
"rewards/warm_up_reward/mean": 0.9175347238779068,
|
| 729 |
+
"rewards/warm_up_reward/std": 0.7910451591014862,
|
| 730 |
+
"step": 48
|
| 731 |
+
},
|
| 732 |
+
{
|
| 733 |
+
"clip_ratio": 0.0,
|
| 734 |
+
"completion_length": 142.50000762939453,
|
| 735 |
+
"epoch": 0.5104166666666666,
|
| 736 |
+
"grad_norm": 2.470827147583925,
|
| 737 |
+
"kl": 0.08355712890625,
|
| 738 |
+
"learning_rate": 1e-06,
|
| 739 |
+
"loss": 0.0433,
|
| 740 |
+
"num_tokens": 2141092.0,
|
| 741 |
+
"reward": 1.0208334028720856,
|
| 742 |
+
"reward_std": 0.9052031934261322,
|
| 743 |
+
"rewards/warm_up_reward/mean": 0.8506944477558136,
|
| 744 |
+
"rewards/warm_up_reward/std": 0.8133653849363327,
|
| 745 |
+
"step": 49
|
| 746 |
+
},
|
| 747 |
+
{
|
| 748 |
+
"clip_ratio": 0.0,
|
| 749 |
+
"completion_length": 138.58333587646484,
|
| 750 |
+
"epoch": 0.5208333333333334,
|
| 751 |
+
"grad_norm": 2.314915736053297,
|
| 752 |
+
"kl": 0.0765380859375,
|
| 753 |
+
"learning_rate": 1e-06,
|
| 754 |
+
"loss": 0.0188,
|
| 755 |
+
"num_tokens": 2184306.0,
|
| 756 |
+
"reward": 1.050000086426735,
|
| 757 |
+
"reward_std": 0.9242848604917526,
|
| 758 |
+
"rewards/warm_up_reward/mean": 0.8749999850988388,
|
| 759 |
+
"rewards/warm_up_reward/std": 0.7892495840787888,
|
| 760 |
+
"step": 50
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"clip_ratio": 0.0,
|
| 764 |
+
"completion_length": 138.92708778381348,
|
| 765 |
+
"epoch": 0.53125,
|
| 766 |
+
"grad_norm": 16.28250872141934,
|
| 767 |
+
"kl": 0.26171875,
|
| 768 |
+
"learning_rate": 1e-06,
|
| 769 |
+
"loss": 0.0328,
|
| 770 |
+
"num_tokens": 2227673.0,
|
| 771 |
+
"reward": 1.1312500685453415,
|
| 772 |
+
"reward_std": 1.0009342432022095,
|
| 773 |
+
"rewards/warm_up_reward/mean": 0.9427083432674408,
|
| 774 |
+
"rewards/warm_up_reward/std": 0.8114291131496429,
|
| 775 |
+
"step": 51
|
| 776 |
+
},
|
| 777 |
+
{
|
| 778 |
+
"clip_ratio": 0.0,
|
| 779 |
+
"completion_length": 140.92708587646484,
|
| 780 |
+
"epoch": 0.5416666666666666,
|
| 781 |
+
"grad_norm": 2.4052567403889364,
|
| 782 |
+
"kl": 0.0528564453125,
|
| 783 |
+
"learning_rate": 1e-06,
|
| 784 |
+
"loss": 0.0201,
|
| 785 |
+
"num_tokens": 2271064.0,
|
| 786 |
+
"reward": 1.2375000417232513,
|
| 787 |
+
"reward_std": 0.8487301468849182,
|
| 788 |
+
"rewards/warm_up_reward/mean": 1.03125,
|
| 789 |
+
"rewards/warm_up_reward/std": 0.7739475220441818,
|
| 790 |
+
"step": 52
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"clip_ratio": 0.0,
|
| 794 |
+
"completion_length": 146.1458396911621,
|
| 795 |
+
"epoch": 0.5520833333333334,
|
| 796 |
+
"grad_norm": 2.4582483635661467,
|
| 797 |
+
"kl": 0.05413818359375,
|
| 798 |
+
"learning_rate": 1e-06,
|
| 799 |
+
"loss": 0.0429,
|
| 800 |
+
"num_tokens": 2315052.0,
|
| 801 |
+
"reward": 1.1104167699813843,
|
| 802 |
+
"reward_std": 0.9700468927621841,
|
| 803 |
+
"rewards/warm_up_reward/mean": 0.9253472238779068,
|
| 804 |
+
"rewards/warm_up_reward/std": 0.7955830246210098,
|
| 805 |
+
"step": 53
|
| 806 |
+
},
|
| 807 |
+
{
|
| 808 |
+
"clip_ratio": 0.0,
|
| 809 |
+
"completion_length": 145.2083396911621,
|
| 810 |
+
"epoch": 0.5625,
|
| 811 |
+
"grad_norm": 2.4577305981193165,
|
| 812 |
+
"kl": 0.0728759765625,
|
| 813 |
+
"learning_rate": 1e-06,
|
| 814 |
+
"loss": -0.0131,
|
| 815 |
+
"num_tokens": 2358962.0,
|
| 816 |
+
"reward": 1.1750001013278961,
|
| 817 |
+
"reward_std": 0.9326367676258087,
|
| 818 |
+
"rewards/warm_up_reward/mean": 0.9791666716337204,
|
| 819 |
+
"rewards/warm_up_reward/std": 0.7897387892007828,
|
| 820 |
+
"step": 54
|
| 821 |
+
},
|
| 822 |
+
{
|
| 823 |
+
"clip_ratio": 0.0,
|
| 824 |
+
"completion_length": 145.7916717529297,
|
| 825 |
+
"epoch": 0.5729166666666666,
|
| 826 |
+
"grad_norm": 2.302326467124225,
|
| 827 |
+
"kl": 0.0810546875,
|
| 828 |
+
"learning_rate": 1e-06,
|
| 829 |
+
"loss": 0.0291,
|
| 830 |
+
"num_tokens": 2402922.0,
|
| 831 |
+
"reward": 0.9875000566244125,
|
| 832 |
+
"reward_std": 1.0013651847839355,
|
| 833 |
+
"rewards/warm_up_reward/mean": 0.8229166716337204,
|
| 834 |
+
"rewards/warm_up_reward/std": 0.8247637003660202,
|
| 835 |
+
"step": 55
|
| 836 |
+
},
|
| 837 |
+
{
|
| 838 |
+
"clip_ratio": 0.0,
|
| 839 |
+
"completion_length": 147.9479217529297,
|
| 840 |
+
"epoch": 0.5833333333333334,
|
| 841 |
+
"grad_norm": 2.580316913788417,
|
| 842 |
+
"kl": 0.068115234375,
|
| 843 |
+
"learning_rate": 1e-06,
|
| 844 |
+
"loss": 0.0509,
|
| 845 |
+
"num_tokens": 2447065.0,
|
| 846 |
+
"reward": 1.183750033378601,
|
| 847 |
+
"reward_std": 0.9039967954158783,
|
| 848 |
+
"rewards/warm_up_reward/mean": 0.9864583313465118,
|
| 849 |
+
"rewards/warm_up_reward/std": 0.787983849644661,
|
| 850 |
+
"step": 56
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"clip_ratio": 0.0,
|
| 854 |
+
"completion_length": 142.05208587646484,
|
| 855 |
+
"epoch": 0.59375,
|
| 856 |
+
"grad_norm": 2.748934001160214,
|
| 857 |
+
"kl": 0.06414794921875,
|
| 858 |
+
"learning_rate": 1e-06,
|
| 859 |
+
"loss": -0.0078,
|
| 860 |
+
"num_tokens": 2490552.0,
|
| 861 |
+
"reward": 1.07750004529953,
|
| 862 |
+
"reward_std": 0.9763932228088379,
|
| 863 |
+
"rewards/warm_up_reward/mean": 0.8979166746139526,
|
| 864 |
+
"rewards/warm_up_reward/std": 0.8105349242687225,
|
| 865 |
+
"step": 57
|
| 866 |
+
},
|
| 867 |
+
{
|
| 868 |
+
"clip_ratio": 0.0,
|
| 869 |
+
"completion_length": 146.0729217529297,
|
| 870 |
+
"epoch": 0.6041666666666666,
|
| 871 |
+
"grad_norm": 2.279728805159882,
|
| 872 |
+
"kl": 0.05682373046875,
|
| 873 |
+
"learning_rate": 1e-06,
|
| 874 |
+
"loss": 0.0054,
|
| 875 |
+
"num_tokens": 2534503.0,
|
| 876 |
+
"reward": 1.2562500685453415,
|
| 877 |
+
"reward_std": 0.8728772848844528,
|
| 878 |
+
"rewards/warm_up_reward/mean": 1.046875,
|
| 879 |
+
"rewards/warm_up_reward/std": 0.715716764330864,
|
| 880 |
+
"step": 58
|
| 881 |
+
},
|
| 882 |
+
{
|
| 883 |
+
"clip_ratio": 0.0,
|
| 884 |
+
"completion_length": 136.77083587646484,
|
| 885 |
+
"epoch": 0.6145833333333334,
|
| 886 |
+
"grad_norm": 2.301940905359112,
|
| 887 |
+
"kl": 0.0634765625,
|
| 888 |
+
"learning_rate": 1e-06,
|
| 889 |
+
"loss": 0.0198,
|
| 890 |
+
"num_tokens": 2577603.0,
|
| 891 |
+
"reward": 1.2200001031160355,
|
| 892 |
+
"reward_std": 0.9238942861557007,
|
| 893 |
+
"rewards/warm_up_reward/mean": 1.0166666805744171,
|
| 894 |
+
"rewards/warm_up_reward/std": 0.7837828695774078,
|
| 895 |
+
"step": 59
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"clip_ratio": 0.0,
|
| 899 |
+
"completion_length": 149.3645896911621,
|
| 900 |
+
"epoch": 0.625,
|
| 901 |
+
"grad_norm": 2.3088797777576535,
|
| 902 |
+
"kl": 0.0701904296875,
|
| 903 |
+
"learning_rate": 1e-06,
|
| 904 |
+
"loss": 0.0668,
|
| 905 |
+
"num_tokens": 2621852.0,
|
| 906 |
+
"reward": 1.0885417461395264,
|
| 907 |
+
"reward_std": 0.9921838045120239,
|
| 908 |
+
"rewards/warm_up_reward/mean": 0.9071180820465088,
|
| 909 |
+
"rewards/warm_up_reward/std": 0.8187949508428574,
|
| 910 |
+
"step": 60
|
| 911 |
+
},
|
| 912 |
+
{
|
| 913 |
+
"clip_ratio": 0.0,
|
| 914 |
+
"completion_length": 144.9791717529297,
|
| 915 |
+
"epoch": 0.6354166666666666,
|
| 916 |
+
"grad_norm": 2.3531788106957063,
|
| 917 |
+
"kl": 0.0830078125,
|
| 918 |
+
"learning_rate": 1e-06,
|
| 919 |
+
"loss": 0.0715,
|
| 920 |
+
"num_tokens": 2665584.0,
|
| 921 |
+
"reward": 1.103541761636734,
|
| 922 |
+
"reward_std": 0.8904776722192764,
|
| 923 |
+
"rewards/warm_up_reward/mean": 0.9196180552244186,
|
| 924 |
+
"rewards/warm_up_reward/std": 0.7996000051498413,
|
| 925 |
+
"step": 61
|
| 926 |
+
},
|
| 927 |
+
{
|
| 928 |
+
"clip_ratio": 0.0,
|
| 929 |
+
"completion_length": 140.5416717529297,
|
| 930 |
+
"epoch": 0.6458333333333334,
|
| 931 |
+
"grad_norm": 2.3780245058749894,
|
| 932 |
+
"kl": 0.0545654296875,
|
| 933 |
+
"learning_rate": 1e-06,
|
| 934 |
+
"loss": 0.0144,
|
| 935 |
+
"num_tokens": 2709058.0,
|
| 936 |
+
"reward": 1.2650001347064972,
|
| 937 |
+
"reward_std": 0.8583473563194275,
|
| 938 |
+
"rewards/warm_up_reward/mean": 1.0541666597127914,
|
| 939 |
+
"rewards/warm_up_reward/std": 0.753357321023941,
|
| 940 |
+
"step": 62
|
| 941 |
+
},
|
| 942 |
+
{
|
| 943 |
+
"clip_ratio": 0.0,
|
| 944 |
+
"completion_length": 150.5208396911621,
|
| 945 |
+
"epoch": 0.65625,
|
| 946 |
+
"grad_norm": 2.291724896507479,
|
| 947 |
+
"kl": 0.05914306640625,
|
| 948 |
+
"learning_rate": 1e-06,
|
| 949 |
+
"loss": 0.0102,
|
| 950 |
+
"num_tokens": 2753538.0,
|
| 951 |
+
"reward": 1.2431251406669617,
|
| 952 |
+
"reward_std": 0.8321643471717834,
|
| 953 |
+
"rewards/warm_up_reward/mean": 1.0359375476837158,
|
| 954 |
+
"rewards/warm_up_reward/std": 0.74222831428051,
|
| 955 |
+
"step": 63
|
| 956 |
+
},
|
| 957 |
+
{
|
| 958 |
+
"clip_ratio": 0.0,
|
| 959 |
+
"completion_length": 143.2395896911621,
|
| 960 |
+
"epoch": 0.6666666666666666,
|
| 961 |
+
"grad_norm": 3.018275289311917,
|
| 962 |
+
"kl": 0.085693359375,
|
| 963 |
+
"learning_rate": 1e-06,
|
| 964 |
+
"loss": 0.0078,
|
| 965 |
+
"num_tokens": 2797253.0,
|
| 966 |
+
"reward": 1.1802085041999817,
|
| 967 |
+
"reward_std": 0.948539987206459,
|
| 968 |
+
"rewards/warm_up_reward/mean": 0.9835069626569748,
|
| 969 |
+
"rewards/warm_up_reward/std": 0.7748740911483765,
|
| 970 |
+
"step": 64
|
| 971 |
+
},
|
| 972 |
+
{
|
| 973 |
+
"clip_ratio": 0.0,
|
| 974 |
+
"completion_length": 138.9791717529297,
|
| 975 |
+
"epoch": 0.6770833333333334,
|
| 976 |
+
"grad_norm": 2.219343433713507,
|
| 977 |
+
"kl": 0.06298828125,
|
| 978 |
+
"learning_rate": 1e-06,
|
| 979 |
+
"loss": 0.0203,
|
| 980 |
+
"num_tokens": 2840571.0,
|
| 981 |
+
"reward": 1.2229167520999908,
|
| 982 |
+
"reward_std": 0.783911868929863,
|
| 983 |
+
"rewards/warm_up_reward/mean": 1.0190972089767456,
|
| 984 |
+
"rewards/warm_up_reward/std": 0.7600821256637573,
|
| 985 |
+
"step": 65
|
| 986 |
+
},
|
| 987 |
+
{
|
| 988 |
+
"clip_ratio": 0.0,
|
| 989 |
+
"completion_length": 152.8958396911621,
|
| 990 |
+
"epoch": 0.6875,
|
| 991 |
+
"grad_norm": 2.2126312475293877,
|
| 992 |
+
"kl": 0.0704345703125,
|
| 993 |
+
"learning_rate": 1e-06,
|
| 994 |
+
"loss": 0.0425,
|
| 995 |
+
"num_tokens": 2885201.0,
|
| 996 |
+
"reward": 1.1691668182611465,
|
| 997 |
+
"reward_std": 0.8853475451469421,
|
| 998 |
+
"rewards/warm_up_reward/mean": 0.9743055552244186,
|
| 999 |
+
"rewards/warm_up_reward/std": 0.7726792246103287,
|
| 1000 |
+
"step": 66
|
| 1001 |
+
},
|
| 1002 |
+
{
|
| 1003 |
+
"clip_ratio": 0.0,
|
| 1004 |
+
"completion_length": 147.61459350585938,
|
| 1005 |
+
"epoch": 0.6979166666666666,
|
| 1006 |
+
"grad_norm": 2.3729988144079748,
|
| 1007 |
+
"kl": 0.05316162109375,
|
| 1008 |
+
"learning_rate": 1e-06,
|
| 1009 |
+
"loss": 0.0235,
|
| 1010 |
+
"num_tokens": 2929396.0,
|
| 1011 |
+
"reward": 1.3312501311302185,
|
| 1012 |
+
"reward_std": 0.7987091541290283,
|
| 1013 |
+
"rewards/warm_up_reward/mean": 1.109375,
|
| 1014 |
+
"rewards/warm_up_reward/std": 0.7549550831317902,
|
| 1015 |
+
"step": 67
|
| 1016 |
+
},
|
| 1017 |
+
{
|
| 1018 |
+
"clip_ratio": 0.0,
|
| 1019 |
+
"completion_length": 144.1041717529297,
|
| 1020 |
+
"epoch": 0.7083333333333334,
|
| 1021 |
+
"grad_norm": 2.268946790543885,
|
| 1022 |
+
"kl": 0.04766845703125,
|
| 1023 |
+
"learning_rate": 1e-06,
|
| 1024 |
+
"loss": -0.0027,
|
| 1025 |
+
"num_tokens": 2973200.0,
|
| 1026 |
+
"reward": 1.325416773557663,
|
| 1027 |
+
"reward_std": 0.8379913568496704,
|
| 1028 |
+
"rewards/warm_up_reward/mean": 1.1045138835906982,
|
| 1029 |
+
"rewards/warm_up_reward/std": 0.7519785463809967,
|
| 1030 |
+
"step": 68
|
| 1031 |
+
},
|
| 1032 |
+
{
|
| 1033 |
+
"clip_ratio": 0.0,
|
| 1034 |
+
"completion_length": 140.4791717529297,
|
| 1035 |
+
"epoch": 0.71875,
|
| 1036 |
+
"grad_norm": 2.40410834715932,
|
| 1037 |
+
"kl": 0.0625,
|
| 1038 |
+
"learning_rate": 1e-06,
|
| 1039 |
+
"loss": 0.0508,
|
| 1040 |
+
"num_tokens": 3016728.0,
|
| 1041 |
+
"reward": 1.143750011920929,
|
| 1042 |
+
"reward_std": 0.8826231509447098,
|
| 1043 |
+
"rewards/warm_up_reward/mean": 0.953125,
|
| 1044 |
+
"rewards/warm_up_reward/std": 0.7572390139102936,
|
| 1045 |
+
"step": 69
|
| 1046 |
+
},
|
| 1047 |
+
{
|
| 1048 |
+
"clip_ratio": 0.0,
|
| 1049 |
+
"completion_length": 145.9791717529297,
|
| 1050 |
+
"epoch": 0.7291666666666666,
|
| 1051 |
+
"grad_norm": 2.377991017189631,
|
| 1052 |
+
"kl": 0.06512451171875,
|
| 1053 |
+
"learning_rate": 1e-06,
|
| 1054 |
+
"loss": 0.0505,
|
| 1055 |
+
"num_tokens": 3060790.0,
|
| 1056 |
+
"reward": 1.2854167819023132,
|
| 1057 |
+
"reward_std": 0.9141092300415039,
|
| 1058 |
+
"rewards/warm_up_reward/mean": 1.0711805671453476,
|
| 1059 |
+
"rewards/warm_up_reward/std": 0.7661919444799423,
|
| 1060 |
+
"step": 70
|
| 1061 |
+
},
|
| 1062 |
+
{
|
| 1063 |
+
"clip_ratio": 0.0,
|
| 1064 |
+
"completion_length": 144.7916717529297,
|
| 1065 |
+
"epoch": 0.7395833333333334,
|
| 1066 |
+
"grad_norm": 5.490360584080418,
|
| 1067 |
+
"kl": 0.068115234375,
|
| 1068 |
+
"learning_rate": 1e-06,
|
| 1069 |
+
"loss": 0.0061,
|
| 1070 |
+
"num_tokens": 3104672.0,
|
| 1071 |
+
"reward": 1.2937501072883606,
|
| 1072 |
+
"reward_std": 0.9385685622692108,
|
| 1073 |
+
"rewards/warm_up_reward/mean": 1.078125,
|
| 1074 |
+
"rewards/warm_up_reward/std": 0.7564428001642227,
|
| 1075 |
+
"step": 71
|
| 1076 |
+
},
|
| 1077 |
+
{
|
| 1078 |
+
"clip_ratio": 0.0,
|
| 1079 |
+
"completion_length": 132.94792366027832,
|
| 1080 |
+
"epoch": 0.75,
|
| 1081 |
+
"grad_norm": 2.705450393270237,
|
| 1082 |
+
"kl": 0.0748291015625,
|
| 1083 |
+
"learning_rate": 1e-06,
|
| 1084 |
+
"loss": 0.0032,
|
| 1085 |
+
"num_tokens": 3147441.0,
|
| 1086 |
+
"reward": 1.2687500715255737,
|
| 1087 |
+
"reward_std": 0.9319685697555542,
|
| 1088 |
+
"rewards/warm_up_reward/mean": 1.0572916567325592,
|
| 1089 |
+
"rewards/warm_up_reward/std": 0.7771977633237839,
|
| 1090 |
+
"step": 72
|
| 1091 |
+
},
|
| 1092 |
+
{
|
| 1093 |
+
"clip_ratio": 0.0,
|
| 1094 |
+
"completion_length": 151.91667556762695,
|
| 1095 |
+
"epoch": 0.7604166666666666,
|
| 1096 |
+
"grad_norm": 2.254735299608175,
|
| 1097 |
+
"kl": 0.07171630859375,
|
| 1098 |
+
"learning_rate": 1e-06,
|
| 1099 |
+
"loss": 0.0105,
|
| 1100 |
+
"num_tokens": 3192121.0,
|
| 1101 |
+
"reward": 1.0045834183692932,
|
| 1102 |
+
"reward_std": 0.8630332052707672,
|
| 1103 |
+
"rewards/warm_up_reward/mean": 0.8371527940034866,
|
| 1104 |
+
"rewards/warm_up_reward/std": 0.7969614416360855,
|
| 1105 |
+
"step": 73
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"clip_ratio": 0.0,
|
| 1109 |
+
"completion_length": 140.31250190734863,
|
| 1110 |
+
"epoch": 0.7708333333333334,
|
| 1111 |
+
"grad_norm": 2.4523220833578345,
|
| 1112 |
+
"kl": 0.05816650390625,
|
| 1113 |
+
"learning_rate": 1e-06,
|
| 1114 |
+
"loss": 0.0158,
|
| 1115 |
+
"num_tokens": 3235453.0,
|
| 1116 |
+
"reward": 1.1837501227855682,
|
| 1117 |
+
"reward_std": 0.9126418828964233,
|
| 1118 |
+
"rewards/warm_up_reward/mean": 0.9864583015441895,
|
| 1119 |
+
"rewards/warm_up_reward/std": 0.7863775044679642,
|
| 1120 |
+
"step": 74
|
| 1121 |
+
},
|
| 1122 |
+
{
|
| 1123 |
+
"clip_ratio": 0.0,
|
| 1124 |
+
"completion_length": 141.7395896911621,
|
| 1125 |
+
"epoch": 0.78125,
|
| 1126 |
+
"grad_norm": 2.2478331336635513,
|
| 1127 |
+
"kl": 0.0609130859375,
|
| 1128 |
+
"learning_rate": 1e-06,
|
| 1129 |
+
"loss": 0.0284,
|
| 1130 |
+
"num_tokens": 3278964.0,
|
| 1131 |
+
"reward": 1.2054167687892914,
|
| 1132 |
+
"reward_std": 0.9118891954421997,
|
| 1133 |
+
"rewards/warm_up_reward/mean": 1.0045138746500015,
|
| 1134 |
+
"rewards/warm_up_reward/std": 0.7829048186540604,
|
| 1135 |
+
"step": 75
|
| 1136 |
+
},
|
| 1137 |
+
{
|
| 1138 |
+
"clip_ratio": 0.0,
|
| 1139 |
+
"completion_length": 139.71875381469727,
|
| 1140 |
+
"epoch": 0.7916666666666666,
|
| 1141 |
+
"grad_norm": 2.6147718994418203,
|
| 1142 |
+
"kl": 0.0904541015625,
|
| 1143 |
+
"learning_rate": 1e-06,
|
| 1144 |
+
"loss": 0.0143,
|
| 1145 |
+
"num_tokens": 3322407.0,
|
| 1146 |
+
"reward": 1.2660417556762695,
|
| 1147 |
+
"reward_std": 0.9197860509157181,
|
| 1148 |
+
"rewards/warm_up_reward/mean": 1.0550346970558167,
|
| 1149 |
+
"rewards/warm_up_reward/std": 0.7622723281383514,
|
| 1150 |
+
"step": 76
|
| 1151 |
+
},
|
| 1152 |
+
{
|
| 1153 |
+
"clip_ratio": 0.0,
|
| 1154 |
+
"completion_length": 141.53125762939453,
|
| 1155 |
+
"epoch": 0.8020833333333334,
|
| 1156 |
+
"grad_norm": 2.530432648354832,
|
| 1157 |
+
"kl": 0.093505859375,
|
| 1158 |
+
"learning_rate": 1e-06,
|
| 1159 |
+
"loss": -0.0104,
|
| 1160 |
+
"num_tokens": 3366036.0,
|
| 1161 |
+
"reward": 1.1020834147930145,
|
| 1162 |
+
"reward_std": 0.902558371424675,
|
| 1163 |
+
"rewards/warm_up_reward/mean": 0.9184028059244156,
|
| 1164 |
+
"rewards/warm_up_reward/std": 0.7975014746189117,
|
| 1165 |
+
"step": 77
|
| 1166 |
+
},
|
| 1167 |
+
{
|
| 1168 |
+
"clip_ratio": 0.0,
|
| 1169 |
+
"completion_length": 146.0416717529297,
|
| 1170 |
+
"epoch": 0.8125,
|
| 1171 |
+
"grad_norm": 2.2386503327740015,
|
| 1172 |
+
"kl": 0.0811767578125,
|
| 1173 |
+
"learning_rate": 1e-06,
|
| 1174 |
+
"loss": 0.0184,
|
| 1175 |
+
"num_tokens": 3410026.0,
|
| 1176 |
+
"reward": 1.3406251072883606,
|
| 1177 |
+
"reward_std": 0.8862900286912918,
|
| 1178 |
+
"rewards/warm_up_reward/mean": 1.1171874850988388,
|
| 1179 |
+
"rewards/warm_up_reward/std": 0.7199237793684006,
|
| 1180 |
+
"step": 78
|
| 1181 |
+
},
|
| 1182 |
+
{
|
| 1183 |
+
"clip_ratio": 0.0,
|
| 1184 |
+
"completion_length": 133.6041717529297,
|
| 1185 |
+
"epoch": 0.8229166666666666,
|
| 1186 |
+
"grad_norm": 2.9736551256376744,
|
| 1187 |
+
"kl": 0.0992431640625,
|
| 1188 |
+
"learning_rate": 1e-06,
|
| 1189 |
+
"loss": 0.0029,
|
| 1190 |
+
"num_tokens": 3452750.0,
|
| 1191 |
+
"reward": 1.3556251227855682,
|
| 1192 |
+
"reward_std": 0.8310635536909103,
|
| 1193 |
+
"rewards/warm_up_reward/mean": 1.129687488079071,
|
| 1194 |
+
"rewards/warm_up_reward/std": 0.7288718819618225,
|
| 1195 |
+
"step": 79
|
| 1196 |
+
},
|
| 1197 |
+
{
|
| 1198 |
+
"clip_ratio": 0.0,
|
| 1199 |
+
"completion_length": 139.45834350585938,
|
| 1200 |
+
"epoch": 0.8333333333333334,
|
| 1201 |
+
"grad_norm": 4.081234898460602,
|
| 1202 |
+
"kl": 0.15234375,
|
| 1203 |
+
"learning_rate": 1e-06,
|
| 1204 |
+
"loss": -0.0154,
|
| 1205 |
+
"num_tokens": 3496018.0,
|
| 1206 |
+
"reward": 1.0906250923871994,
|
| 1207 |
+
"reward_std": 0.8768025040626526,
|
| 1208 |
+
"rewards/warm_up_reward/mean": 0.9088541716337204,
|
| 1209 |
+
"rewards/warm_up_reward/std": 0.8029628545045853,
|
| 1210 |
+
"step": 80
|
| 1211 |
+
}
|
| 1212 |
+
],
|
| 1213 |
+
"logging_steps": 1.0,
|
| 1214 |
+
"max_steps": 96,
|
| 1215 |
+
"num_input_tokens_seen": 0,
|
| 1216 |
+
"num_train_epochs": 1,
|
| 1217 |
+
"save_steps": 16,
|
| 1218 |
+
"stateful_callbacks": {
|
| 1219 |
+
"TrainerControl": {
|
| 1220 |
+
"args": {
|
| 1221 |
+
"should_epoch_stop": false,
|
| 1222 |
+
"should_evaluate": false,
|
| 1223 |
+
"should_log": false,
|
| 1224 |
+
"should_save": true,
|
| 1225 |
+
"should_training_stop": false
|
| 1226 |
+
},
|
| 1227 |
+
"attributes": {}
|
| 1228 |
+
}
|
| 1229 |
+
},
|
| 1230 |
+
"total_flos": 0.0,
|
| 1231 |
+
"train_batch_size": 6,
|
| 1232 |
+
"trial_name": null,
|
| 1233 |
+
"trial_params": null
|
| 1234 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/sp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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)
|