Initial commit: Upload pretrained LLM
Browse files- .gitattributes +1 -0
- config.json +28 -0
- generation_config.json +9 -0
- latest +1 -0
- model-00001-of-00006.safetensors +3 -0
- model-00002-of-00006.safetensors +3 -0
- model-00003-of-00006.safetensors +3 -0
- model-00004-of-00006.safetensors +3 -0
- model-00005-of-00006.safetensors +3 -0
- model-00006-of-00006.safetensors +3 -0
- model.safetensors.index.json +586 -0
- special_tokens_map.json +23 -0
- tokenizer.json +3 -0
- tokenizer_config.json +196 -0
- trainer_state.json +753 -0
- training_args.bin +3 -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
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"Qwen2ForCausalLM"
|
4 |
+
],
|
5 |
+
"attention_dropout": 0.0,
|
6 |
+
"bos_token_id": 151643,
|
7 |
+
"eos_token_id": 151643,
|
8 |
+
"hidden_act": "silu",
|
9 |
+
"hidden_size": 5120,
|
10 |
+
"initializer_range": 0.02,
|
11 |
+
"intermediate_size": 13824,
|
12 |
+
"max_position_embeddings": 131072,
|
13 |
+
"max_window_layers": 48,
|
14 |
+
"model_type": "qwen2",
|
15 |
+
"num_attention_heads": 40,
|
16 |
+
"num_hidden_layers": 48,
|
17 |
+
"num_key_value_heads": 8,
|
18 |
+
"rms_norm_eps": 1e-05,
|
19 |
+
"rope_scaling": null,
|
20 |
+
"rope_theta": 1000000.0,
|
21 |
+
"sliding_window": null,
|
22 |
+
"tie_word_embeddings": false,
|
23 |
+
"torch_dtype": "bfloat16",
|
24 |
+
"transformers_version": "4.48.2",
|
25 |
+
"use_cache": false,
|
26 |
+
"use_sliding_window": false,
|
27 |
+
"vocab_size": 152064
|
28 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 151646,
|
4 |
+
"do_sample": true,
|
5 |
+
"eos_token_id": 151643,
|
6 |
+
"temperature": 0.6,
|
7 |
+
"top_p": 0.95,
|
8 |
+
"transformers_version": "4.48.2"
|
9 |
+
}
|
latest
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
global_step40
|
model-00001-of-00006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e26fa8df4641fe5c9d6f9eb5fb513a65c005a43119d5457d77deecc3b469ac0f
|
3 |
+
size 4986211280
|
model-00002-of-00006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7dd4d5d600740e52e31918a637b85c76110edba3a01b258148851e11abd42ca8
|
3 |
+
size 4954847344
|
model-00003-of-00006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5db1e42537aa96b2f75ad63e65d30eb73d663910238e4adea7622d3a02d3aea3
|
3 |
+
size 4954847392
|
model-00004-of-00006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:41a6882248ab522d7c6d89d92dd4664dcdbd1522281851685787dcaf11c1fc7c
|
3 |
+
size 4954847392
|
model-00005-of-00006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6f5b7a2d4a83452f891e66f1b323324a6f9da548d3b3a41191dc4b8490cadc36
|
3 |
+
size 4954847392
|
model-00006-of-00006.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38218a2d6aab96ecb44e6e66296cbf325c3625b573a457b3c132ea039532120f
|
3 |
+
size 4734533160
|
model.safetensors.index.json
ADDED
@@ -0,0 +1,586 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"metadata": {
|
3 |
+
"total_size": 29540067328
|
4 |
+
},
|
5 |
+
"weight_map": {
|
6 |
+
"lm_head.weight": "model-00006-of-00006.safetensors",
|
7 |
+
"model.embed_tokens.weight": "model-00001-of-00006.safetensors",
|
8 |
+
"model.layers.0.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
9 |
+
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
10 |
+
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
11 |
+
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
12 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
13 |
+
"model.layers.0.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
14 |
+
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
15 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
16 |
+
"model.layers.0.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
17 |
+
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
18 |
+
"model.layers.0.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
19 |
+
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
20 |
+
"model.layers.1.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
21 |
+
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
22 |
+
"model.layers.1.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
23 |
+
"model.layers.1.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
24 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
25 |
+
"model.layers.1.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
26 |
+
"model.layers.1.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
27 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
28 |
+
"model.layers.1.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
29 |
+
"model.layers.1.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
30 |
+
"model.layers.1.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
31 |
+
"model.layers.1.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
32 |
+
"model.layers.10.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
33 |
+
"model.layers.10.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
34 |
+
"model.layers.10.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
35 |
+
"model.layers.10.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
36 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
37 |
+
"model.layers.10.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
38 |
+
"model.layers.10.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
39 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
40 |
+
"model.layers.10.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
41 |
+
"model.layers.10.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
42 |
+
"model.layers.10.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
43 |
+
"model.layers.10.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
44 |
+
"model.layers.11.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
45 |
+
"model.layers.11.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
46 |
+
"model.layers.11.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
47 |
+
"model.layers.11.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
48 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
49 |
+
"model.layers.11.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
50 |
+
"model.layers.11.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
51 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
52 |
+
"model.layers.11.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
53 |
+
"model.layers.11.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
54 |
+
"model.layers.11.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
55 |
+
"model.layers.11.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
56 |
+
"model.layers.12.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
57 |
+
"model.layers.12.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
58 |
+
"model.layers.12.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
59 |
+
"model.layers.12.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
60 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
61 |
+
"model.layers.12.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
62 |
+
"model.layers.12.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
63 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
64 |
+
"model.layers.12.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
65 |
+
"model.layers.12.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
66 |
+
"model.layers.12.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
67 |
+
"model.layers.12.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
68 |
+
"model.layers.13.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
69 |
+
"model.layers.13.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
70 |
+
"model.layers.13.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
71 |
+
"model.layers.13.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
72 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
73 |
+
"model.layers.13.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
74 |
+
"model.layers.13.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
75 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
76 |
+
"model.layers.13.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
77 |
+
"model.layers.13.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
78 |
+
"model.layers.13.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
79 |
+
"model.layers.13.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
80 |
+
"model.layers.14.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
81 |
+
"model.layers.14.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
82 |
+
"model.layers.14.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
83 |
+
"model.layers.14.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
84 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
85 |
+
"model.layers.14.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
86 |
+
"model.layers.14.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
87 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
88 |
+
"model.layers.14.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
89 |
+
"model.layers.14.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
90 |
+
"model.layers.14.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
91 |
+
"model.layers.14.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
92 |
+
"model.layers.15.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
93 |
+
"model.layers.15.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
94 |
+
"model.layers.15.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
95 |
+
"model.layers.15.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
96 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
97 |
+
"model.layers.15.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
98 |
+
"model.layers.15.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
99 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
100 |
+
"model.layers.15.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
101 |
+
"model.layers.15.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
102 |
+
"model.layers.15.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
103 |
+
"model.layers.15.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
104 |
+
"model.layers.16.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
105 |
+
"model.layers.16.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
106 |
+
"model.layers.16.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
107 |
+
"model.layers.16.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
108 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
109 |
+
"model.layers.16.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
110 |
+
"model.layers.16.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
111 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
112 |
+
"model.layers.16.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
113 |
+
"model.layers.16.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
114 |
+
"model.layers.16.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
115 |
+
"model.layers.16.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
116 |
+
"model.layers.17.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
117 |
+
"model.layers.17.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
118 |
+
"model.layers.17.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
119 |
+
"model.layers.17.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
120 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
121 |
+
"model.layers.17.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
122 |
+
"model.layers.17.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
123 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
124 |
+
"model.layers.17.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
125 |
+
"model.layers.17.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
126 |
+
"model.layers.17.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
127 |
+
"model.layers.17.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
128 |
+
"model.layers.18.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
129 |
+
"model.layers.18.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
130 |
+
"model.layers.18.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
131 |
+
"model.layers.18.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
132 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
133 |
+
"model.layers.18.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
134 |
+
"model.layers.18.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
135 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
136 |
+
"model.layers.18.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
137 |
+
"model.layers.18.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
138 |
+
"model.layers.18.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
139 |
+
"model.layers.18.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
140 |
+
"model.layers.19.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
141 |
+
"model.layers.19.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
142 |
+
"model.layers.19.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
143 |
+
"model.layers.19.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
144 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
145 |
+
"model.layers.19.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
146 |
+
"model.layers.19.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
147 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
148 |
+
"model.layers.19.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
149 |
+
"model.layers.19.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
150 |
+
"model.layers.19.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
151 |
+
"model.layers.19.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
152 |
+
"model.layers.2.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
153 |
+
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
154 |
+
"model.layers.2.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
155 |
+
"model.layers.2.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
156 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
157 |
+
"model.layers.2.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
158 |
+
"model.layers.2.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
159 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
160 |
+
"model.layers.2.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
161 |
+
"model.layers.2.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
162 |
+
"model.layers.2.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
163 |
+
"model.layers.2.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
164 |
+
"model.layers.20.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
165 |
+
"model.layers.20.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
166 |
+
"model.layers.20.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
167 |
+
"model.layers.20.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
168 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
169 |
+
"model.layers.20.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
170 |
+
"model.layers.20.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
171 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
172 |
+
"model.layers.20.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
173 |
+
"model.layers.20.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
174 |
+
"model.layers.20.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
175 |
+
"model.layers.20.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
176 |
+
"model.layers.21.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
177 |
+
"model.layers.21.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
178 |
+
"model.layers.21.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
179 |
+
"model.layers.21.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
180 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
181 |
+
"model.layers.21.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
182 |
+
"model.layers.21.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
183 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
184 |
+
"model.layers.21.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
185 |
+
"model.layers.21.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
186 |
+
"model.layers.21.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
187 |
+
"model.layers.21.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
188 |
+
"model.layers.22.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
189 |
+
"model.layers.22.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
190 |
+
"model.layers.22.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
191 |
+
"model.layers.22.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
192 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
193 |
+
"model.layers.22.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
194 |
+
"model.layers.22.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
195 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
196 |
+
"model.layers.22.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
197 |
+
"model.layers.22.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
198 |
+
"model.layers.22.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
199 |
+
"model.layers.22.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
200 |
+
"model.layers.23.input_layernorm.weight": "model-00003-of-00006.safetensors",
|
201 |
+
"model.layers.23.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
|
202 |
+
"model.layers.23.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
|
203 |
+
"model.layers.23.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
|
204 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
|
205 |
+
"model.layers.23.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
206 |
+
"model.layers.23.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
207 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
208 |
+
"model.layers.23.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
209 |
+
"model.layers.23.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
210 |
+
"model.layers.23.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
211 |
+
"model.layers.23.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
212 |
+
"model.layers.24.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
213 |
+
"model.layers.24.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
214 |
+
"model.layers.24.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
215 |
+
"model.layers.24.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
216 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
217 |
+
"model.layers.24.self_attn.k_proj.bias": "model-00003-of-00006.safetensors",
|
218 |
+
"model.layers.24.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
|
219 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
|
220 |
+
"model.layers.24.self_attn.q_proj.bias": "model-00003-of-00006.safetensors",
|
221 |
+
"model.layers.24.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
|
222 |
+
"model.layers.24.self_attn.v_proj.bias": "model-00003-of-00006.safetensors",
|
223 |
+
"model.layers.24.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
|
224 |
+
"model.layers.25.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
225 |
+
"model.layers.25.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
226 |
+
"model.layers.25.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
227 |
+
"model.layers.25.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
228 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
229 |
+
"model.layers.25.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
230 |
+
"model.layers.25.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
231 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
232 |
+
"model.layers.25.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
233 |
+
"model.layers.25.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
234 |
+
"model.layers.25.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
235 |
+
"model.layers.25.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
236 |
+
"model.layers.26.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
237 |
+
"model.layers.26.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
238 |
+
"model.layers.26.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
239 |
+
"model.layers.26.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
240 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
241 |
+
"model.layers.26.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
242 |
+
"model.layers.26.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
243 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
244 |
+
"model.layers.26.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
245 |
+
"model.layers.26.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
246 |
+
"model.layers.26.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
247 |
+
"model.layers.26.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
248 |
+
"model.layers.27.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
249 |
+
"model.layers.27.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
250 |
+
"model.layers.27.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
251 |
+
"model.layers.27.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
252 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
253 |
+
"model.layers.27.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
254 |
+
"model.layers.27.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
255 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
256 |
+
"model.layers.27.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
257 |
+
"model.layers.27.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
258 |
+
"model.layers.27.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
259 |
+
"model.layers.27.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
260 |
+
"model.layers.28.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
261 |
+
"model.layers.28.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
262 |
+
"model.layers.28.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
263 |
+
"model.layers.28.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
264 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
265 |
+
"model.layers.28.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
266 |
+
"model.layers.28.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
267 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
268 |
+
"model.layers.28.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
269 |
+
"model.layers.28.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
270 |
+
"model.layers.28.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
271 |
+
"model.layers.28.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
272 |
+
"model.layers.29.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
273 |
+
"model.layers.29.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
274 |
+
"model.layers.29.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
275 |
+
"model.layers.29.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
276 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
277 |
+
"model.layers.29.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
278 |
+
"model.layers.29.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
279 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
280 |
+
"model.layers.29.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
281 |
+
"model.layers.29.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
282 |
+
"model.layers.29.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
283 |
+
"model.layers.29.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
284 |
+
"model.layers.3.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
285 |
+
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
286 |
+
"model.layers.3.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
287 |
+
"model.layers.3.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
288 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
289 |
+
"model.layers.3.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
290 |
+
"model.layers.3.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
291 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
292 |
+
"model.layers.3.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
293 |
+
"model.layers.3.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
294 |
+
"model.layers.3.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
295 |
+
"model.layers.3.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
296 |
+
"model.layers.30.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
297 |
+
"model.layers.30.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
298 |
+
"model.layers.30.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
299 |
+
"model.layers.30.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
300 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
301 |
+
"model.layers.30.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
302 |
+
"model.layers.30.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
303 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
304 |
+
"model.layers.30.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
305 |
+
"model.layers.30.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
306 |
+
"model.layers.30.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
307 |
+
"model.layers.30.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
308 |
+
"model.layers.31.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
309 |
+
"model.layers.31.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
310 |
+
"model.layers.31.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
311 |
+
"model.layers.31.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
312 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
313 |
+
"model.layers.31.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
314 |
+
"model.layers.31.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
315 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
316 |
+
"model.layers.31.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
317 |
+
"model.layers.31.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
318 |
+
"model.layers.31.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
319 |
+
"model.layers.31.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
320 |
+
"model.layers.32.input_layernorm.weight": "model-00004-of-00006.safetensors",
|
321 |
+
"model.layers.32.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
|
322 |
+
"model.layers.32.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
|
323 |
+
"model.layers.32.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
|
324 |
+
"model.layers.32.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
|
325 |
+
"model.layers.32.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
326 |
+
"model.layers.32.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
327 |
+
"model.layers.32.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
328 |
+
"model.layers.32.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
329 |
+
"model.layers.32.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
330 |
+
"model.layers.32.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
331 |
+
"model.layers.32.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
332 |
+
"model.layers.33.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
333 |
+
"model.layers.33.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
334 |
+
"model.layers.33.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
335 |
+
"model.layers.33.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
336 |
+
"model.layers.33.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
337 |
+
"model.layers.33.self_attn.k_proj.bias": "model-00004-of-00006.safetensors",
|
338 |
+
"model.layers.33.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
|
339 |
+
"model.layers.33.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
|
340 |
+
"model.layers.33.self_attn.q_proj.bias": "model-00004-of-00006.safetensors",
|
341 |
+
"model.layers.33.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
|
342 |
+
"model.layers.33.self_attn.v_proj.bias": "model-00004-of-00006.safetensors",
|
343 |
+
"model.layers.33.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
|
344 |
+
"model.layers.34.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
345 |
+
"model.layers.34.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
346 |
+
"model.layers.34.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
347 |
+
"model.layers.34.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
348 |
+
"model.layers.34.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
349 |
+
"model.layers.34.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
350 |
+
"model.layers.34.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
351 |
+
"model.layers.34.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
352 |
+
"model.layers.34.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
353 |
+
"model.layers.34.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
354 |
+
"model.layers.34.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
355 |
+
"model.layers.34.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
356 |
+
"model.layers.35.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
357 |
+
"model.layers.35.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
358 |
+
"model.layers.35.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
359 |
+
"model.layers.35.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
360 |
+
"model.layers.35.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
361 |
+
"model.layers.35.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
362 |
+
"model.layers.35.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
363 |
+
"model.layers.35.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
364 |
+
"model.layers.35.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
365 |
+
"model.layers.35.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
366 |
+
"model.layers.35.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
367 |
+
"model.layers.35.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
368 |
+
"model.layers.36.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
369 |
+
"model.layers.36.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
370 |
+
"model.layers.36.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
371 |
+
"model.layers.36.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
372 |
+
"model.layers.36.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
373 |
+
"model.layers.36.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
374 |
+
"model.layers.36.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
375 |
+
"model.layers.36.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
376 |
+
"model.layers.36.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
377 |
+
"model.layers.36.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
378 |
+
"model.layers.36.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
379 |
+
"model.layers.36.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
380 |
+
"model.layers.37.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
381 |
+
"model.layers.37.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
382 |
+
"model.layers.37.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
383 |
+
"model.layers.37.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
384 |
+
"model.layers.37.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
385 |
+
"model.layers.37.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
386 |
+
"model.layers.37.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
387 |
+
"model.layers.37.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
388 |
+
"model.layers.37.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
389 |
+
"model.layers.37.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
390 |
+
"model.layers.37.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
391 |
+
"model.layers.37.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
392 |
+
"model.layers.38.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
393 |
+
"model.layers.38.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
394 |
+
"model.layers.38.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
395 |
+
"model.layers.38.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
396 |
+
"model.layers.38.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
397 |
+
"model.layers.38.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
398 |
+
"model.layers.38.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
399 |
+
"model.layers.38.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
400 |
+
"model.layers.38.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
401 |
+
"model.layers.38.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
402 |
+
"model.layers.38.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
403 |
+
"model.layers.38.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
404 |
+
"model.layers.39.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
405 |
+
"model.layers.39.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
406 |
+
"model.layers.39.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
407 |
+
"model.layers.39.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
408 |
+
"model.layers.39.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
409 |
+
"model.layers.39.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
410 |
+
"model.layers.39.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
411 |
+
"model.layers.39.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
412 |
+
"model.layers.39.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
413 |
+
"model.layers.39.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
414 |
+
"model.layers.39.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
415 |
+
"model.layers.39.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
416 |
+
"model.layers.4.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
417 |
+
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
418 |
+
"model.layers.4.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
419 |
+
"model.layers.4.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
420 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
421 |
+
"model.layers.4.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
422 |
+
"model.layers.4.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
423 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
424 |
+
"model.layers.4.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
425 |
+
"model.layers.4.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
426 |
+
"model.layers.4.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
427 |
+
"model.layers.4.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
428 |
+
"model.layers.40.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
429 |
+
"model.layers.40.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
430 |
+
"model.layers.40.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
431 |
+
"model.layers.40.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
432 |
+
"model.layers.40.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
433 |
+
"model.layers.40.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
434 |
+
"model.layers.40.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
435 |
+
"model.layers.40.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
436 |
+
"model.layers.40.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
437 |
+
"model.layers.40.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
438 |
+
"model.layers.40.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
439 |
+
"model.layers.40.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
440 |
+
"model.layers.41.input_layernorm.weight": "model-00005-of-00006.safetensors",
|
441 |
+
"model.layers.41.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
|
442 |
+
"model.layers.41.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
|
443 |
+
"model.layers.41.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
|
444 |
+
"model.layers.41.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
|
445 |
+
"model.layers.41.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
446 |
+
"model.layers.41.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
447 |
+
"model.layers.41.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
448 |
+
"model.layers.41.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
449 |
+
"model.layers.41.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
450 |
+
"model.layers.41.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
451 |
+
"model.layers.41.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
452 |
+
"model.layers.42.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
453 |
+
"model.layers.42.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
454 |
+
"model.layers.42.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
455 |
+
"model.layers.42.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
456 |
+
"model.layers.42.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
457 |
+
"model.layers.42.self_attn.k_proj.bias": "model-00005-of-00006.safetensors",
|
458 |
+
"model.layers.42.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
|
459 |
+
"model.layers.42.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
|
460 |
+
"model.layers.42.self_attn.q_proj.bias": "model-00005-of-00006.safetensors",
|
461 |
+
"model.layers.42.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
|
462 |
+
"model.layers.42.self_attn.v_proj.bias": "model-00005-of-00006.safetensors",
|
463 |
+
"model.layers.42.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
|
464 |
+
"model.layers.43.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
465 |
+
"model.layers.43.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
466 |
+
"model.layers.43.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
467 |
+
"model.layers.43.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
468 |
+
"model.layers.43.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
469 |
+
"model.layers.43.self_attn.k_proj.bias": "model-00006-of-00006.safetensors",
|
470 |
+
"model.layers.43.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
471 |
+
"model.layers.43.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
472 |
+
"model.layers.43.self_attn.q_proj.bias": "model-00006-of-00006.safetensors",
|
473 |
+
"model.layers.43.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
474 |
+
"model.layers.43.self_attn.v_proj.bias": "model-00006-of-00006.safetensors",
|
475 |
+
"model.layers.43.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
476 |
+
"model.layers.44.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
477 |
+
"model.layers.44.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
478 |
+
"model.layers.44.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
479 |
+
"model.layers.44.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
480 |
+
"model.layers.44.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
481 |
+
"model.layers.44.self_attn.k_proj.bias": "model-00006-of-00006.safetensors",
|
482 |
+
"model.layers.44.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
483 |
+
"model.layers.44.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
484 |
+
"model.layers.44.self_attn.q_proj.bias": "model-00006-of-00006.safetensors",
|
485 |
+
"model.layers.44.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
486 |
+
"model.layers.44.self_attn.v_proj.bias": "model-00006-of-00006.safetensors",
|
487 |
+
"model.layers.44.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
488 |
+
"model.layers.45.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
489 |
+
"model.layers.45.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
490 |
+
"model.layers.45.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
491 |
+
"model.layers.45.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
492 |
+
"model.layers.45.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
493 |
+
"model.layers.45.self_attn.k_proj.bias": "model-00006-of-00006.safetensors",
|
494 |
+
"model.layers.45.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
495 |
+
"model.layers.45.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
496 |
+
"model.layers.45.self_attn.q_proj.bias": "model-00006-of-00006.safetensors",
|
497 |
+
"model.layers.45.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
498 |
+
"model.layers.45.self_attn.v_proj.bias": "model-00006-of-00006.safetensors",
|
499 |
+
"model.layers.45.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
500 |
+
"model.layers.46.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
501 |
+
"model.layers.46.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
502 |
+
"model.layers.46.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
503 |
+
"model.layers.46.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
504 |
+
"model.layers.46.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
505 |
+
"model.layers.46.self_attn.k_proj.bias": "model-00006-of-00006.safetensors",
|
506 |
+
"model.layers.46.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
507 |
+
"model.layers.46.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
508 |
+
"model.layers.46.self_attn.q_proj.bias": "model-00006-of-00006.safetensors",
|
509 |
+
"model.layers.46.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
510 |
+
"model.layers.46.self_attn.v_proj.bias": "model-00006-of-00006.safetensors",
|
511 |
+
"model.layers.46.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
512 |
+
"model.layers.47.input_layernorm.weight": "model-00006-of-00006.safetensors",
|
513 |
+
"model.layers.47.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
|
514 |
+
"model.layers.47.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
|
515 |
+
"model.layers.47.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
|
516 |
+
"model.layers.47.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
|
517 |
+
"model.layers.47.self_attn.k_proj.bias": "model-00006-of-00006.safetensors",
|
518 |
+
"model.layers.47.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
|
519 |
+
"model.layers.47.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
|
520 |
+
"model.layers.47.self_attn.q_proj.bias": "model-00006-of-00006.safetensors",
|
521 |
+
"model.layers.47.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
|
522 |
+
"model.layers.47.self_attn.v_proj.bias": "model-00006-of-00006.safetensors",
|
523 |
+
"model.layers.47.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
|
524 |
+
"model.layers.5.input_layernorm.weight": "model-00001-of-00006.safetensors",
|
525 |
+
"model.layers.5.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
|
526 |
+
"model.layers.5.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
|
527 |
+
"model.layers.5.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
|
528 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
|
529 |
+
"model.layers.5.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
530 |
+
"model.layers.5.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
531 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
532 |
+
"model.layers.5.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
533 |
+
"model.layers.5.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
534 |
+
"model.layers.5.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
535 |
+
"model.layers.5.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
536 |
+
"model.layers.6.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
537 |
+
"model.layers.6.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
538 |
+
"model.layers.6.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
539 |
+
"model.layers.6.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
540 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
541 |
+
"model.layers.6.self_attn.k_proj.bias": "model-00001-of-00006.safetensors",
|
542 |
+
"model.layers.6.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
|
543 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
|
544 |
+
"model.layers.6.self_attn.q_proj.bias": "model-00001-of-00006.safetensors",
|
545 |
+
"model.layers.6.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
|
546 |
+
"model.layers.6.self_attn.v_proj.bias": "model-00001-of-00006.safetensors",
|
547 |
+
"model.layers.6.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
|
548 |
+
"model.layers.7.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
549 |
+
"model.layers.7.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
550 |
+
"model.layers.7.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
551 |
+
"model.layers.7.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
552 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
553 |
+
"model.layers.7.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
554 |
+
"model.layers.7.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
555 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
556 |
+
"model.layers.7.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
557 |
+
"model.layers.7.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
558 |
+
"model.layers.7.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
559 |
+
"model.layers.7.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
560 |
+
"model.layers.8.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
561 |
+
"model.layers.8.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
562 |
+
"model.layers.8.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
563 |
+
"model.layers.8.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
564 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
565 |
+
"model.layers.8.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
566 |
+
"model.layers.8.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
567 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
568 |
+
"model.layers.8.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
569 |
+
"model.layers.8.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
570 |
+
"model.layers.8.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
571 |
+
"model.layers.8.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
572 |
+
"model.layers.9.input_layernorm.weight": "model-00002-of-00006.safetensors",
|
573 |
+
"model.layers.9.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
|
574 |
+
"model.layers.9.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
|
575 |
+
"model.layers.9.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
|
576 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
|
577 |
+
"model.layers.9.self_attn.k_proj.bias": "model-00002-of-00006.safetensors",
|
578 |
+
"model.layers.9.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
|
579 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
|
580 |
+
"model.layers.9.self_attn.q_proj.bias": "model-00002-of-00006.safetensors",
|
581 |
+
"model.layers.9.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
|
582 |
+
"model.layers.9.self_attn.v_proj.bias": "model-00002-of-00006.safetensors",
|
583 |
+
"model.layers.9.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
|
584 |
+
"model.norm.weight": "model-00006-of-00006.safetensors"
|
585 |
+
}
|
586 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<|begin▁of▁sentence|>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|end▁of▁sentence|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<|end▁of▁sentence|>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
}
|
23 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e20ddafc659ba90242154b55275402edeca0715e5dbb30f56815a4ce081f4893
|
3 |
+
size 11422778
|
tokenizer_config.json
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": null,
|
5 |
+
"added_tokens_decoder": {
|
6 |
+
"151643": {
|
7 |
+
"content": "<|end▁of▁sentence|>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false,
|
12 |
+
"special": true
|
13 |
+
},
|
14 |
+
"151644": {
|
15 |
+
"content": "<|User|>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false,
|
20 |
+
"special": false
|
21 |
+
},
|
22 |
+
"151645": {
|
23 |
+
"content": "<|Assistant|>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false,
|
28 |
+
"special": false
|
29 |
+
},
|
30 |
+
"151646": {
|
31 |
+
"content": "<|begin▁of▁sentence|>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false,
|
36 |
+
"special": true
|
37 |
+
},
|
38 |
+
"151647": {
|
39 |
+
"content": "<|EOT|>",
|
40 |
+
"lstrip": false,
|
41 |
+
"normalized": false,
|
42 |
+
"rstrip": false,
|
43 |
+
"single_word": false,
|
44 |
+
"special": false
|
45 |
+
},
|
46 |
+
"151648": {
|
47 |
+
"content": "<think>",
|
48 |
+
"lstrip": false,
|
49 |
+
"normalized": false,
|
50 |
+
"rstrip": false,
|
51 |
+
"single_word": false,
|
52 |
+
"special": false
|
53 |
+
},
|
54 |
+
"151649": {
|
55 |
+
"content": "</think>",
|
56 |
+
"lstrip": false,
|
57 |
+
"normalized": false,
|
58 |
+
"rstrip": false,
|
59 |
+
"single_word": false,
|
60 |
+
"special": false
|
61 |
+
},
|
62 |
+
"151650": {
|
63 |
+
"content": "<|quad_start|>",
|
64 |
+
"lstrip": false,
|
65 |
+
"normalized": false,
|
66 |
+
"rstrip": false,
|
67 |
+
"single_word": false,
|
68 |
+
"special": true
|
69 |
+
},
|
70 |
+
"151651": {
|
71 |
+
"content": "<|quad_end|>",
|
72 |
+
"lstrip": false,
|
73 |
+
"normalized": false,
|
74 |
+
"rstrip": false,
|
75 |
+
"single_word": false,
|
76 |
+
"special": true
|
77 |
+
},
|
78 |
+
"151652": {
|
79 |
+
"content": "<|vision_start|>",
|
80 |
+
"lstrip": false,
|
81 |
+
"normalized": false,
|
82 |
+
"rstrip": false,
|
83 |
+
"single_word": false,
|
84 |
+
"special": true
|
85 |
+
},
|
86 |
+
"151653": {
|
87 |
+
"content": "<|vision_end|>",
|
88 |
+
"lstrip": false,
|
89 |
+
"normalized": false,
|
90 |
+
"rstrip": false,
|
91 |
+
"single_word": false,
|
92 |
+
"special": true
|
93 |
+
},
|
94 |
+
"151654": {
|
95 |
+
"content": "<|vision_pad|>",
|
96 |
+
"lstrip": false,
|
97 |
+
"normalized": false,
|
98 |
+
"rstrip": false,
|
99 |
+
"single_word": false,
|
100 |
+
"special": true
|
101 |
+
},
|
102 |
+
"151655": {
|
103 |
+
"content": "<|image_pad|>",
|
104 |
+
"lstrip": false,
|
105 |
+
"normalized": false,
|
106 |
+
"rstrip": false,
|
107 |
+
"single_word": false,
|
108 |
+
"special": true
|
109 |
+
},
|
110 |
+
"151656": {
|
111 |
+
"content": "<|video_pad|>",
|
112 |
+
"lstrip": false,
|
113 |
+
"normalized": false,
|
114 |
+
"rstrip": false,
|
115 |
+
"single_word": false,
|
116 |
+
"special": true
|
117 |
+
},
|
118 |
+
"151657": {
|
119 |
+
"content": "<tool_call>",
|
120 |
+
"lstrip": false,
|
121 |
+
"normalized": false,
|
122 |
+
"rstrip": false,
|
123 |
+
"single_word": false,
|
124 |
+
"special": false
|
125 |
+
},
|
126 |
+
"151658": {
|
127 |
+
"content": "</tool_call>",
|
128 |
+
"lstrip": false,
|
129 |
+
"normalized": false,
|
130 |
+
"rstrip": false,
|
131 |
+
"single_word": false,
|
132 |
+
"special": false
|
133 |
+
},
|
134 |
+
"151659": {
|
135 |
+
"content": "<|fim_prefix|>",
|
136 |
+
"lstrip": false,
|
137 |
+
"normalized": false,
|
138 |
+
"rstrip": false,
|
139 |
+
"single_word": false,
|
140 |
+
"special": false
|
141 |
+
},
|
142 |
+
"151660": {
|
143 |
+
"content": "<|fim_middle|>",
|
144 |
+
"lstrip": false,
|
145 |
+
"normalized": false,
|
146 |
+
"rstrip": false,
|
147 |
+
"single_word": false,
|
148 |
+
"special": false
|
149 |
+
},
|
150 |
+
"151661": {
|
151 |
+
"content": "<|fim_suffix|>",
|
152 |
+
"lstrip": false,
|
153 |
+
"normalized": false,
|
154 |
+
"rstrip": false,
|
155 |
+
"single_word": false,
|
156 |
+
"special": false
|
157 |
+
},
|
158 |
+
"151662": {
|
159 |
+
"content": "<|fim_pad|>",
|
160 |
+
"lstrip": false,
|
161 |
+
"normalized": false,
|
162 |
+
"rstrip": false,
|
163 |
+
"single_word": false,
|
164 |
+
"special": false
|
165 |
+
},
|
166 |
+
"151663": {
|
167 |
+
"content": "<|repo_name|>",
|
168 |
+
"lstrip": false,
|
169 |
+
"normalized": false,
|
170 |
+
"rstrip": false,
|
171 |
+
"single_word": false,
|
172 |
+
"special": false
|
173 |
+
},
|
174 |
+
"151664": {
|
175 |
+
"content": "<|file_sep|>",
|
176 |
+
"lstrip": false,
|
177 |
+
"normalized": false,
|
178 |
+
"rstrip": false,
|
179 |
+
"single_word": false,
|
180 |
+
"special": false
|
181 |
+
}
|
182 |
+
},
|
183 |
+
"bos_token": "<|begin▁of▁sentence|>",
|
184 |
+
"chat_template": "{% for message in messages %}\n{% if message['role'] == 'user' %}\n{{ '<|user|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'system' %}\n{{ '<|system|>\n' + message['content'] + eos_token }}\n{% elif message['role'] == 'assistant' %}\n{{ '<|assistant|>\n' + message['content'] + eos_token }}\n{% endif %}\n{% if loop.last and add_generation_prompt %}\n{{ '<|assistant|>' }}\n{% endif %}\n{% endfor %}",
|
185 |
+
"clean_up_tokenization_spaces": false,
|
186 |
+
"eos_token": "<|end▁of▁sentence|>",
|
187 |
+
"extra_special_tokens": {},
|
188 |
+
"legacy": true,
|
189 |
+
"model_max_length": 16384,
|
190 |
+
"pad_token": "<|end▁of▁sentence|>",
|
191 |
+
"padding_side": "left",
|
192 |
+
"sp_model_kwargs": {},
|
193 |
+
"tokenizer_class": "LlamaTokenizer",
|
194 |
+
"unk_token": null,
|
195 |
+
"use_default_system_prompt": false
|
196 |
+
}
|
trainer_state.json
ADDED
@@ -0,0 +1,753 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 0.39603960396039606,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 40,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"clip_ratio": 0.0,
|
13 |
+
"completion_length": 9300.9375,
|
14 |
+
"epoch": 0.009900990099009901,
|
15 |
+
"grad_norm": 0.2749840021133423,
|
16 |
+
"kl": 0.0,
|
17 |
+
"learning_rate": 3.999032564583976e-06,
|
18 |
+
"loss": 0.009333692491054535,
|
19 |
+
"max_completion_length": 14084.125,
|
20 |
+
"min_completion_length": 5729.875,
|
21 |
+
"num_updates": 1,
|
22 |
+
"rewards": 1.173762883991003,
|
23 |
+
"rewards/cosine_scaled_reward": 0.27115931920707226,
|
24 |
+
"rewards/format_reward2": 0.8515625,
|
25 |
+
"rewards/len_reward": 0.051041055703535676,
|
26 |
+
"rewards_std": 0.5518537946045399,
|
27 |
+
"step": 1
|
28 |
+
},
|
29 |
+
{
|
30 |
+
"clip_ratio": 0.0,
|
31 |
+
"completion_length": 9752.296875,
|
32 |
+
"epoch": 0.019801980198019802,
|
33 |
+
"grad_norm": 0.23711691796779633,
|
34 |
+
"kl": 0.0007762908935546875,
|
35 |
+
"learning_rate": 3.996131194267188e-06,
|
36 |
+
"loss": 0.016636773943901062,
|
37 |
+
"max_completion_length": 14506.25,
|
38 |
+
"min_completion_length": 3615.875,
|
39 |
+
"num_updates": 2,
|
40 |
+
"rewards": 1.011244721710682,
|
41 |
+
"rewards/cosine_scaled_reward": 0.1618131911382079,
|
42 |
+
"rewards/format_reward2": 0.8203125,
|
43 |
+
"rewards/len_reward": 0.02911903988569975,
|
44 |
+
"rewards_std": 0.6834513954818249,
|
45 |
+
"step": 2
|
46 |
+
},
|
47 |
+
{
|
48 |
+
"clip_ratio": 0.0,
|
49 |
+
"completion_length": 10513.359375,
|
50 |
+
"epoch": 0.0297029702970297,
|
51 |
+
"grad_norm": 0.26973867416381836,
|
52 |
+
"kl": 0.0009961128234863281,
|
53 |
+
"learning_rate": 3.9912986959380376e-06,
|
54 |
+
"loss": -0.002310425043106079,
|
55 |
+
"max_completion_length": 14084.875,
|
56 |
+
"min_completion_length": 5952.75,
|
57 |
+
"num_updates": 3,
|
58 |
+
"rewards": 0.8836403228342533,
|
59 |
+
"rewards/cosine_scaled_reward": 0.06623293040320277,
|
60 |
+
"rewards/format_reward2": 0.84375,
|
61 |
+
"rewards/len_reward": -0.026342609897255898,
|
62 |
+
"rewards_std": 0.590987540781498,
|
63 |
+
"step": 3
|
64 |
+
},
|
65 |
+
{
|
66 |
+
"clip_ratio": 0.0,
|
67 |
+
"completion_length": 10638.6484375,
|
68 |
+
"epoch": 0.039603960396039604,
|
69 |
+
"grad_norm": 0.3450890779495239,
|
70 |
+
"kl": 0.0011034011840820312,
|
71 |
+
"learning_rate": 3.9845397447265526e-06,
|
72 |
+
"loss": 2.3186206817626953e-05,
|
73 |
+
"max_completion_length": 15636.125,
|
74 |
+
"min_completion_length": 6815.75,
|
75 |
+
"num_updates": 4,
|
76 |
+
"rewards": 0.8896834207698703,
|
77 |
+
"rewards/cosine_scaled_reward": 0.17461357091087848,
|
78 |
+
"rewards/format_reward2": 0.7109375,
|
79 |
+
"rewards/len_reward": 0.004132358357310295,
|
80 |
+
"rewards_std": 0.6534126400947571,
|
81 |
+
"step": 4
|
82 |
+
},
|
83 |
+
{
|
84 |
+
"clip_ratio": 0.0,
|
85 |
+
"completion_length": 9484.03125,
|
86 |
+
"epoch": 0.04950495049504951,
|
87 |
+
"grad_norm": 0.245803564786911,
|
88 |
+
"kl": 0.0010962486267089844,
|
89 |
+
"learning_rate": 3.975860879481513e-06,
|
90 |
+
"loss": -0.025934472680091858,
|
91 |
+
"max_completion_length": 14890.25,
|
92 |
+
"min_completion_length": 5349.375,
|
93 |
+
"num_updates": 5,
|
94 |
+
"rewards": 0.9708382207900286,
|
95 |
+
"rewards/cosine_scaled_reward": 0.10498641454614699,
|
96 |
+
"rewards/format_reward2": 0.859375,
|
97 |
+
"rewards/len_reward": 0.0064767999574542046,
|
98 |
+
"rewards_std": 0.655558355152607,
|
99 |
+
"step": 5
|
100 |
+
},
|
101 |
+
{
|
102 |
+
"clip_ratio": 0.0,
|
103 |
+
"completion_length": 9448.5859375,
|
104 |
+
"epoch": 0.0594059405940594,
|
105 |
+
"grad_norm": 0.24996301531791687,
|
106 |
+
"kl": 0.0013685226440429688,
|
107 |
+
"learning_rate": 3.965270496444528e-06,
|
108 |
+
"loss": 0.005861759185791016,
|
109 |
+
"max_completion_length": 15323.625,
|
110 |
+
"min_completion_length": 3290.125,
|
111 |
+
"num_updates": 6,
|
112 |
+
"rewards": 0.9613782716915011,
|
113 |
+
"rewards/cosine_scaled_reward": 0.2207801272161305,
|
114 |
+
"rewards/format_reward2": 0.7734375,
|
115 |
+
"rewards/len_reward": -0.03283937182277441,
|
116 |
+
"rewards_std": 0.8270582258701324,
|
117 |
+
"step": 6
|
118 |
+
},
|
119 |
+
{
|
120 |
+
"clip_ratio": 0.0,
|
121 |
+
"completion_length": 9011.703125,
|
122 |
+
"epoch": 0.06930693069306931,
|
123 |
+
"grad_norm": 0.24825839698314667,
|
124 |
+
"kl": 0.0017271041870117188,
|
125 |
+
"learning_rate": 3.952778841127214e-06,
|
126 |
+
"loss": -0.010295629501342773,
|
127 |
+
"max_completion_length": 12310.875,
|
128 |
+
"min_completion_length": 4909.25,
|
129 |
+
"num_updates": 7,
|
130 |
+
"rewards": 1.1428990792483091,
|
131 |
+
"rewards/cosine_scaled_reward": 0.24160153639968485,
|
132 |
+
"rewards/format_reward2": 0.8515625,
|
133 |
+
"rewards/len_reward": 0.04973505577072501,
|
134 |
+
"rewards_std": 0.5509255714714527,
|
135 |
+
"step": 7
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"clip_ratio": 0.0,
|
139 |
+
"completion_length": 11187.453125,
|
140 |
+
"epoch": 0.07920792079207921,
|
141 |
+
"grad_norm": 0.2318185567855835,
|
142 |
+
"kl": 0.0022907257080078125,
|
143 |
+
"learning_rate": 3.938397998399332e-06,
|
144 |
+
"loss": 0.007296696305274963,
|
145 |
+
"max_completion_length": 14553.875,
|
146 |
+
"min_completion_length": 4561.375,
|
147 |
+
"num_updates": 8,
|
148 |
+
"rewards": 0.8727323254570365,
|
149 |
+
"rewards/cosine_scaled_reward": 0.09352816140744835,
|
150 |
+
"rewards/format_reward2": 0.796875,
|
151 |
+
"rewards/len_reward": -0.01767082791775465,
|
152 |
+
"rewards_std": 0.6038715615868568,
|
153 |
+
"step": 8
|
154 |
+
},
|
155 |
+
{
|
156 |
+
"clip_ratio": 0.0,
|
157 |
+
"completion_length": 10907.1484375,
|
158 |
+
"epoch": 0.0891089108910891,
|
159 |
+
"grad_norm": 0.23230598866939545,
|
160 |
+
"kl": 0.002445220947265625,
|
161 |
+
"learning_rate": 3.922141880797449e-06,
|
162 |
+
"loss": 0.016454651951789856,
|
163 |
+
"max_completion_length": 15823.125,
|
164 |
+
"min_completion_length": 4670.375,
|
165 |
+
"num_updates": 9,
|
166 |
+
"rewards": 0.8584917988628149,
|
167 |
+
"rewards/cosine_scaled_reward": 0.12224693153984845,
|
168 |
+
"rewards/format_reward2": 0.7421875,
|
169 |
+
"rewards/len_reward": -0.0059426589868962765,
|
170 |
+
"rewards_std": 0.7407274544239044,
|
171 |
+
"step": 9
|
172 |
+
},
|
173 |
+
{
|
174 |
+
"clip_ratio": 0.0,
|
175 |
+
"completion_length": 10617.234375,
|
176 |
+
"epoch": 0.09900990099009901,
|
177 |
+
"grad_norm": 0.3195263147354126,
|
178 |
+
"kl": 0.0034656524658203125,
|
179 |
+
"learning_rate": 3.90402621506546e-06,
|
180 |
+
"loss": 0.022236675024032593,
|
181 |
+
"max_completion_length": 14234.125,
|
182 |
+
"min_completion_length": 6616.625,
|
183 |
+
"num_updates": 10,
|
184 |
+
"rewards": 0.9227555003017187,
|
185 |
+
"rewards/cosine_scaled_reward": 0.16829395852982998,
|
186 |
+
"rewards/format_reward2": 0.765625,
|
187 |
+
"rewards/len_reward": -0.011163473129272461,
|
188 |
+
"rewards_std": 0.5515045262873173,
|
189 |
+
"step": 10
|
190 |
+
},
|
191 |
+
{
|
192 |
+
"clip_ratio": 0.0,
|
193 |
+
"completion_length": 11003.5703125,
|
194 |
+
"epoch": 0.10891089108910891,
|
195 |
+
"grad_norm": 0.22265592217445374,
|
196 |
+
"kl": 0.0044879913330078125,
|
197 |
+
"learning_rate": 3.884068526939978e-06,
|
198 |
+
"loss": -0.013431079685688019,
|
199 |
+
"max_completion_length": 14716.25,
|
200 |
+
"min_completion_length": 5951.375,
|
201 |
+
"num_updates": 11,
|
202 |
+
"rewards": 0.8861873494461179,
|
203 |
+
"rewards/cosine_scaled_reward": 0.16878368379548192,
|
204 |
+
"rewards/format_reward2": 0.765625,
|
205 |
+
"rewards/len_reward": -0.04822135902941227,
|
206 |
+
"rewards_std": 0.5935308411717415,
|
207 |
+
"step": 11
|
208 |
+
},
|
209 |
+
{
|
210 |
+
"clip_ratio": 0.0,
|
211 |
+
"completion_length": 7835.3984375,
|
212 |
+
"epoch": 0.1188118811881188,
|
213 |
+
"grad_norm": 0.3398093581199646,
|
214 |
+
"kl": 0.0051021575927734375,
|
215 |
+
"learning_rate": 3.862288124195319e-06,
|
216 |
+
"loss": -0.013615414500236511,
|
217 |
+
"max_completion_length": 13709.5,
|
218 |
+
"min_completion_length": 2604.5,
|
219 |
+
"num_updates": 12,
|
220 |
+
"rewards": 1.274961642920971,
|
221 |
+
"rewards/cosine_scaled_reward": 0.32682749163359404,
|
222 |
+
"rewards/format_reward2": 0.890625,
|
223 |
+
"rewards/len_reward": 0.0575091321952641,
|
224 |
+
"rewards_std": 0.7341729030013084,
|
225 |
+
"step": 12
|
226 |
+
},
|
227 |
+
{
|
228 |
+
"clip_ratio": 0.0,
|
229 |
+
"completion_length": 9435.609375,
|
230 |
+
"epoch": 0.12871287128712872,
|
231 |
+
"grad_norm": 0.2820684313774109,
|
232 |
+
"kl": 0.006267547607421875,
|
233 |
+
"learning_rate": 3.8387060779644725e-06,
|
234 |
+
"loss": 0.015070796012878418,
|
235 |
+
"max_completion_length": 13926.75,
|
236 |
+
"min_completion_length": 3093.375,
|
237 |
+
"num_updates": 13,
|
238 |
+
"rewards": 0.9852710571140051,
|
239 |
+
"rewards/cosine_scaled_reward": 0.22535304143093526,
|
240 |
+
"rewards/format_reward2": 0.7578125,
|
241 |
+
"rewards/len_reward": 0.0021055126562714577,
|
242 |
+
"rewards_std": 0.7060699462890625,
|
243 |
+
"step": 13
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"clip_ratio": 0.0,
|
247 |
+
"completion_length": 6023.7421875,
|
248 |
+
"epoch": 0.13861386138613863,
|
249 |
+
"grad_norm": 0.3811286985874176,
|
250 |
+
"kl": 0.006252288818359375,
|
251 |
+
"learning_rate": 3.8133452023541447e-06,
|
252 |
+
"loss": 0.032392144203186035,
|
253 |
+
"max_completion_length": 15730.75,
|
254 |
+
"min_completion_length": 1983.375,
|
255 |
+
"num_updates": 14,
|
256 |
+
"rewards": 1.5124556943774223,
|
257 |
+
"rewards/cosine_scaled_reward": 0.5594989098608494,
|
258 |
+
"rewards/format_reward2": 0.875,
|
259 |
+
"rewards/len_reward": 0.07795678498223424,
|
260 |
+
"rewards_std": 0.7117869555950165,
|
261 |
+
"step": 14
|
262 |
+
},
|
263 |
+
{
|
264 |
+
"clip_ratio": 0.0,
|
265 |
+
"completion_length": 9897.4609375,
|
266 |
+
"epoch": 0.1485148514851485,
|
267 |
+
"grad_norm": 0.2323319911956787,
|
268 |
+
"kl": 0.006938934326171875,
|
269 |
+
"learning_rate": 3.786230032373583e-06,
|
270 |
+
"loss": -0.02542346715927124,
|
271 |
+
"max_completion_length": 14731.125,
|
272 |
+
"min_completion_length": 4343.625,
|
273 |
+
"num_updates": 15,
|
274 |
+
"rewards": 1.046268306672573,
|
275 |
+
"rewards/cosine_scaled_reward": 0.24649553978815675,
|
276 |
+
"rewards/format_reward2": 0.7890625,
|
277 |
+
"rewards/len_reward": 0.010710292495787144,
|
278 |
+
"rewards_std": 0.6413916498422623,
|
279 |
+
"step": 15
|
280 |
+
},
|
281 |
+
{
|
282 |
+
"clip_ratio": 0.0,
|
283 |
+
"completion_length": 8641.328125,
|
284 |
+
"epoch": 0.15841584158415842,
|
285 |
+
"grad_norm": 0.2797869145870209,
|
286 |
+
"kl": 0.009868621826171875,
|
287 |
+
"learning_rate": 3.7573868001985375e-06,
|
288 |
+
"loss": 0.00245087593793869,
|
289 |
+
"max_completion_length": 14046.0,
|
290 |
+
"min_completion_length": 2590.0,
|
291 |
+
"num_updates": 16,
|
292 |
+
"rewards": 1.0253378190100193,
|
293 |
+
"rewards/cosine_scaled_reward": 0.18167185690253973,
|
294 |
+
"rewards/format_reward2": 0.8515625,
|
295 |
+
"rewards/len_reward": -0.007896540686488152,
|
296 |
+
"rewards_std": 0.7439497336745262,
|
297 |
+
"step": 16
|
298 |
+
},
|
299 |
+
{
|
300 |
+
"clip_ratio": 0.0,
|
301 |
+
"completion_length": 9286.7734375,
|
302 |
+
"epoch": 0.16831683168316833,
|
303 |
+
"grad_norm": 0.2538006007671356,
|
304 |
+
"kl": 0.009235382080078125,
|
305 |
+
"learning_rate": 3.7268434097933267e-06,
|
306 |
+
"loss": 0.012023478746414185,
|
307 |
+
"max_completion_length": 14357.0,
|
308 |
+
"min_completion_length": 4187.625,
|
309 |
+
"num_updates": 17,
|
310 |
+
"rewards": 1.116831500083208,
|
311 |
+
"rewards/cosine_scaled_reward": 0.26869785273447633,
|
312 |
+
"rewards/format_reward2": 0.8046875,
|
313 |
+
"rewards/len_reward": 0.04344612918794155,
|
314 |
+
"rewards_std": 0.6232936978340149,
|
315 |
+
"step": 17
|
316 |
+
},
|
317 |
+
{
|
318 |
+
"clip_ratio": 0.0,
|
319 |
+
"completion_length": 7877.734375,
|
320 |
+
"epoch": 0.1782178217821782,
|
321 |
+
"grad_norm": 0.27215102314949036,
|
322 |
+
"kl": 0.01183319091796875,
|
323 |
+
"learning_rate": 3.6946294099155545e-06,
|
324 |
+
"loss": 0.00474470853805542,
|
325 |
+
"max_completion_length": 14090.375,
|
326 |
+
"min_completion_length": 2752.125,
|
327 |
+
"num_updates": 18,
|
328 |
+
"rewards": 1.222687341272831,
|
329 |
+
"rewards/cosine_scaled_reward": 0.3153993431478739,
|
330 |
+
"rewards/format_reward2": 0.875,
|
331 |
+
"rewards/len_reward": 0.032287961803376675,
|
332 |
+
"rewards_std": 0.7518719509243965,
|
333 |
+
"step": 18
|
334 |
+
},
|
335 |
+
{
|
336 |
+
"clip_ratio": 0.0,
|
337 |
+
"completion_length": 7099.703125,
|
338 |
+
"epoch": 0.18811881188118812,
|
339 |
+
"grad_norm": 0.3579545319080353,
|
340 |
+
"kl": 0.013427734375,
|
341 |
+
"learning_rate": 3.6607759655295948e-06,
|
342 |
+
"loss": 0.01689109206199646,
|
343 |
+
"max_completion_length": 14201.875,
|
344 |
+
"min_completion_length": 1985.625,
|
345 |
+
"num_updates": 19,
|
346 |
+
"rewards": 1.2932276129722595,
|
347 |
+
"rewards/cosine_scaled_reward": 0.3619839735329151,
|
348 |
+
"rewards/format_reward2": 0.8515625,
|
349 |
+
"rewards/len_reward": 0.07968113431707025,
|
350 |
+
"rewards_std": 0.7946057394146919,
|
351 |
+
"step": 19
|
352 |
+
},
|
353 |
+
{
|
354 |
+
"clip_ratio": 0.0,
|
355 |
+
"completion_length": 7809.1328125,
|
356 |
+
"epoch": 0.19801980198019803,
|
357 |
+
"grad_norm": 0.3970443904399872,
|
358 |
+
"kl": 0.0154876708984375,
|
359 |
+
"learning_rate": 3.6253158276565003e-06,
|
360 |
+
"loss": 0.013616234064102173,
|
361 |
+
"max_completion_length": 13511.875,
|
362 |
+
"min_completion_length": 1854.125,
|
363 |
+
"num_updates": 20,
|
364 |
+
"rewards": 1.3438544012606144,
|
365 |
+
"rewards/cosine_scaled_reward": 0.41305189533159137,
|
366 |
+
"rewards/format_reward2": 0.875,
|
367 |
+
"rewards/len_reward": 0.055802563671022654,
|
368 |
+
"rewards_std": 0.5804904215037823,
|
369 |
+
"step": 20
|
370 |
+
},
|
371 |
+
{
|
372 |
+
"clip_ratio": 0.0,
|
373 |
+
"completion_length": 9812.9296875,
|
374 |
+
"epoch": 0.2079207920792079,
|
375 |
+
"grad_norm": 0.5228389501571655,
|
376 |
+
"kl": 0.01609039306640625,
|
377 |
+
"learning_rate": 3.5882833016895067e-06,
|
378 |
+
"loss": -0.00042431801557540894,
|
379 |
+
"max_completion_length": 12778.25,
|
380 |
+
"min_completion_length": 4778.0,
|
381 |
+
"num_updates": 21,
|
382 |
+
"rewards": 1.136468593031168,
|
383 |
+
"rewards/cosine_scaled_reward": 0.18093573104124516,
|
384 |
+
"rewards/format_reward2": 0.875,
|
385 |
+
"rewards/len_reward": 0.08053285209462047,
|
386 |
+
"rewards_std": 0.5555343925952911,
|
387 |
+
"step": 21
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"clip_ratio": 0.0,
|
391 |
+
"completion_length": 10106.0,
|
392 |
+
"epoch": 0.21782178217821782,
|
393 |
+
"grad_norm": 0.3004865050315857,
|
394 |
+
"kl": 0.01863861083984375,
|
395 |
+
"learning_rate": 3.5497142142057796e-06,
|
396 |
+
"loss": 0.0011682212352752686,
|
397 |
+
"max_completion_length": 13495.75,
|
398 |
+
"min_completion_length": 5747.125,
|
399 |
+
"num_updates": 22,
|
400 |
+
"rewards": 1.1095520546659827,
|
401 |
+
"rewards/cosine_scaled_reward": 0.20947218214860186,
|
402 |
+
"rewards/format_reward2": 0.875,
|
403 |
+
"rewards/len_reward": 0.025079891085624695,
|
404 |
+
"rewards_std": 0.4830879457294941,
|
405 |
+
"step": 22
|
406 |
+
},
|
407 |
+
{
|
408 |
+
"clip_ratio": 0.0,
|
409 |
+
"completion_length": 8428.5078125,
|
410 |
+
"epoch": 0.22772277227722773,
|
411 |
+
"grad_norm": 0.36966538429260254,
|
412 |
+
"kl": 0.01552581787109375,
|
413 |
+
"learning_rate": 3.509645878306514e-06,
|
414 |
+
"loss": 0.0047097280621528625,
|
415 |
+
"max_completion_length": 14159.0,
|
416 |
+
"min_completion_length": 1964.5,
|
417 |
+
"num_updates": 23,
|
418 |
+
"rewards": 1.1670421473681927,
|
419 |
+
"rewards/cosine_scaled_reward": 0.29000907950103283,
|
420 |
+
"rewards/format_reward2": 0.8515625,
|
421 |
+
"rewards/len_reward": 0.025470565538853407,
|
422 |
+
"rewards_std": 0.615565050393343,
|
423 |
+
"step": 23
|
424 |
+
},
|
425 |
+
{
|
426 |
+
"clip_ratio": 0.0,
|
427 |
+
"completion_length": 5892.2109375,
|
428 |
+
"epoch": 0.2376237623762376,
|
429 |
+
"grad_norm": 125.0189208984375,
|
430 |
+
"kl": 0.43308258056640625,
|
431 |
+
"learning_rate": 3.4681170575189206e-06,
|
432 |
+
"loss": 0.00223734974861145,
|
433 |
+
"max_completion_length": 11146.375,
|
434 |
+
"min_completion_length": 1771.125,
|
435 |
+
"num_updates": 24,
|
436 |
+
"rewards": 1.4564557410776615,
|
437 |
+
"rewards/cosine_scaled_reward": 0.44786818977445364,
|
438 |
+
"rewards/format_reward2": 0.90625,
|
439 |
+
"rewards/len_reward": 0.10233754548244178,
|
440 |
+
"rewards_std": 0.6475037336349487,
|
441 |
+
"step": 24
|
442 |
+
},
|
443 |
+
{
|
444 |
+
"clip_ratio": 0.0,
|
445 |
+
"completion_length": 6293.140625,
|
446 |
+
"epoch": 0.24752475247524752,
|
447 |
+
"grad_norm": 0.4965859651565552,
|
448 |
+
"kl": 0.0188446044921875,
|
449 |
+
"learning_rate": 3.425167928295014e-06,
|
450 |
+
"loss": 0.019756004214286804,
|
451 |
+
"max_completion_length": 11885.375,
|
452 |
+
"min_completion_length": 2043.5,
|
453 |
+
"num_updates": 25,
|
454 |
+
"rewards": 1.2420116439461708,
|
455 |
+
"rewards/cosine_scaled_reward": 0.24037119653075933,
|
456 |
+
"rewards/format_reward2": 0.921875,
|
457 |
+
"rewards/len_reward": 0.07976543391123414,
|
458 |
+
"rewards_std": 0.768707849085331,
|
459 |
+
"step": 25
|
460 |
+
},
|
461 |
+
{
|
462 |
+
"clip_ratio": 0.0,
|
463 |
+
"completion_length": 7320.9765625,
|
464 |
+
"epoch": 0.25742574257425743,
|
465 |
+
"grad_norm": 0.32264769077301025,
|
466 |
+
"kl": 0.0201263427734375,
|
467 |
+
"learning_rate": 3.3808400411434935e-06,
|
468 |
+
"loss": 0.007990241050720215,
|
469 |
+
"max_completion_length": 14976.25,
|
470 |
+
"min_completion_length": 1978.0,
|
471 |
+
"num_updates": 26,
|
472 |
+
"rewards": 1.2049608379602432,
|
473 |
+
"rewards/cosine_scaled_reward": 0.328420914709568,
|
474 |
+
"rewards/format_reward2": 0.8671875,
|
475 |
+
"rewards/len_reward": 0.009352410677820444,
|
476 |
+
"rewards_std": 0.7654620930552483,
|
477 |
+
"step": 26
|
478 |
+
},
|
479 |
+
{
|
480 |
+
"clip_ratio": 0.0,
|
481 |
+
"completion_length": 5956.828125,
|
482 |
+
"epoch": 0.26732673267326734,
|
483 |
+
"grad_norm": 0.3196789026260376,
|
484 |
+
"kl": 0.0207061767578125,
|
485 |
+
"learning_rate": 3.335176280432307e-06,
|
486 |
+
"loss": -0.00398920476436615,
|
487 |
+
"max_completion_length": 10882.125,
|
488 |
+
"min_completion_length": 2554.375,
|
489 |
+
"num_updates": 27,
|
490 |
+
"rewards": 1.3529352433979511,
|
491 |
+
"rewards/cosine_scaled_reward": 0.30559817608445883,
|
492 |
+
"rewards/format_reward2": 0.9609375,
|
493 |
+
"rewards/len_reward": 0.08639959944412112,
|
494 |
+
"rewards_std": 0.7427709549665451,
|
495 |
+
"step": 27
|
496 |
+
},
|
497 |
+
{
|
498 |
+
"clip_ratio": 0.0,
|
499 |
+
"completion_length": 6028.84375,
|
500 |
+
"epoch": 0.27722772277227725,
|
501 |
+
"grad_norm": 0.3432248532772064,
|
502 |
+
"kl": 0.02164459228515625,
|
503 |
+
"learning_rate": 3.2882208229007955e-06,
|
504 |
+
"loss": -0.015418417751789093,
|
505 |
+
"max_completion_length": 11848.0,
|
506 |
+
"min_completion_length": 2110.75,
|
507 |
+
"num_updates": 28,
|
508 |
+
"rewards": 1.3594568185508251,
|
509 |
+
"rewards/cosine_scaled_reward": 0.35286577604711056,
|
510 |
+
"rewards/format_reward2": 0.90625,
|
511 |
+
"rewards/len_reward": 0.10034103039652109,
|
512 |
+
"rewards_std": 0.7156434431672096,
|
513 |
+
"step": 28
|
514 |
+
},
|
515 |
+
{
|
516 |
+
"clip_ratio": 0.0,
|
517 |
+
"completion_length": 8682.453125,
|
518 |
+
"epoch": 0.2871287128712871,
|
519 |
+
"grad_norm": 0.2364882528781891,
|
520 |
+
"kl": 0.024139404296875,
|
521 |
+
"learning_rate": 3.24001909492155e-06,
|
522 |
+
"loss": 0.0035642534494400024,
|
523 |
+
"max_completion_length": 13773.375,
|
524 |
+
"min_completion_length": 3882.25,
|
525 |
+
"num_updates": 29,
|
526 |
+
"rewards": 1.13150573708117,
|
527 |
+
"rewards/cosine_scaled_reward": 0.195555618731305,
|
528 |
+
"rewards/format_reward2": 0.9140625,
|
529 |
+
"rewards/len_reward": 0.021887621260248125,
|
530 |
+
"rewards_std": 0.6196031682193279,
|
531 |
+
"step": 29
|
532 |
+
},
|
533 |
+
{
|
534 |
+
"clip_ratio": 0.0,
|
535 |
+
"completion_length": 9472.0859375,
|
536 |
+
"epoch": 0.297029702970297,
|
537 |
+
"grad_norm": 0.23454353213310242,
|
538 |
+
"kl": 0.029876708984375,
|
539 |
+
"learning_rate": 3.190617728553332e-06,
|
540 |
+
"loss": 0.0017639100551605225,
|
541 |
+
"max_completion_length": 14098.75,
|
542 |
+
"min_completion_length": 4757.875,
|
543 |
+
"num_updates": 30,
|
544 |
+
"rewards": 1.0655029881745577,
|
545 |
+
"rewards/cosine_scaled_reward": 0.137826404068619,
|
546 |
+
"rewards/format_reward2": 0.8984375,
|
547 |
+
"rewards/len_reward": 0.029239090159535408,
|
548 |
+
"rewards_std": 0.5960428677499294,
|
549 |
+
"step": 30
|
550 |
+
},
|
551 |
+
{
|
552 |
+
"clip_ratio": 0.0,
|
553 |
+
"completion_length": 6721.03125,
|
554 |
+
"epoch": 0.3069306930693069,
|
555 |
+
"grad_norm": 0.36463433504104614,
|
556 |
+
"kl": 0.02364349365234375,
|
557 |
+
"learning_rate": 3.140064516427565e-06,
|
558 |
+
"loss": 0.02541273832321167,
|
559 |
+
"max_completion_length": 11538.875,
|
560 |
+
"min_completion_length": 3436.5,
|
561 |
+
"num_updates": 31,
|
562 |
+
"rewards": 1.2696323096752167,
|
563 |
+
"rewards/cosine_scaled_reward": 0.264737417222932,
|
564 |
+
"rewards/format_reward2": 0.921875,
|
565 |
+
"rewards/len_reward": 0.08301988849416375,
|
566 |
+
"rewards_std": 0.7188399098813534,
|
567 |
+
"step": 31
|
568 |
+
},
|
569 |
+
{
|
570 |
+
"clip_ratio": 0.0,
|
571 |
+
"completion_length": 7162.3828125,
|
572 |
+
"epoch": 0.31683168316831684,
|
573 |
+
"grad_norm": 0.5464898347854614,
|
574 |
+
"kl": 0.02471923828125,
|
575 |
+
"learning_rate": 3.0884083655120544e-06,
|
576 |
+
"loss": 0.01196742057800293,
|
577 |
+
"max_completion_length": 10615.375,
|
578 |
+
"min_completion_length": 4111.875,
|
579 |
+
"num_updates": 32,
|
580 |
+
"rewards": 1.05987061932683,
|
581 |
+
"rewards/cosine_scaled_reward": 0.07295701105613261,
|
582 |
+
"rewards/format_reward2": 0.96875,
|
583 |
+
"rewards/len_reward": 0.018163591157644987,
|
584 |
+
"rewards_std": 0.6865731440484524,
|
585 |
+
"step": 32
|
586 |
+
},
|
587 |
+
{
|
588 |
+
"clip_ratio": 0.0,
|
589 |
+
"completion_length": 8008.421875,
|
590 |
+
"epoch": 0.32673267326732675,
|
591 |
+
"grad_norm": 67.73995208740234,
|
592 |
+
"kl": 0.0318756103515625,
|
593 |
+
"learning_rate": 3.0356992497966503e-06,
|
594 |
+
"loss": -0.01266103982925415,
|
595 |
+
"max_completion_length": 12517.5,
|
596 |
+
"min_completion_length": 2955.875,
|
597 |
+
"num_updates": 33,
|
598 |
+
"rewards": 1.1564012691378593,
|
599 |
+
"rewards/cosine_scaled_reward": 0.18674227688461542,
|
600 |
+
"rewards/format_reward2": 0.9453125,
|
601 |
+
"rewards/len_reward": 0.024346530437469482,
|
602 |
+
"rewards_std": 0.5944486074149609,
|
603 |
+
"step": 33
|
604 |
+
},
|
605 |
+
{
|
606 |
+
"clip_ratio": 0.0,
|
607 |
+
"completion_length": 5801.1328125,
|
608 |
+
"epoch": 0.33663366336633666,
|
609 |
+
"grad_norm": 0.44804856181144714,
|
610 |
+
"kl": 0.0241241455078125,
|
611 |
+
"learning_rate": 2.981988161946644e-06,
|
612 |
+
"loss": -0.0008684098720550537,
|
613 |
+
"max_completion_length": 13239.625,
|
614 |
+
"min_completion_length": 1896.5,
|
615 |
+
"num_updates": 34,
|
616 |
+
"rewards": 1.5373370498418808,
|
617 |
+
"rewards/cosine_scaled_reward": 0.4724404886364937,
|
618 |
+
"rewards/format_reward2": 0.9609375,
|
619 |
+
"rewards/len_reward": 0.10395912081003189,
|
620 |
+
"rewards_std": 0.5325119644403458,
|
621 |
+
"step": 34
|
622 |
+
},
|
623 |
+
{
|
624 |
+
"clip_ratio": 0.0,
|
625 |
+
"completion_length": 7891.390625,
|
626 |
+
"epoch": 0.3465346534653465,
|
627 |
+
"grad_norm": 0.395713746547699,
|
628 |
+
"kl": 0.0246734619140625,
|
629 |
+
"learning_rate": 2.9273270639706544e-06,
|
630 |
+
"loss": 0.009494274854660034,
|
631 |
+
"max_completion_length": 13065.75,
|
632 |
+
"min_completion_length": 3577.25,
|
633 |
+
"num_updates": 35,
|
634 |
+
"rewards": 1.2487693056464195,
|
635 |
+
"rewards/cosine_scaled_reward": 0.21439548954367638,
|
636 |
+
"rewards/format_reward2": 0.9609375,
|
637 |
+
"rewards/len_reward": 0.0734363030642271,
|
638 |
+
"rewards_std": 0.6400604620575905,
|
639 |
+
"step": 35
|
640 |
+
},
|
641 |
+
{
|
642 |
+
"clip_ratio": 0.0,
|
643 |
+
"completion_length": 8915.25,
|
644 |
+
"epoch": 0.3564356435643564,
|
645 |
+
"grad_norm": 0.33517077565193176,
|
646 |
+
"kl": 0.0334320068359375,
|
647 |
+
"learning_rate": 2.871768836950742e-06,
|
648 |
+
"loss": -0.018658161163330078,
|
649 |
+
"max_completion_length": 12554.875,
|
650 |
+
"min_completion_length": 5071.375,
|
651 |
+
"num_updates": 36,
|
652 |
+
"rewards": 1.1192209478467703,
|
653 |
+
"rewards/cosine_scaled_reward": 0.15578080737031996,
|
654 |
+
"rewards/format_reward2": 0.9296875,
|
655 |
+
"rewards/len_reward": 0.03375265281647444,
|
656 |
+
"rewards_std": 0.5714416801929474,
|
657 |
+
"step": 36
|
658 |
+
},
|
659 |
+
{
|
660 |
+
"clip_ratio": 0.0,
|
661 |
+
"completion_length": 6871.40625,
|
662 |
+
"epoch": 0.36633663366336633,
|
663 |
+
"grad_norm": 0.3194531202316284,
|
664 |
+
"kl": 0.0283966064453125,
|
665 |
+
"learning_rate": 2.8153672298833772e-06,
|
666 |
+
"loss": 0.027765318751335144,
|
667 |
+
"max_completion_length": 11280.625,
|
668 |
+
"min_completion_length": 2181.75,
|
669 |
+
"num_updates": 37,
|
670 |
+
"rewards": 1.2906805723905563,
|
671 |
+
"rewards/cosine_scaled_reward": 0.289469544775784,
|
672 |
+
"rewards/format_reward2": 0.9609375,
|
673 |
+
"rewards/len_reward": 0.04027354822028428,
|
674 |
+
"rewards_std": 0.6187824495136738,
|
675 |
+
"step": 37
|
676 |
+
},
|
677 |
+
{
|
678 |
+
"clip_ratio": 0.0,
|
679 |
+
"completion_length": 7555.359375,
|
680 |
+
"epoch": 0.37623762376237624,
|
681 |
+
"grad_norm": 0.329673707485199,
|
682 |
+
"kl": 0.03289794921875,
|
683 |
+
"learning_rate": 2.7581768076807586e-06,
|
684 |
+
"loss": 0.00029387325048446655,
|
685 |
+
"max_completion_length": 13576.25,
|
686 |
+
"min_completion_length": 3269.75,
|
687 |
+
"num_updates": 38,
|
688 |
+
"rewards": 0.9393773451447487,
|
689 |
+
"rewards/cosine_scaled_reward": 0.02606131136417389,
|
690 |
+
"rewards/format_reward2": 0.9375,
|
691 |
+
"rewards/len_reward": -0.024183956440538168,
|
692 |
+
"rewards_std": 0.7055792585015297,
|
693 |
+
"step": 38
|
694 |
+
},
|
695 |
+
{
|
696 |
+
"clip_ratio": 0.0,
|
697 |
+
"completion_length": 7003.8125,
|
698 |
+
"epoch": 0.38613861386138615,
|
699 |
+
"grad_norm": 0.3149705231189728,
|
700 |
+
"kl": 0.03338623046875,
|
701 |
+
"learning_rate": 2.700252898382781e-06,
|
702 |
+
"loss": 0.00039067864418029785,
|
703 |
+
"max_completion_length": 12233.875,
|
704 |
+
"min_completion_length": 2225.0,
|
705 |
+
"num_updates": 39,
|
706 |
+
"rewards": 1.323565311729908,
|
707 |
+
"rewards/cosine_scaled_reward": 0.23708410863764584,
|
708 |
+
"rewards/format_reward2": 0.9609375,
|
709 |
+
"rewards/len_reward": 0.12554369773715734,
|
710 |
+
"rewards_std": 0.639260545372963,
|
711 |
+
"step": 39
|
712 |
+
},
|
713 |
+
{
|
714 |
+
"clip_ratio": 0.0,
|
715 |
+
"completion_length": 5583.1171875,
|
716 |
+
"epoch": 0.39603960396039606,
|
717 |
+
"grad_norm": 0.4048033356666565,
|
718 |
+
"kl": 0.027130126953125,
|
719 |
+
"learning_rate": 2.641651539630735e-06,
|
720 |
+
"loss": 0.015950188040733337,
|
721 |
+
"max_completion_length": 9941.625,
|
722 |
+
"min_completion_length": 1826.0,
|
723 |
+
"num_updates": 40,
|
724 |
+
"rewards": 1.4943003356456757,
|
725 |
+
"rewards/cosine_scaled_reward": 0.4848987963050604,
|
726 |
+
"rewards/format_reward2": 0.921875,
|
727 |
+
"rewards/len_reward": 0.08752657752484083,
|
728 |
+
"rewards_std": 0.636099562048912,
|
729 |
+
"step": 40
|
730 |
+
}
|
731 |
+
],
|
732 |
+
"logging_steps": 1,
|
733 |
+
"max_steps": 101,
|
734 |
+
"num_input_tokens_seen": 0,
|
735 |
+
"num_train_epochs": 1,
|
736 |
+
"save_steps": 5,
|
737 |
+
"stateful_callbacks": {
|
738 |
+
"TrainerControl": {
|
739 |
+
"args": {
|
740 |
+
"should_epoch_stop": false,
|
741 |
+
"should_evaluate": false,
|
742 |
+
"should_log": true,
|
743 |
+
"should_save": true,
|
744 |
+
"should_training_stop": false
|
745 |
+
},
|
746 |
+
"attributes": {}
|
747 |
+
}
|
748 |
+
},
|
749 |
+
"total_flos": 0,
|
750 |
+
"train_batch_size": null,
|
751 |
+
"trial_name": null,
|
752 |
+
"trial_params": null
|
753 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:645eb1f2a6977df3f64905f109d54d6f457b9a645e4f958a1cb779812aa238c1
|
3 |
+
size 7928
|
zero_to_fp32.py
ADDED
@@ -0,0 +1,760 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
|
3 |
+
# Copyright (c) Microsoft Corporation.
|
4 |
+
# SPDX-License-Identifier: Apache-2.0
|
5 |
+
|
6 |
+
# DeepSpeed Team
|
7 |
+
|
8 |
+
# This script extracts fp32 consolidated weights from a zero 1, 2 and 3 DeepSpeed checkpoints. It gets
|
9 |
+
# copied into the top level checkpoint dir, so the user can easily do the conversion at any point in
|
10 |
+
# the future. Once extracted, the weights don't require DeepSpeed and can be used in any
|
11 |
+
# application.
|
12 |
+
#
|
13 |
+
# example:
|
14 |
+
# python zero_to_fp32.py . output_dir/
|
15 |
+
# or
|
16 |
+
# python zero_to_fp32.py . output_dir/ --safe_serialization
|
17 |
+
|
18 |
+
import argparse
|
19 |
+
import torch
|
20 |
+
import glob
|
21 |
+
import math
|
22 |
+
import os
|
23 |
+
import re
|
24 |
+
import gc
|
25 |
+
import json
|
26 |
+
import numpy as np
|
27 |
+
from tqdm import tqdm
|
28 |
+
from collections import OrderedDict
|
29 |
+
from dataclasses import dataclass
|
30 |
+
|
31 |
+
# while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
|
32 |
+
# DeepSpeed data structures it has to be available in the current python environment.
|
33 |
+
from deepspeed.utils import logger
|
34 |
+
from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
|
35 |
+
FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
|
36 |
+
FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
|
37 |
+
|
38 |
+
|
39 |
+
@dataclass
|
40 |
+
class zero_model_state:
|
41 |
+
buffers: dict()
|
42 |
+
param_shapes: dict()
|
43 |
+
shared_params: list
|
44 |
+
ds_version: int
|
45 |
+
frozen_param_shapes: dict()
|
46 |
+
frozen_param_fragments: dict()
|
47 |
+
|
48 |
+
|
49 |
+
debug = 0
|
50 |
+
|
51 |
+
# load to cpu
|
52 |
+
device = torch.device('cpu')
|
53 |
+
|
54 |
+
|
55 |
+
def atoi(text):
|
56 |
+
return int(text) if text.isdigit() else text
|
57 |
+
|
58 |
+
|
59 |
+
def natural_keys(text):
|
60 |
+
'''
|
61 |
+
alist.sort(key=natural_keys) sorts in human order
|
62 |
+
http://nedbatchelder.com/blog/200712/human_sorting.html
|
63 |
+
(See Toothy's implementation in the comments)
|
64 |
+
'''
|
65 |
+
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
66 |
+
|
67 |
+
|
68 |
+
def get_model_state_file(checkpoint_dir, zero_stage):
|
69 |
+
if not os.path.isdir(checkpoint_dir):
|
70 |
+
raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
|
71 |
+
|
72 |
+
# there should be only one file
|
73 |
+
if zero_stage <= 2:
|
74 |
+
file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
|
75 |
+
elif zero_stage == 3:
|
76 |
+
file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
|
77 |
+
|
78 |
+
if not os.path.exists(file):
|
79 |
+
raise FileNotFoundError(f"can't find model states file at '{file}'")
|
80 |
+
|
81 |
+
return file
|
82 |
+
|
83 |
+
|
84 |
+
def get_checkpoint_files(checkpoint_dir, glob_pattern):
|
85 |
+
# XXX: need to test that this simple glob rule works for multi-node setup too
|
86 |
+
ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
|
87 |
+
|
88 |
+
if len(ckpt_files) == 0:
|
89 |
+
raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
|
90 |
+
|
91 |
+
return ckpt_files
|
92 |
+
|
93 |
+
|
94 |
+
def get_optim_files(checkpoint_dir):
|
95 |
+
return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
|
96 |
+
|
97 |
+
|
98 |
+
def get_model_state_files(checkpoint_dir):
|
99 |
+
return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
|
100 |
+
|
101 |
+
|
102 |
+
def parse_model_states(files):
|
103 |
+
zero_model_states = []
|
104 |
+
for file in files:
|
105 |
+
state_dict = torch.load(file, map_location=device, weights_only=False)
|
106 |
+
|
107 |
+
if BUFFER_NAMES not in state_dict:
|
108 |
+
raise ValueError(f"{file} is not a model state checkpoint")
|
109 |
+
buffer_names = state_dict[BUFFER_NAMES]
|
110 |
+
if debug:
|
111 |
+
print("Found buffers:", buffer_names)
|
112 |
+
|
113 |
+
# recover just the buffers while restoring them to fp32 if they were saved in fp16
|
114 |
+
buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
|
115 |
+
param_shapes = state_dict[PARAM_SHAPES]
|
116 |
+
|
117 |
+
# collect parameters that are included in param_shapes
|
118 |
+
param_names = []
|
119 |
+
for s in param_shapes:
|
120 |
+
for name in s.keys():
|
121 |
+
param_names.append(name)
|
122 |
+
|
123 |
+
# update with frozen parameters
|
124 |
+
frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
|
125 |
+
if frozen_param_shapes is not None:
|
126 |
+
if debug:
|
127 |
+
print(f"Found frozen_param_shapes: {frozen_param_shapes}")
|
128 |
+
param_names += list(frozen_param_shapes.keys())
|
129 |
+
|
130 |
+
# handle shared params
|
131 |
+
shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
|
132 |
+
|
133 |
+
ds_version = state_dict.get(DS_VERSION, None)
|
134 |
+
|
135 |
+
frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
|
136 |
+
|
137 |
+
z_model_state = zero_model_state(buffers=buffers,
|
138 |
+
param_shapes=param_shapes,
|
139 |
+
shared_params=shared_params,
|
140 |
+
ds_version=ds_version,
|
141 |
+
frozen_param_shapes=frozen_param_shapes,
|
142 |
+
frozen_param_fragments=frozen_param_fragments)
|
143 |
+
zero_model_states.append(z_model_state)
|
144 |
+
|
145 |
+
return zero_model_states
|
146 |
+
|
147 |
+
|
148 |
+
def parse_optim_states(files, ds_checkpoint_dir):
|
149 |
+
total_files = len(files)
|
150 |
+
state_dicts = []
|
151 |
+
for f in tqdm(files, desc='Loading checkpoint shards'):
|
152 |
+
state_dict = torch.load(f, map_location=device, mmap=True, weights_only=False)
|
153 |
+
# immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
|
154 |
+
# and also handle the case where it was already removed by another helper script
|
155 |
+
state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
|
156 |
+
state_dicts.append(state_dict)
|
157 |
+
|
158 |
+
if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
|
159 |
+
raise ValueError(f"{files[0]} is not a zero checkpoint")
|
160 |
+
zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
|
161 |
+
world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
|
162 |
+
|
163 |
+
# For ZeRO-2 each param group can have different partition_count as data parallelism for expert
|
164 |
+
# parameters can be different from data parallelism for non-expert parameters. So we can just
|
165 |
+
# use the max of the partition_count to get the dp world_size.
|
166 |
+
|
167 |
+
if type(world_size) is list:
|
168 |
+
world_size = max(world_size)
|
169 |
+
|
170 |
+
if world_size != total_files:
|
171 |
+
raise ValueError(
|
172 |
+
f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
|
173 |
+
"Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
|
174 |
+
)
|
175 |
+
|
176 |
+
# the groups are named differently in each stage
|
177 |
+
if zero_stage <= 2:
|
178 |
+
fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
|
179 |
+
elif zero_stage == 3:
|
180 |
+
fp32_groups_key = FP32_FLAT_GROUPS
|
181 |
+
else:
|
182 |
+
raise ValueError(f"unknown zero stage {zero_stage}")
|
183 |
+
|
184 |
+
fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
|
185 |
+
return zero_stage, world_size, fp32_flat_groups
|
186 |
+
|
187 |
+
|
188 |
+
def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters):
|
189 |
+
"""
|
190 |
+
Returns fp32 state_dict reconstructed from ds checkpoint
|
191 |
+
|
192 |
+
Args:
|
193 |
+
- ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
|
194 |
+
|
195 |
+
"""
|
196 |
+
print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
|
197 |
+
|
198 |
+
optim_files = get_optim_files(ds_checkpoint_dir)
|
199 |
+
zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
|
200 |
+
print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
|
201 |
+
|
202 |
+
model_files = get_model_state_files(ds_checkpoint_dir)
|
203 |
+
|
204 |
+
zero_model_states = parse_model_states(model_files)
|
205 |
+
print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
|
206 |
+
|
207 |
+
if zero_stage <= 2:
|
208 |
+
return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
209 |
+
exclude_frozen_parameters)
|
210 |
+
elif zero_stage == 3:
|
211 |
+
return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
212 |
+
exclude_frozen_parameters)
|
213 |
+
|
214 |
+
|
215 |
+
def _zero2_merge_frozen_params(state_dict, zero_model_states):
|
216 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
217 |
+
return
|
218 |
+
|
219 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
220 |
+
frozen_param_fragments = zero_model_states[0].frozen_param_fragments
|
221 |
+
|
222 |
+
if debug:
|
223 |
+
num_elem = sum(s.numel() for s in frozen_param_shapes.values())
|
224 |
+
print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
225 |
+
|
226 |
+
wanted_params = len(frozen_param_shapes)
|
227 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
228 |
+
avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
|
229 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
230 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
231 |
+
|
232 |
+
total_params = 0
|
233 |
+
total_numel = 0
|
234 |
+
for name, shape in frozen_param_shapes.items():
|
235 |
+
total_params += 1
|
236 |
+
unpartitioned_numel = shape.numel()
|
237 |
+
total_numel += unpartitioned_numel
|
238 |
+
|
239 |
+
state_dict[name] = frozen_param_fragments[name]
|
240 |
+
|
241 |
+
if debug:
|
242 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
243 |
+
|
244 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
245 |
+
|
246 |
+
|
247 |
+
def _has_callable(obj, fn):
|
248 |
+
attr = getattr(obj, fn, None)
|
249 |
+
return callable(attr)
|
250 |
+
|
251 |
+
|
252 |
+
def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
253 |
+
param_shapes = zero_model_states[0].param_shapes
|
254 |
+
|
255 |
+
# Reconstruction protocol:
|
256 |
+
#
|
257 |
+
# XXX: document this
|
258 |
+
|
259 |
+
if debug:
|
260 |
+
for i in range(world_size):
|
261 |
+
for j in range(len(fp32_flat_groups[0])):
|
262 |
+
print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
|
263 |
+
|
264 |
+
# XXX: memory usage doubles here (zero2)
|
265 |
+
num_param_groups = len(fp32_flat_groups[0])
|
266 |
+
merged_single_partition_of_fp32_groups = []
|
267 |
+
for i in range(num_param_groups):
|
268 |
+
merged_partitions = [sd[i] for sd in fp32_flat_groups]
|
269 |
+
full_single_fp32_vector = torch.cat(merged_partitions, 0)
|
270 |
+
merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
|
271 |
+
avail_numel = sum(
|
272 |
+
[full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
|
273 |
+
|
274 |
+
if debug:
|
275 |
+
wanted_params = sum([len(shapes) for shapes in param_shapes])
|
276 |
+
wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
|
277 |
+
# not asserting if there is a mismatch due to possible padding
|
278 |
+
print(f"Have {avail_numel} numels to process.")
|
279 |
+
print(f"Need {wanted_numel} numels in {wanted_params} params.")
|
280 |
+
|
281 |
+
# params
|
282 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
283 |
+
# out-of-core computing solution
|
284 |
+
total_numel = 0
|
285 |
+
total_params = 0
|
286 |
+
for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
|
287 |
+
offset = 0
|
288 |
+
avail_numel = full_single_fp32_vector.numel()
|
289 |
+
for name, shape in shapes.items():
|
290 |
+
|
291 |
+
unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
|
292 |
+
total_numel += unpartitioned_numel
|
293 |
+
total_params += 1
|
294 |
+
|
295 |
+
if debug:
|
296 |
+
print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
|
297 |
+
state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
|
298 |
+
offset += unpartitioned_numel
|
299 |
+
|
300 |
+
# Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
|
301 |
+
# avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
|
302 |
+
# paddings performed in the code it's almost impossible to predict the exact numbers w/o the
|
303 |
+
# live optimizer object, so we are checking that the numbers are within the right range
|
304 |
+
align_to = 2 * world_size
|
305 |
+
|
306 |
+
def zero2_align(x):
|
307 |
+
return align_to * math.ceil(x / align_to)
|
308 |
+
|
309 |
+
if debug:
|
310 |
+
print(f"original offset={offset}, avail_numel={avail_numel}")
|
311 |
+
|
312 |
+
offset = zero2_align(offset)
|
313 |
+
avail_numel = zero2_align(avail_numel)
|
314 |
+
|
315 |
+
if debug:
|
316 |
+
print(f"aligned offset={offset}, avail_numel={avail_numel}")
|
317 |
+
|
318 |
+
# Sanity check
|
319 |
+
if offset != avail_numel:
|
320 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
321 |
+
|
322 |
+
print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
|
323 |
+
|
324 |
+
|
325 |
+
def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
326 |
+
exclude_frozen_parameters):
|
327 |
+
state_dict = OrderedDict()
|
328 |
+
|
329 |
+
# buffers
|
330 |
+
buffers = zero_model_states[0].buffers
|
331 |
+
state_dict.update(buffers)
|
332 |
+
if debug:
|
333 |
+
print(f"added {len(buffers)} buffers")
|
334 |
+
|
335 |
+
if not exclude_frozen_parameters:
|
336 |
+
_zero2_merge_frozen_params(state_dict, zero_model_states)
|
337 |
+
|
338 |
+
_zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
339 |
+
|
340 |
+
# recover shared parameters
|
341 |
+
for pair in zero_model_states[0].shared_params:
|
342 |
+
if pair[1] in state_dict:
|
343 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
344 |
+
|
345 |
+
return state_dict
|
346 |
+
|
347 |
+
|
348 |
+
def zero3_partitioned_param_info(unpartitioned_numel, world_size):
|
349 |
+
remainder = unpartitioned_numel % world_size
|
350 |
+
padding_numel = (world_size - remainder) if remainder else 0
|
351 |
+
partitioned_numel = math.ceil(unpartitioned_numel / world_size)
|
352 |
+
return partitioned_numel, padding_numel
|
353 |
+
|
354 |
+
|
355 |
+
def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
|
356 |
+
if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
|
357 |
+
return
|
358 |
+
|
359 |
+
if debug:
|
360 |
+
for i in range(world_size):
|
361 |
+
num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
|
362 |
+
print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
|
363 |
+
|
364 |
+
frozen_param_shapes = zero_model_states[0].frozen_param_shapes
|
365 |
+
wanted_params = len(frozen_param_shapes)
|
366 |
+
wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
|
367 |
+
avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
|
368 |
+
print(f'Frozen params: Have {avail_numel} numels to process.')
|
369 |
+
print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
|
370 |
+
|
371 |
+
total_params = 0
|
372 |
+
total_numel = 0
|
373 |
+
for name, shape in zero_model_states[0].frozen_param_shapes.items():
|
374 |
+
total_params += 1
|
375 |
+
unpartitioned_numel = shape.numel()
|
376 |
+
total_numel += unpartitioned_numel
|
377 |
+
|
378 |
+
param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
|
379 |
+
state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
|
380 |
+
|
381 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
382 |
+
|
383 |
+
if debug:
|
384 |
+
print(
|
385 |
+
f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
386 |
+
)
|
387 |
+
|
388 |
+
print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
|
389 |
+
|
390 |
+
|
391 |
+
class GatheredTensor:
|
392 |
+
"""
|
393 |
+
A pseudo tensor that collects partitioned weights.
|
394 |
+
It is more memory efficient when there are multiple groups.
|
395 |
+
"""
|
396 |
+
|
397 |
+
def __init__(self, flat_groups, flat_groups_offset, offset, partitioned_numel, shape):
|
398 |
+
self.flat_groups = flat_groups
|
399 |
+
self.flat_groups_offset = flat_groups_offset
|
400 |
+
self.offset = offset
|
401 |
+
self.partitioned_numel = partitioned_numel
|
402 |
+
self.shape = shape
|
403 |
+
self.dtype = self.flat_groups[0][0].dtype
|
404 |
+
|
405 |
+
def contiguous(self):
|
406 |
+
"""
|
407 |
+
Merge partitioned weights from flat_groups into a single tensor.
|
408 |
+
"""
|
409 |
+
end_idx = self.offset + self.partitioned_numel
|
410 |
+
world_size = len(self.flat_groups)
|
411 |
+
pad_flat_param_chunks = []
|
412 |
+
|
413 |
+
for rank_i in range(world_size):
|
414 |
+
# for each rank, we need to collect weights from related group/groups
|
415 |
+
flat_groups_at_rank_i = self.flat_groups[rank_i]
|
416 |
+
start_group_id = None
|
417 |
+
end_group_id = None
|
418 |
+
for group_id in range(len(self.flat_groups_offset)):
|
419 |
+
if self.flat_groups_offset[group_id] <= self.offset < self.flat_groups_offset[group_id + 1]:
|
420 |
+
start_group_id = group_id
|
421 |
+
if self.flat_groups_offset[group_id] < end_idx <= self.flat_groups_offset[group_id + 1]:
|
422 |
+
end_group_id = group_id
|
423 |
+
break
|
424 |
+
# collect weights from related group/groups
|
425 |
+
for group_id in range(start_group_id, end_group_id + 1):
|
426 |
+
flat_tensor = flat_groups_at_rank_i[group_id]
|
427 |
+
start_offset = self.offset - self.flat_groups_offset[group_id]
|
428 |
+
end_offset = min(end_idx, self.flat_groups_offset[group_id + 1]) - self.flat_groups_offset[group_id]
|
429 |
+
pad_flat_param_chunks.append(flat_tensor[start_offset:end_offset])
|
430 |
+
|
431 |
+
# collect weights from all ranks
|
432 |
+
pad_flat_param = torch.cat(pad_flat_param_chunks, dim=0)
|
433 |
+
param = pad_flat_param[:self.shape.numel()].view(self.shape).contiguous()
|
434 |
+
return param
|
435 |
+
|
436 |
+
|
437 |
+
def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
|
438 |
+
param_shapes = zero_model_states[0].param_shapes
|
439 |
+
avail_numel = sum([flat_group.numel() for flat_group in fp32_flat_groups[0]]) * world_size
|
440 |
+
|
441 |
+
# Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
|
442 |
+
# param, re-consolidating each param, while dealing with padding if any
|
443 |
+
|
444 |
+
# merge list of dicts, preserving order
|
445 |
+
param_shapes = {k: v for d in param_shapes for k, v in d.items()}
|
446 |
+
|
447 |
+
if debug:
|
448 |
+
for i in range(world_size):
|
449 |
+
print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
|
450 |
+
|
451 |
+
wanted_params = len(param_shapes)
|
452 |
+
wanted_numel = sum(shape.numel() for shape in param_shapes.values())
|
453 |
+
# not asserting if there is a mismatch due to possible padding
|
454 |
+
avail_numel = fp32_flat_groups[0].numel() * world_size
|
455 |
+
print(f"Trainable params: Have {avail_numel} numels to process.")
|
456 |
+
print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
|
457 |
+
|
458 |
+
# params
|
459 |
+
# XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
|
460 |
+
# out-of-core computing solution
|
461 |
+
offset = 0
|
462 |
+
total_numel = 0
|
463 |
+
total_params = 0
|
464 |
+
flat_groups_offset = [0] + list(np.cumsum([flat_tensor.numel() for flat_tensor in fp32_flat_groups[0]]))
|
465 |
+
for name, shape in tqdm(param_shapes.items(), desc='Gathering sharded weights'):
|
466 |
+
unpartitioned_numel = shape.numel()
|
467 |
+
total_numel += unpartitioned_numel
|
468 |
+
total_params += 1
|
469 |
+
partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
|
470 |
+
|
471 |
+
if debug:
|
472 |
+
print(
|
473 |
+
f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
|
474 |
+
)
|
475 |
+
|
476 |
+
# memory efficient tensor
|
477 |
+
tensor = GatheredTensor(fp32_flat_groups, flat_groups_offset, offset, partitioned_numel, shape)
|
478 |
+
state_dict[name] = tensor
|
479 |
+
offset += partitioned_numel
|
480 |
+
|
481 |
+
offset *= world_size
|
482 |
+
|
483 |
+
# Sanity check
|
484 |
+
if offset != avail_numel:
|
485 |
+
raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
|
486 |
+
|
487 |
+
print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
|
488 |
+
|
489 |
+
|
490 |
+
def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
|
491 |
+
exclude_frozen_parameters):
|
492 |
+
state_dict = OrderedDict()
|
493 |
+
|
494 |
+
# buffers
|
495 |
+
buffers = zero_model_states[0].buffers
|
496 |
+
state_dict.update(buffers)
|
497 |
+
if debug:
|
498 |
+
print(f"added {len(buffers)} buffers")
|
499 |
+
|
500 |
+
if not exclude_frozen_parameters:
|
501 |
+
_zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
|
502 |
+
|
503 |
+
_zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
|
504 |
+
|
505 |
+
# recover shared parameters
|
506 |
+
for pair in zero_model_states[0].shared_params:
|
507 |
+
if pair[1] in state_dict:
|
508 |
+
state_dict[pair[0]] = state_dict[pair[1]]
|
509 |
+
|
510 |
+
return state_dict
|
511 |
+
|
512 |
+
|
513 |
+
def to_torch_tensor(state_dict, return_empty_tensor=False):
|
514 |
+
"""
|
515 |
+
Convert state_dict of GatheredTensor to torch tensor
|
516 |
+
"""
|
517 |
+
torch_state_dict = {}
|
518 |
+
converted_tensors = {}
|
519 |
+
for name, tensor in state_dict.items():
|
520 |
+
tensor_id = id(tensor)
|
521 |
+
if tensor_id in converted_tensors: # shared tensors
|
522 |
+
shared_tensor = torch_state_dict[converted_tensors[tensor_id]]
|
523 |
+
torch_state_dict[name] = shared_tensor
|
524 |
+
else:
|
525 |
+
converted_tensors[tensor_id] = name
|
526 |
+
if return_empty_tensor:
|
527 |
+
torch_state_dict[name] = torch.empty(tensor.shape, dtype=tensor.dtype)
|
528 |
+
else:
|
529 |
+
torch_state_dict[name] = tensor.contiguous()
|
530 |
+
return torch_state_dict
|
531 |
+
|
532 |
+
|
533 |
+
def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
534 |
+
tag=None,
|
535 |
+
exclude_frozen_parameters=False,
|
536 |
+
lazy_mode=False):
|
537 |
+
"""
|
538 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
|
539 |
+
``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
|
540 |
+
via a model hub.
|
541 |
+
|
542 |
+
Args:
|
543 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder
|
544 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in 'latest' file. e.g., ``global_step14``
|
545 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
546 |
+
- ``lazy_mode``: get state_dict in lazy mode. It returns a dict of pesduo tensor instead of torch tensor, which is more memory efficient.
|
547 |
+
Convert the pesduo tensor to torch tensor by ``.contiguous()``
|
548 |
+
|
549 |
+
Returns:
|
550 |
+
- pytorch ``state_dict``
|
551 |
+
|
552 |
+
A typical usage might be ::
|
553 |
+
|
554 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
555 |
+
# do the training and checkpoint saving
|
556 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
|
557 |
+
model = model.cpu() # move to cpu
|
558 |
+
model.load_state_dict(state_dict)
|
559 |
+
# submit to model hub or save the model to share with others
|
560 |
+
|
561 |
+
In this example the ``model`` will no longer be usable in the deepspeed context of the same
|
562 |
+
application. i.e. you will need to re-initialize the deepspeed engine, since
|
563 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
564 |
+
|
565 |
+
If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
|
566 |
+
|
567 |
+
Note: the above usage may not work if your application doesn't have sufficient free CPU memory.
|
568 |
+
You may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
|
569 |
+
the checkpoint. Or you can load state_dict in lazy mode ::
|
570 |
+
|
571 |
+
from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
|
572 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, lazy_mode=True) # not on cpu
|
573 |
+
for name, lazy_tensor in state_dict.item():
|
574 |
+
tensor = lazy_tensor.contiguous() # to cpu
|
575 |
+
print(name, tensor)
|
576 |
+
# del tensor to release memory if it no longer in use
|
577 |
+
"""
|
578 |
+
if tag is None:
|
579 |
+
latest_path = os.path.join(checkpoint_dir, 'latest')
|
580 |
+
if os.path.isfile(latest_path):
|
581 |
+
with open(latest_path, 'r') as fd:
|
582 |
+
tag = fd.read().strip()
|
583 |
+
else:
|
584 |
+
raise ValueError(f"Unable to find 'latest' file at {latest_path}")
|
585 |
+
|
586 |
+
ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
|
587 |
+
|
588 |
+
if not os.path.isdir(ds_checkpoint_dir):
|
589 |
+
raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
|
590 |
+
|
591 |
+
state_dict = _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
|
592 |
+
if lazy_mode:
|
593 |
+
return state_dict
|
594 |
+
else:
|
595 |
+
return to_torch_tensor(state_dict)
|
596 |
+
|
597 |
+
|
598 |
+
def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir,
|
599 |
+
output_dir,
|
600 |
+
max_shard_size="5GB",
|
601 |
+
safe_serialization=False,
|
602 |
+
tag=None,
|
603 |
+
exclude_frozen_parameters=False):
|
604 |
+
"""
|
605 |
+
Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
|
606 |
+
loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
|
607 |
+
|
608 |
+
Args:
|
609 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
610 |
+
- ``output_dir``: directory to the pytorch fp32 state_dict output files
|
611 |
+
- ``max_shard_size``: the maximum size for a checkpoint before being sharded, default value is 5GB
|
612 |
+
- ``safe_serialization``: whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).
|
613 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
614 |
+
- ``exclude_frozen_parameters``: exclude frozen parameters
|
615 |
+
"""
|
616 |
+
|
617 |
+
# Dependency pre-check
|
618 |
+
if safe_serialization:
|
619 |
+
try:
|
620 |
+
from safetensors.torch import save_file
|
621 |
+
except ImportError:
|
622 |
+
print('If you want to use `safe_serialization`, please `pip install safetensors`')
|
623 |
+
raise
|
624 |
+
if max_shard_size is not None:
|
625 |
+
try:
|
626 |
+
from huggingface_hub import split_torch_state_dict_into_shards
|
627 |
+
except ImportError:
|
628 |
+
print('If you want to use `max_shard_size`, please `pip install huggingface_hub`')
|
629 |
+
raise
|
630 |
+
|
631 |
+
# Convert zero checkpoint to state_dict
|
632 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir,
|
633 |
+
tag,
|
634 |
+
exclude_frozen_parameters,
|
635 |
+
lazy_mode=True)
|
636 |
+
|
637 |
+
# Shard the model if it is too big.
|
638 |
+
weights_name = "model.safetensors" if safe_serialization else "pytorch_model.bin"
|
639 |
+
if max_shard_size is not None:
|
640 |
+
filename_pattern = weights_name.replace(".bin", "{suffix}.bin").replace(".safetensors", "{suffix}.safetensors")
|
641 |
+
# an memory-efficient approach for sharding
|
642 |
+
empty_state_dict = to_torch_tensor(state_dict, return_empty_tensor=True)
|
643 |
+
state_dict_split = split_torch_state_dict_into_shards(empty_state_dict,
|
644 |
+
filename_pattern=filename_pattern,
|
645 |
+
max_shard_size=max_shard_size)
|
646 |
+
else:
|
647 |
+
from collections import namedtuple
|
648 |
+
StateDictSplit = namedtuple("StateDictSplit", ["is_sharded", "filename_to_tensors"])
|
649 |
+
state_dict_split = StateDictSplit(is_sharded=False,
|
650 |
+
filename_to_tensors={weights_name: list(state_dict.keys())})
|
651 |
+
|
652 |
+
# Save the model by shard
|
653 |
+
os.makedirs(output_dir, exist_ok=True)
|
654 |
+
filename_to_tensors = state_dict_split.filename_to_tensors.items()
|
655 |
+
for shard_file, tensors in tqdm(filename_to_tensors, desc="Saving checkpoint shards"):
|
656 |
+
shard_state_dict = {tensor_name: state_dict[tensor_name] for tensor_name in tensors}
|
657 |
+
shard_state_dict = to_torch_tensor(shard_state_dict)
|
658 |
+
output_path = os.path.join(output_dir, shard_file)
|
659 |
+
if safe_serialization:
|
660 |
+
save_file(shard_state_dict, output_path, metadata={"format": "pt"})
|
661 |
+
else:
|
662 |
+
torch.save(shard_state_dict, output_path)
|
663 |
+
# release the memory of current shard
|
664 |
+
for tensor_name in list(shard_state_dict.keys()):
|
665 |
+
del state_dict[tensor_name]
|
666 |
+
del shard_state_dict[tensor_name]
|
667 |
+
del shard_state_dict
|
668 |
+
gc.collect()
|
669 |
+
|
670 |
+
# Save index if sharded
|
671 |
+
if state_dict_split.is_sharded:
|
672 |
+
index = {
|
673 |
+
"metadata": state_dict_split.metadata,
|
674 |
+
"weight_map": state_dict_split.tensor_to_filename,
|
675 |
+
}
|
676 |
+
save_index_file = "model.safetensors.index.json" if safe_serialization else "pytorch_model.bin.index.json"
|
677 |
+
save_index_file = os.path.join(output_dir, save_index_file)
|
678 |
+
with open(save_index_file, "w", encoding="utf-8") as f:
|
679 |
+
content = json.dumps(index, indent=2, sort_keys=True) + "\n"
|
680 |
+
f.write(content)
|
681 |
+
|
682 |
+
|
683 |
+
def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
|
684 |
+
"""
|
685 |
+
1. Put the provided model to cpu
|
686 |
+
2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
|
687 |
+
3. Load it into the provided model
|
688 |
+
|
689 |
+
Args:
|
690 |
+
- ``model``: the model object to update
|
691 |
+
- ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
|
692 |
+
- ``tag``: checkpoint tag used as a unique identifier for checkpoint. If not provided will attempt to load tag in the file named ``latest`` in the checkpoint folder, e.g., ``global_step14``
|
693 |
+
|
694 |
+
Returns:
|
695 |
+
- ``model`: modified model
|
696 |
+
|
697 |
+
Make sure you have plenty of CPU memory available before you call this function. If you don't
|
698 |
+
have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
|
699 |
+
conveniently placed for you in the checkpoint folder.
|
700 |
+
|
701 |
+
A typical usage might be ::
|
702 |
+
|
703 |
+
from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
|
704 |
+
model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
|
705 |
+
# submit to model hub or save the model to share with others
|
706 |
+
|
707 |
+
Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
|
708 |
+
of the same application. i.e. you will need to re-initialize the deepspeed engine, since
|
709 |
+
``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
|
710 |
+
|
711 |
+
"""
|
712 |
+
logger.info(f"Extracting fp32 weights")
|
713 |
+
state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
|
714 |
+
|
715 |
+
logger.info(f"Overwriting model with fp32 weights")
|
716 |
+
model = model.cpu()
|
717 |
+
model.load_state_dict(state_dict, strict=False)
|
718 |
+
|
719 |
+
return model
|
720 |
+
|
721 |
+
|
722 |
+
if __name__ == "__main__":
|
723 |
+
parser = argparse.ArgumentParser()
|
724 |
+
parser.add_argument("checkpoint_dir",
|
725 |
+
type=str,
|
726 |
+
help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
|
727 |
+
parser.add_argument("output_dir",
|
728 |
+
type=str,
|
729 |
+
help="directory to the pytorch fp32 state_dict output files"
|
730 |
+
"(e.g. path/checkpoint-12-output/)")
|
731 |
+
parser.add_argument(
|
732 |
+
"--max_shard_size",
|
733 |
+
type=str,
|
734 |
+
default="5GB",
|
735 |
+
help="The maximum size for a checkpoint before being sharded. Checkpoints shard will then be each of size"
|
736 |
+
"lower than this size. If expressed as a string, needs to be digits followed by a unit (like `5MB`"
|
737 |
+
"We default it to 5GB in order for models to be able to run easily on free-tier google colab instances"
|
738 |
+
"without CPU OOM issues.")
|
739 |
+
parser.add_argument(
|
740 |
+
"--safe_serialization",
|
741 |
+
default=False,
|
742 |
+
action='store_true',
|
743 |
+
help="Whether to save the model using `safetensors` or the traditional PyTorch way (that uses `pickle`).")
|
744 |
+
parser.add_argument("-t",
|
745 |
+
"--tag",
|
746 |
+
type=str,
|
747 |
+
default=None,
|
748 |
+
help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
|
749 |
+
parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
|
750 |
+
parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
|
751 |
+
args = parser.parse_args()
|
752 |
+
|
753 |
+
debug = args.debug
|
754 |
+
|
755 |
+
convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
|
756 |
+
args.output_dir,
|
757 |
+
max_shard_size=args.max_shard_size,
|
758 |
+
safe_serialization=args.safe_serialization,
|
759 |
+
tag=args.tag,
|
760 |
+
exclude_frozen_parameters=args.exclude_frozen_parameters)
|