tktung commited on
Commit
8f66a5f
·
verified ·
1 Parent(s): 7dc77d7

Upload folder using huggingface_hub

Browse files
Files changed (26) hide show
  1. uccix_instruct_191224_lr1e-5/checkpoint-312/config.json +30 -0
  2. uccix_instruct_191224_lr1e-5/checkpoint-312/generation_config.json +10 -0
  3. uccix_instruct_191224_lr1e-5/checkpoint-312/latest +1 -0
  4. uccix_instruct_191224_lr1e-5/checkpoint-312/model-00001-of-00006.safetensors +3 -0
  5. uccix_instruct_191224_lr1e-5/checkpoint-312/model-00002-of-00006.safetensors +3 -0
  6. uccix_instruct_191224_lr1e-5/checkpoint-312/model-00003-of-00006.safetensors +3 -0
  7. uccix_instruct_191224_lr1e-5/checkpoint-312/model-00004-of-00006.safetensors +3 -0
  8. uccix_instruct_191224_lr1e-5/checkpoint-312/model-00005-of-00006.safetensors +3 -0
  9. uccix_instruct_191224_lr1e-5/checkpoint-312/model-00006-of-00006.safetensors +3 -0
  10. uccix_instruct_191224_lr1e-5/checkpoint-312/model.safetensors.index.json +370 -0
  11. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_0.pth +3 -0
  12. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_1.pth +3 -0
  13. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_2.pth +3 -0
  14. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_3.pth +3 -0
  15. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_4.pth +3 -0
  16. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_5.pth +3 -0
  17. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_6.pth +3 -0
  18. uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_7.pth +3 -0
  19. uccix_instruct_191224_lr1e-5/checkpoint-312/scheduler.pt +3 -0
  20. uccix_instruct_191224_lr1e-5/checkpoint-312/special_tokens_map.json +24 -0
  21. uccix_instruct_191224_lr1e-5/checkpoint-312/tokenizer.json +0 -0
  22. uccix_instruct_191224_lr1e-5/checkpoint-312/tokenizer.model +3 -0
  23. uccix_instruct_191224_lr1e-5/checkpoint-312/tokenizer_config.json +43 -0
  24. uccix_instruct_191224_lr1e-5/checkpoint-312/trainer_state.json +1132 -0
  25. uccix_instruct_191224_lr1e-5/checkpoint-312/training_args.bin +3 -0
  26. uccix_instruct_191224_lr1e-5/checkpoint-312/zero_to_fp32.py +592 -0
uccix_instruct_191224_lr1e-5/checkpoint-312/config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "ReliableAI/UCCIX-Llama2-13B",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "head_dim": 128,
11
+ "hidden_act": "silu",
12
+ "hidden_size": 5120,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 13824,
15
+ "max_position_embeddings": 4096,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 40,
19
+ "num_hidden_layers": 40,
20
+ "num_key_value_heads": 40,
21
+ "pretraining_tp": 1,
22
+ "rms_norm_eps": 1e-05,
23
+ "rope_scaling": null,
24
+ "rope_theta": 10000.0,
25
+ "tie_word_embeddings": false,
26
+ "torch_dtype": "bfloat16",
27
+ "transformers_version": "4.46.3",
28
+ "use_cache": true,
29
+ "vocab_size": 35483
30
+ }
uccix_instruct_191224_lr1e-5/checkpoint-312/generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 1,
3
+ "do_sample": true,
4
+ "eos_token_id": 2,
5
+ "max_length": 4096,
6
+ "pad_token_id": 0,
7
+ "temperature": 0.6,
8
+ "top_p": 0.9,
9
+ "transformers_version": "4.46.3"
10
+ }
uccix_instruct_191224_lr1e-5/checkpoint-312/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step312
uccix_instruct_191224_lr1e-5/checkpoint-312/model-00001-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ebadea7e0c5a3671b93ba0453739b5cdc5ca077d520782c565e452bd4272052e
3
+ size 4961502800
uccix_instruct_191224_lr1e-5/checkpoint-312/model-00002-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf5b9027f4836898cd8f9a574020e3dacffb10106f2ffa4e67f49a4b8e2019ff
3
+ size 4970422232
uccix_instruct_191224_lr1e-5/checkpoint-312/model-00003-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e84802a661041a9cd2c8a26040cc76841bc8f309676004ff66d3b466a1f4da9f
3
+ size 4881272584
uccix_instruct_191224_lr1e-5/checkpoint-312/model-00004-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb83b431734f362b1b55b853484f6ce87294ae8f3af2f744ae70a90aa79ba04d
3
+ size 4933722216
uccix_instruct_191224_lr1e-5/checkpoint-312/model-00005-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c76d35034d90c3ed35f500b680e6083ba57f4d3da123b6bdd2ea6e3080c6bbe
3
+ size 4933722208
uccix_instruct_191224_lr1e-5/checkpoint-312/model-00006-of-00006.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a65fa057a976a1d6d42b0cf1973f633a2ca022fe6315e75c9574cbac1e3e2786
3
+ size 1422460712
uccix_instruct_191224_lr1e-5/checkpoint-312/model.safetensors.index.json ADDED
@@ -0,0 +1,370 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 26103060480
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.weight": "model-00001-of-00006.safetensors",
14
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
15
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
16
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
17
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00006.safetensors",
18
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
19
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
20
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
21
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
22
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
23
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
24
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
25
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
26
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00006.safetensors",
27
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
28
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
29
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
30
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
31
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
32
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
33
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
34
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
35
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00006.safetensors",
36
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
37
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
38
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
39
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
40
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
41
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
42
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
43
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
44
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00006.safetensors",
45
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
46
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
47
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
48
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
49
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
50
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
51
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
52
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
53
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00006.safetensors",
54
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
55
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
56
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
57
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
58
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
59
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
60
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
61
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
62
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00006.safetensors",
63
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
64
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
65
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
66
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
67
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
68
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
69
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
70
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
71
+ "model.layers.15.input_layernorm.weight": "model-00003-of-00006.safetensors",
72
+ "model.layers.15.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
73
+ "model.layers.15.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
74
+ "model.layers.15.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
75
+ "model.layers.15.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
76
+ "model.layers.15.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
77
+ "model.layers.15.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
78
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
79
+ "model.layers.15.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
80
+ "model.layers.16.input_layernorm.weight": "model-00003-of-00006.safetensors",
81
+ "model.layers.16.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
82
+ "model.layers.16.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
83
+ "model.layers.16.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
84
+ "model.layers.16.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
85
+ "model.layers.16.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
86
+ "model.layers.16.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
87
+ "model.layers.16.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
88
+ "model.layers.16.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
89
+ "model.layers.17.input_layernorm.weight": "model-00003-of-00006.safetensors",
90
+ "model.layers.17.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
91
+ "model.layers.17.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
92
+ "model.layers.17.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
93
+ "model.layers.17.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
94
+ "model.layers.17.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
95
+ "model.layers.17.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
96
+ "model.layers.17.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
97
+ "model.layers.17.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
98
+ "model.layers.18.input_layernorm.weight": "model-00003-of-00006.safetensors",
99
+ "model.layers.18.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
100
+ "model.layers.18.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
101
+ "model.layers.18.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
102
+ "model.layers.18.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
103
+ "model.layers.18.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
104
+ "model.layers.18.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
105
+ "model.layers.18.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
106
+ "model.layers.18.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
107
+ "model.layers.19.input_layernorm.weight": "model-00003-of-00006.safetensors",
108
+ "model.layers.19.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
109
+ "model.layers.19.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
110
+ "model.layers.19.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
111
+ "model.layers.19.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
112
+ "model.layers.19.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
113
+ "model.layers.19.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
114
+ "model.layers.19.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
115
+ "model.layers.19.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
116
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00006.safetensors",
117
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
118
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
119
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
120
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
121
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
122
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
123
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
124
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
125
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00006.safetensors",
126
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
127
+ "model.layers.20.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
128
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
129
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
130
+ "model.layers.20.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
131
+ "model.layers.20.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
132
+ "model.layers.20.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
133
+ "model.layers.20.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
134
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00006.safetensors",
135
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00006.safetensors",
136
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
137
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
138
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00006.safetensors",
139
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
140
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
141
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
142
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
143
+ "model.layers.22.input_layernorm.weight": "model-00004-of-00006.safetensors",
144
+ "model.layers.22.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
145
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00006.safetensors",
146
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00006.safetensors",
147
+ "model.layers.22.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
148
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00006.safetensors",
149
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00006.safetensors",
150
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00006.safetensors",
151
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00006.safetensors",
152
+ "model.layers.23.input_layernorm.weight": "model-00004-of-00006.safetensors",
153
+ "model.layers.23.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
154
+ "model.layers.23.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
155
+ "model.layers.23.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
156
+ "model.layers.23.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
157
+ "model.layers.23.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
158
+ "model.layers.23.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
159
+ "model.layers.23.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
160
+ "model.layers.23.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
161
+ "model.layers.24.input_layernorm.weight": "model-00004-of-00006.safetensors",
162
+ "model.layers.24.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
163
+ "model.layers.24.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
164
+ "model.layers.24.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
165
+ "model.layers.24.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
166
+ "model.layers.24.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
167
+ "model.layers.24.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
168
+ "model.layers.24.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
169
+ "model.layers.24.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
170
+ "model.layers.25.input_layernorm.weight": "model-00004-of-00006.safetensors",
171
+ "model.layers.25.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
172
+ "model.layers.25.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
173
+ "model.layers.25.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
174
+ "model.layers.25.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
175
+ "model.layers.25.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
176
+ "model.layers.25.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
177
+ "model.layers.25.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
178
+ "model.layers.25.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
179
+ "model.layers.26.input_layernorm.weight": "model-00004-of-00006.safetensors",
180
+ "model.layers.26.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
181
+ "model.layers.26.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
182
+ "model.layers.26.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
183
+ "model.layers.26.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
184
+ "model.layers.26.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
185
+ "model.layers.26.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
186
+ "model.layers.26.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
187
+ "model.layers.26.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
188
+ "model.layers.27.input_layernorm.weight": "model-00004-of-00006.safetensors",
189
+ "model.layers.27.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
190
+ "model.layers.27.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
191
+ "model.layers.27.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
192
+ "model.layers.27.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
193
+ "model.layers.27.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
194
+ "model.layers.27.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
195
+ "model.layers.27.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
196
+ "model.layers.27.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
197
+ "model.layers.28.input_layernorm.weight": "model-00004-of-00006.safetensors",
198
+ "model.layers.28.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
199
+ "model.layers.28.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
200
+ "model.layers.28.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
201
+ "model.layers.28.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
202
+ "model.layers.28.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
203
+ "model.layers.28.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
204
+ "model.layers.28.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
205
+ "model.layers.28.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
206
+ "model.layers.29.input_layernorm.weight": "model-00004-of-00006.safetensors",
207
+ "model.layers.29.mlp.down_proj.weight": "model-00004-of-00006.safetensors",
208
+ "model.layers.29.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
209
+ "model.layers.29.mlp.up_proj.weight": "model-00004-of-00006.safetensors",
210
+ "model.layers.29.post_attention_layernorm.weight": "model-00004-of-00006.safetensors",
211
+ "model.layers.29.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
212
+ "model.layers.29.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
213
+ "model.layers.29.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
214
+ "model.layers.29.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
215
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00006.safetensors",
216
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
217
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
218
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
219
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
220
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
221
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
222
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
223
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
224
+ "model.layers.30.input_layernorm.weight": "model-00005-of-00006.safetensors",
225
+ "model.layers.30.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
226
+ "model.layers.30.mlp.gate_proj.weight": "model-00004-of-00006.safetensors",
227
+ "model.layers.30.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
228
+ "model.layers.30.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
229
+ "model.layers.30.self_attn.k_proj.weight": "model-00004-of-00006.safetensors",
230
+ "model.layers.30.self_attn.o_proj.weight": "model-00004-of-00006.safetensors",
231
+ "model.layers.30.self_attn.q_proj.weight": "model-00004-of-00006.safetensors",
232
+ "model.layers.30.self_attn.v_proj.weight": "model-00004-of-00006.safetensors",
233
+ "model.layers.31.input_layernorm.weight": "model-00005-of-00006.safetensors",
234
+ "model.layers.31.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
235
+ "model.layers.31.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
236
+ "model.layers.31.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
237
+ "model.layers.31.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
238
+ "model.layers.31.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
239
+ "model.layers.31.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
240
+ "model.layers.31.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
241
+ "model.layers.31.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
242
+ "model.layers.32.input_layernorm.weight": "model-00005-of-00006.safetensors",
243
+ "model.layers.32.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
244
+ "model.layers.32.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
245
+ "model.layers.32.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
246
+ "model.layers.32.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
247
+ "model.layers.32.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
248
+ "model.layers.32.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
249
+ "model.layers.32.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
250
+ "model.layers.32.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
251
+ "model.layers.33.input_layernorm.weight": "model-00005-of-00006.safetensors",
252
+ "model.layers.33.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
253
+ "model.layers.33.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
254
+ "model.layers.33.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
255
+ "model.layers.33.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
256
+ "model.layers.33.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
257
+ "model.layers.33.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
258
+ "model.layers.33.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
259
+ "model.layers.33.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
260
+ "model.layers.34.input_layernorm.weight": "model-00005-of-00006.safetensors",
261
+ "model.layers.34.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
262
+ "model.layers.34.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
263
+ "model.layers.34.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
264
+ "model.layers.34.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
265
+ "model.layers.34.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
266
+ "model.layers.34.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
267
+ "model.layers.34.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
268
+ "model.layers.34.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
269
+ "model.layers.35.input_layernorm.weight": "model-00005-of-00006.safetensors",
270
+ "model.layers.35.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
271
+ "model.layers.35.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
272
+ "model.layers.35.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
273
+ "model.layers.35.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
274
+ "model.layers.35.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
275
+ "model.layers.35.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
276
+ "model.layers.35.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
277
+ "model.layers.35.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
278
+ "model.layers.36.input_layernorm.weight": "model-00005-of-00006.safetensors",
279
+ "model.layers.36.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
280
+ "model.layers.36.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
281
+ "model.layers.36.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
282
+ "model.layers.36.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
283
+ "model.layers.36.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
284
+ "model.layers.36.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
285
+ "model.layers.36.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
286
+ "model.layers.36.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
287
+ "model.layers.37.input_layernorm.weight": "model-00005-of-00006.safetensors",
288
+ "model.layers.37.mlp.down_proj.weight": "model-00005-of-00006.safetensors",
289
+ "model.layers.37.mlp.gate_proj.weight": "model-00005-of-00006.safetensors",
290
+ "model.layers.37.mlp.up_proj.weight": "model-00005-of-00006.safetensors",
291
+ "model.layers.37.post_attention_layernorm.weight": "model-00005-of-00006.safetensors",
292
+ "model.layers.37.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
293
+ "model.layers.37.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
294
+ "model.layers.37.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
295
+ "model.layers.37.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
296
+ "model.layers.38.input_layernorm.weight": "model-00006-of-00006.safetensors",
297
+ "model.layers.38.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
298
+ "model.layers.38.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
299
+ "model.layers.38.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
300
+ "model.layers.38.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
301
+ "model.layers.38.self_attn.k_proj.weight": "model-00005-of-00006.safetensors",
302
+ "model.layers.38.self_attn.o_proj.weight": "model-00005-of-00006.safetensors",
303
+ "model.layers.38.self_attn.q_proj.weight": "model-00005-of-00006.safetensors",
304
+ "model.layers.38.self_attn.v_proj.weight": "model-00005-of-00006.safetensors",
305
+ "model.layers.39.input_layernorm.weight": "model-00006-of-00006.safetensors",
306
+ "model.layers.39.mlp.down_proj.weight": "model-00006-of-00006.safetensors",
307
+ "model.layers.39.mlp.gate_proj.weight": "model-00006-of-00006.safetensors",
308
+ "model.layers.39.mlp.up_proj.weight": "model-00006-of-00006.safetensors",
309
+ "model.layers.39.post_attention_layernorm.weight": "model-00006-of-00006.safetensors",
310
+ "model.layers.39.self_attn.k_proj.weight": "model-00006-of-00006.safetensors",
311
+ "model.layers.39.self_attn.o_proj.weight": "model-00006-of-00006.safetensors",
312
+ "model.layers.39.self_attn.q_proj.weight": "model-00006-of-00006.safetensors",
313
+ "model.layers.39.self_attn.v_proj.weight": "model-00006-of-00006.safetensors",
314
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00006.safetensors",
315
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
316
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
317
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
318
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
319
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
320
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
321
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
322
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
323
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00006.safetensors",
324
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
325
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
326
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
327
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
328
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
329
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
330
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
331
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
332
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00006.safetensors",
333
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00006.safetensors",
334
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00006.safetensors",
335
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00006.safetensors",
336
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00006.safetensors",
337
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
338
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00006.safetensors",
339
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
340
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
341
+ "model.layers.7.input_layernorm.weight": "model-00002-of-00006.safetensors",
342
+ "model.layers.7.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
343
+ "model.layers.7.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
344
+ "model.layers.7.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
345
+ "model.layers.7.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
346
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00006.safetensors",
347
+ "model.layers.7.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
348
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00006.safetensors",
349
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00006.safetensors",
350
+ "model.layers.8.input_layernorm.weight": "model-00002-of-00006.safetensors",
351
+ "model.layers.8.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
352
+ "model.layers.8.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
353
+ "model.layers.8.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
354
+ "model.layers.8.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
355
+ "model.layers.8.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
356
+ "model.layers.8.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
357
+ "model.layers.8.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
358
+ "model.layers.8.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
359
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00006.safetensors",
360
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00006.safetensors",
361
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00006.safetensors",
362
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00006.safetensors",
363
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00006.safetensors",
364
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00006.safetensors",
365
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00006.safetensors",
366
+ "model.layers.9.self_attn.q_proj.weight": "model-00002-of-00006.safetensors",
367
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00006.safetensors",
368
+ "model.norm.weight": "model-00006-of-00006.safetensors"
369
+ }
370
+ }
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22fbdb1b67d35d3bdf33980bedba90929198b8aa9bad69979c6fc93a7fea9ead
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:220b2c9be4830c2114c0cd03e5e9f17e949d2d663781712dd74c7bccd8cc9406
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8fda3c45e8c82e140095b9822919115d5a90482e03984f08bb04154524b2f0b0
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_3.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f30c7b9ed4ed0a8a8f9d03cf358a12108a09625455be447e21920c5728ea9cd9
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_4.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4c391d9675784793418426126d54d96dd00a1d17533e91f9bdab88e8fdabb189
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_5.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:78ea29a27f5478e28fb1a400c2be236af4940f285215a25d1205fdf92a1abe9b
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_6.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25d2920a0f7ca079d820ed9f655e6ea583d6f5b9a5354bd94a741f6eff9c7c8a
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/rng_state_7.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d1947ed01f38a7c1b17a3ea928471da012e842e13a22c1e392327eeae1fe0d9d
3
+ size 15984
uccix_instruct_191224_lr1e-5/checkpoint-312/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ea6b3a63e09799119c241c4aacb890f8cd5ff87c41bf39df1459f372e137d55
3
+ size 1064
uccix_instruct_191224_lr1e-5/checkpoint-312/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "</s>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
uccix_instruct_191224_lr1e-5/checkpoint-312/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
uccix_instruct_191224_lr1e-5/checkpoint-312/tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d1f5d0342153f3e3bbb37b2026ba64d0b25583df351345f87cd8b9a5658c2fb
3
+ size 558602
uccix_instruct_191224_lr1e-5/checkpoint-312/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "add_prefix_space": null,
5
+ "added_tokens_decoder": {
6
+ "0": {
7
+ "content": "<unk>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false,
12
+ "special": true
13
+ },
14
+ "1": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false,
20
+ "special": true
21
+ },
22
+ "2": {
23
+ "content": "</s>",
24
+ "lstrip": false,
25
+ "normalized": false,
26
+ "rstrip": false,
27
+ "single_word": false,
28
+ "special": true
29
+ }
30
+ },
31
+ "bos_token": "<s>",
32
+ "chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() + ' ' + eos_token }}{% endif %}{% endfor %}",
33
+ "clean_up_tokenization_spaces": false,
34
+ "eos_token": "</s>",
35
+ "legacy": true,
36
+ "model_max_length": 1000000000000000019884624838656,
37
+ "pad_token": "</s>",
38
+ "sp_model_kwargs": {},
39
+ "spaces_between_special_tokens": false,
40
+ "tokenizer_class": "LlamaTokenizer",
41
+ "unk_token": "<unk>",
42
+ "use_default_system_prompt": false
43
+ }
uccix_instruct_191224_lr1e-5/checkpoint-312/trainer_state.json ADDED
@@ -0,0 +1,1132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 2.0,
5
+ "eval_steps": 500,
6
+ "global_step": 312,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "epoch": 0.00641025641025641,
13
+ "grad_norm": 3.8148568052575884,
14
+ "learning_rate": 1.282051282051282e-07,
15
+ "loss": 4.889,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 0.01282051282051282,
20
+ "grad_norm": 4.453444589892027,
21
+ "learning_rate": 2.564102564102564e-07,
22
+ "loss": 4.9097,
23
+ "step": 2
24
+ },
25
+ {
26
+ "epoch": 0.02564102564102564,
27
+ "grad_norm": 4.896614258621833,
28
+ "learning_rate": 5.128205128205128e-07,
29
+ "loss": 4.9099,
30
+ "step": 4
31
+ },
32
+ {
33
+ "epoch": 0.038461538461538464,
34
+ "grad_norm": 4.456576485464451,
35
+ "learning_rate": 7.692307692307694e-07,
36
+ "loss": 4.9102,
37
+ "step": 6
38
+ },
39
+ {
40
+ "epoch": 0.05128205128205128,
41
+ "grad_norm": 4.193427815120892,
42
+ "learning_rate": 1.0256410256410257e-06,
43
+ "loss": 4.8924,
44
+ "step": 8
45
+ },
46
+ {
47
+ "epoch": 0.0641025641025641,
48
+ "grad_norm": 3.6726747534666555,
49
+ "learning_rate": 1.282051282051282e-06,
50
+ "loss": 4.8372,
51
+ "step": 10
52
+ },
53
+ {
54
+ "epoch": 0.07692307692307693,
55
+ "grad_norm": 3.337981680961211,
56
+ "learning_rate": 1.5384615384615387e-06,
57
+ "loss": 4.7794,
58
+ "step": 12
59
+ },
60
+ {
61
+ "epoch": 0.08974358974358974,
62
+ "grad_norm": 2.675890453922504,
63
+ "learning_rate": 1.794871794871795e-06,
64
+ "loss": 4.6191,
65
+ "step": 14
66
+ },
67
+ {
68
+ "epoch": 0.10256410256410256,
69
+ "grad_norm": 2.398848700299253,
70
+ "learning_rate": 2.0512820512820513e-06,
71
+ "loss": 4.5723,
72
+ "step": 16
73
+ },
74
+ {
75
+ "epoch": 0.11538461538461539,
76
+ "grad_norm": 1.8159784961859098,
77
+ "learning_rate": 2.307692307692308e-06,
78
+ "loss": 4.3568,
79
+ "step": 18
80
+ },
81
+ {
82
+ "epoch": 0.1282051282051282,
83
+ "grad_norm": 1.6094220673057946,
84
+ "learning_rate": 2.564102564102564e-06,
85
+ "loss": 4.2686,
86
+ "step": 20
87
+ },
88
+ {
89
+ "epoch": 0.14102564102564102,
90
+ "grad_norm": 1.4349818434671497,
91
+ "learning_rate": 2.8205128205128207e-06,
92
+ "loss": 4.169,
93
+ "step": 22
94
+ },
95
+ {
96
+ "epoch": 0.15384615384615385,
97
+ "grad_norm": 1.4412559958198408,
98
+ "learning_rate": 3.0769230769230774e-06,
99
+ "loss": 4.0415,
100
+ "step": 24
101
+ },
102
+ {
103
+ "epoch": 0.16666666666666666,
104
+ "grad_norm": 1.3626982007755366,
105
+ "learning_rate": 3.3333333333333333e-06,
106
+ "loss": 3.8569,
107
+ "step": 26
108
+ },
109
+ {
110
+ "epoch": 0.1794871794871795,
111
+ "grad_norm": 1.3679096739652512,
112
+ "learning_rate": 3.58974358974359e-06,
113
+ "loss": 3.7409,
114
+ "step": 28
115
+ },
116
+ {
117
+ "epoch": 0.19230769230769232,
118
+ "grad_norm": 1.3396391976584703,
119
+ "learning_rate": 3.846153846153847e-06,
120
+ "loss": 3.6585,
121
+ "step": 30
122
+ },
123
+ {
124
+ "epoch": 0.20512820512820512,
125
+ "grad_norm": 1.294876480457606,
126
+ "learning_rate": 4.102564102564103e-06,
127
+ "loss": 3.4961,
128
+ "step": 32
129
+ },
130
+ {
131
+ "epoch": 0.21794871794871795,
132
+ "grad_norm": 1.103820056614455,
133
+ "learning_rate": 4.358974358974359e-06,
134
+ "loss": 3.3518,
135
+ "step": 34
136
+ },
137
+ {
138
+ "epoch": 0.23076923076923078,
139
+ "grad_norm": 1.0522131115906572,
140
+ "learning_rate": 4.615384615384616e-06,
141
+ "loss": 3.1984,
142
+ "step": 36
143
+ },
144
+ {
145
+ "epoch": 0.24358974358974358,
146
+ "grad_norm": 1.0081732884085817,
147
+ "learning_rate": 4.871794871794872e-06,
148
+ "loss": 3.054,
149
+ "step": 38
150
+ },
151
+ {
152
+ "epoch": 0.2564102564102564,
153
+ "grad_norm": 0.9214039999549644,
154
+ "learning_rate": 5.128205128205128e-06,
155
+ "loss": 2.8628,
156
+ "step": 40
157
+ },
158
+ {
159
+ "epoch": 0.2692307692307692,
160
+ "grad_norm": 0.8143994876297143,
161
+ "learning_rate": 5.384615384615385e-06,
162
+ "loss": 2.7475,
163
+ "step": 42
164
+ },
165
+ {
166
+ "epoch": 0.28205128205128205,
167
+ "grad_norm": 0.700891765547207,
168
+ "learning_rate": 5.641025641025641e-06,
169
+ "loss": 2.5869,
170
+ "step": 44
171
+ },
172
+ {
173
+ "epoch": 0.2948717948717949,
174
+ "grad_norm": 0.7510674065754775,
175
+ "learning_rate": 5.897435897435898e-06,
176
+ "loss": 2.4461,
177
+ "step": 46
178
+ },
179
+ {
180
+ "epoch": 0.3076923076923077,
181
+ "grad_norm": 0.6794074940373539,
182
+ "learning_rate": 6.153846153846155e-06,
183
+ "loss": 2.3477,
184
+ "step": 48
185
+ },
186
+ {
187
+ "epoch": 0.32051282051282054,
188
+ "grad_norm": 0.5162215042692575,
189
+ "learning_rate": 6.410256410256412e-06,
190
+ "loss": 2.2152,
191
+ "step": 50
192
+ },
193
+ {
194
+ "epoch": 0.3333333333333333,
195
+ "grad_norm": 0.5146975027904754,
196
+ "learning_rate": 6.666666666666667e-06,
197
+ "loss": 2.1975,
198
+ "step": 52
199
+ },
200
+ {
201
+ "epoch": 0.34615384615384615,
202
+ "grad_norm": 0.4474574545979082,
203
+ "learning_rate": 6.923076923076923e-06,
204
+ "loss": 2.0824,
205
+ "step": 54
206
+ },
207
+ {
208
+ "epoch": 0.358974358974359,
209
+ "grad_norm": 0.40379510918119965,
210
+ "learning_rate": 7.17948717948718e-06,
211
+ "loss": 2.0388,
212
+ "step": 56
213
+ },
214
+ {
215
+ "epoch": 0.3717948717948718,
216
+ "grad_norm": 0.4109144194248555,
217
+ "learning_rate": 7.435897435897437e-06,
218
+ "loss": 1.9699,
219
+ "step": 58
220
+ },
221
+ {
222
+ "epoch": 0.38461538461538464,
223
+ "grad_norm": 0.36878556755849573,
224
+ "learning_rate": 7.692307692307694e-06,
225
+ "loss": 1.9252,
226
+ "step": 60
227
+ },
228
+ {
229
+ "epoch": 0.3974358974358974,
230
+ "grad_norm": 0.33951214974325605,
231
+ "learning_rate": 7.948717948717949e-06,
232
+ "loss": 1.8773,
233
+ "step": 62
234
+ },
235
+ {
236
+ "epoch": 0.41025641025641024,
237
+ "grad_norm": 0.31625266306424027,
238
+ "learning_rate": 8.205128205128205e-06,
239
+ "loss": 1.7966,
240
+ "step": 64
241
+ },
242
+ {
243
+ "epoch": 0.4230769230769231,
244
+ "grad_norm": 0.7180890498799148,
245
+ "learning_rate": 8.461538461538462e-06,
246
+ "loss": 1.8108,
247
+ "step": 66
248
+ },
249
+ {
250
+ "epoch": 0.4358974358974359,
251
+ "grad_norm": 0.33704662479371716,
252
+ "learning_rate": 8.717948717948719e-06,
253
+ "loss": 1.7498,
254
+ "step": 68
255
+ },
256
+ {
257
+ "epoch": 0.44871794871794873,
258
+ "grad_norm": 0.2761824271642518,
259
+ "learning_rate": 8.974358974358976e-06,
260
+ "loss": 1.7124,
261
+ "step": 70
262
+ },
263
+ {
264
+ "epoch": 0.46153846153846156,
265
+ "grad_norm": 0.24386286193528572,
266
+ "learning_rate": 9.230769230769232e-06,
267
+ "loss": 1.6382,
268
+ "step": 72
269
+ },
270
+ {
271
+ "epoch": 0.47435897435897434,
272
+ "grad_norm": 0.25885451676676363,
273
+ "learning_rate": 9.487179487179487e-06,
274
+ "loss": 1.6588,
275
+ "step": 74
276
+ },
277
+ {
278
+ "epoch": 0.48717948717948717,
279
+ "grad_norm": 0.3040030663690383,
280
+ "learning_rate": 9.743589743589744e-06,
281
+ "loss": 1.6209,
282
+ "step": 76
283
+ },
284
+ {
285
+ "epoch": 0.5,
286
+ "grad_norm": 0.26598080566137733,
287
+ "learning_rate": 1e-05,
288
+ "loss": 1.6294,
289
+ "step": 78
290
+ },
291
+ {
292
+ "epoch": 0.5128205128205128,
293
+ "grad_norm": 0.22696288673824674,
294
+ "learning_rate": 9.99995506314361e-06,
295
+ "loss": 1.58,
296
+ "step": 80
297
+ },
298
+ {
299
+ "epoch": 0.5256410256410257,
300
+ "grad_norm": 0.21242259411358655,
301
+ "learning_rate": 9.99982025338217e-06,
302
+ "loss": 1.5439,
303
+ "step": 82
304
+ },
305
+ {
306
+ "epoch": 0.5384615384615384,
307
+ "grad_norm": 0.20291826899403465,
308
+ "learning_rate": 9.999595573138845e-06,
309
+ "loss": 1.5274,
310
+ "step": 84
311
+ },
312
+ {
313
+ "epoch": 0.5512820512820513,
314
+ "grad_norm": 0.1855444412322797,
315
+ "learning_rate": 9.99928102645221e-06,
316
+ "loss": 1.5161,
317
+ "step": 86
318
+ },
319
+ {
320
+ "epoch": 0.5641025641025641,
321
+ "grad_norm": 0.17883874148398324,
322
+ "learning_rate": 9.99887661897616e-06,
323
+ "loss": 1.4916,
324
+ "step": 88
325
+ },
326
+ {
327
+ "epoch": 0.5769230769230769,
328
+ "grad_norm": 0.17041478792908024,
329
+ "learning_rate": 9.99838235797981e-06,
330
+ "loss": 1.4679,
331
+ "step": 90
332
+ },
333
+ {
334
+ "epoch": 0.5897435897435898,
335
+ "grad_norm": 0.1904762198987749,
336
+ "learning_rate": 9.997798252347382e-06,
337
+ "loss": 1.471,
338
+ "step": 92
339
+ },
340
+ {
341
+ "epoch": 0.6025641025641025,
342
+ "grad_norm": 0.19077041355708335,
343
+ "learning_rate": 9.99712431257802e-06,
344
+ "loss": 1.4672,
345
+ "step": 94
346
+ },
347
+ {
348
+ "epoch": 0.6153846153846154,
349
+ "grad_norm": 0.1702104328191874,
350
+ "learning_rate": 9.996360550785619e-06,
351
+ "loss": 1.4455,
352
+ "step": 96
353
+ },
354
+ {
355
+ "epoch": 0.6282051282051282,
356
+ "grad_norm": 0.19039133859515542,
357
+ "learning_rate": 9.9955069806986e-06,
358
+ "loss": 1.4727,
359
+ "step": 98
360
+ },
361
+ {
362
+ "epoch": 0.6410256410256411,
363
+ "grad_norm": 0.15448238517128507,
364
+ "learning_rate": 9.994563617659665e-06,
365
+ "loss": 1.4257,
366
+ "step": 100
367
+ },
368
+ {
369
+ "epoch": 0.6538461538461539,
370
+ "grad_norm": 0.15202351051018634,
371
+ "learning_rate": 9.993530478625524e-06,
372
+ "loss": 1.4214,
373
+ "step": 102
374
+ },
375
+ {
376
+ "epoch": 0.6666666666666666,
377
+ "grad_norm": 0.16296598133044526,
378
+ "learning_rate": 9.992407582166582e-06,
379
+ "loss": 1.4213,
380
+ "step": 104
381
+ },
382
+ {
383
+ "epoch": 0.6794871794871795,
384
+ "grad_norm": 0.1462038294164801,
385
+ "learning_rate": 9.991194948466615e-06,
386
+ "loss": 1.3993,
387
+ "step": 106
388
+ },
389
+ {
390
+ "epoch": 0.6923076923076923,
391
+ "grad_norm": 0.14470989191451086,
392
+ "learning_rate": 9.989892599322404e-06,
393
+ "loss": 1.4014,
394
+ "step": 108
395
+ },
396
+ {
397
+ "epoch": 0.7051282051282052,
398
+ "grad_norm": 0.15440545758233384,
399
+ "learning_rate": 9.988500558143337e-06,
400
+ "loss": 1.3878,
401
+ "step": 110
402
+ },
403
+ {
404
+ "epoch": 0.717948717948718,
405
+ "grad_norm": 0.1412948019214843,
406
+ "learning_rate": 9.987018849950996e-06,
407
+ "loss": 1.355,
408
+ "step": 112
409
+ },
410
+ {
411
+ "epoch": 0.7307692307692307,
412
+ "grad_norm": 0.15156074653795895,
413
+ "learning_rate": 9.985447501378706e-06,
414
+ "loss": 1.3642,
415
+ "step": 114
416
+ },
417
+ {
418
+ "epoch": 0.7435897435897436,
419
+ "grad_norm": 0.3875845143038168,
420
+ "learning_rate": 9.983786540671052e-06,
421
+ "loss": 1.3797,
422
+ "step": 116
423
+ },
424
+ {
425
+ "epoch": 0.7564102564102564,
426
+ "grad_norm": 0.15788537547887518,
427
+ "learning_rate": 9.982035997683372e-06,
428
+ "loss": 1.3388,
429
+ "step": 118
430
+ },
431
+ {
432
+ "epoch": 0.7692307692307693,
433
+ "grad_norm": 0.15056320914445512,
434
+ "learning_rate": 9.980195903881231e-06,
435
+ "loss": 1.343,
436
+ "step": 120
437
+ },
438
+ {
439
+ "epoch": 0.782051282051282,
440
+ "grad_norm": 0.1555129283317706,
441
+ "learning_rate": 9.978266292339838e-06,
442
+ "loss": 1.328,
443
+ "step": 122
444
+ },
445
+ {
446
+ "epoch": 0.7948717948717948,
447
+ "grad_norm": 0.14999182496915453,
448
+ "learning_rate": 9.976247197743465e-06,
449
+ "loss": 1.352,
450
+ "step": 124
451
+ },
452
+ {
453
+ "epoch": 0.8076923076923077,
454
+ "grad_norm": 0.14124313426191026,
455
+ "learning_rate": 9.974138656384815e-06,
456
+ "loss": 1.3243,
457
+ "step": 126
458
+ },
459
+ {
460
+ "epoch": 0.8205128205128205,
461
+ "grad_norm": 0.1378326204862212,
462
+ "learning_rate": 9.97194070616438e-06,
463
+ "loss": 1.3241,
464
+ "step": 128
465
+ },
466
+ {
467
+ "epoch": 0.8333333333333334,
468
+ "grad_norm": 0.14227960534974604,
469
+ "learning_rate": 9.969653386589749e-06,
470
+ "loss": 1.3219,
471
+ "step": 130
472
+ },
473
+ {
474
+ "epoch": 0.8461538461538461,
475
+ "grad_norm": 0.12713543749272155,
476
+ "learning_rate": 9.967276738774897e-06,
477
+ "loss": 1.3096,
478
+ "step": 132
479
+ },
480
+ {
481
+ "epoch": 0.8589743589743589,
482
+ "grad_norm": 0.15061232362563903,
483
+ "learning_rate": 9.964810805439464e-06,
484
+ "loss": 1.3011,
485
+ "step": 134
486
+ },
487
+ {
488
+ "epoch": 0.8717948717948718,
489
+ "grad_norm": 0.14361563348990292,
490
+ "learning_rate": 9.962255630907964e-06,
491
+ "loss": 1.2827,
492
+ "step": 136
493
+ },
494
+ {
495
+ "epoch": 0.8846153846153846,
496
+ "grad_norm": 0.17754387209035652,
497
+ "learning_rate": 9.959611261108999e-06,
498
+ "loss": 1.3185,
499
+ "step": 138
500
+ },
501
+ {
502
+ "epoch": 0.8974358974358975,
503
+ "grad_norm": 0.1458623897430443,
504
+ "learning_rate": 9.956877743574437e-06,
505
+ "loss": 1.3286,
506
+ "step": 140
507
+ },
508
+ {
509
+ "epoch": 0.9102564102564102,
510
+ "grad_norm": 0.14084398418567437,
511
+ "learning_rate": 9.954055127438554e-06,
512
+ "loss": 1.3005,
513
+ "step": 142
514
+ },
515
+ {
516
+ "epoch": 0.9230769230769231,
517
+ "grad_norm": 0.13580861113069753,
518
+ "learning_rate": 9.951143463437145e-06,
519
+ "loss": 1.3165,
520
+ "step": 144
521
+ },
522
+ {
523
+ "epoch": 0.9358974358974359,
524
+ "grad_norm": 0.13622051889734035,
525
+ "learning_rate": 9.948142803906623e-06,
526
+ "loss": 1.2929,
527
+ "step": 146
528
+ },
529
+ {
530
+ "epoch": 0.9487179487179487,
531
+ "grad_norm": 0.12679082371935066,
532
+ "learning_rate": 9.94505320278307e-06,
533
+ "loss": 1.2833,
534
+ "step": 148
535
+ },
536
+ {
537
+ "epoch": 0.9615384615384616,
538
+ "grad_norm": 0.11939382079952243,
539
+ "learning_rate": 9.94187471560127e-06,
540
+ "loss": 1.2851,
541
+ "step": 150
542
+ },
543
+ {
544
+ "epoch": 0.9743589743589743,
545
+ "grad_norm": 0.11752490134274678,
546
+ "learning_rate": 9.938607399493714e-06,
547
+ "loss": 1.2559,
548
+ "step": 152
549
+ },
550
+ {
551
+ "epoch": 0.9871794871794872,
552
+ "grad_norm": 0.11807212671773365,
553
+ "learning_rate": 9.935251313189564e-06,
554
+ "loss": 1.285,
555
+ "step": 154
556
+ },
557
+ {
558
+ "epoch": 1.0,
559
+ "grad_norm": 0.1120761333795772,
560
+ "learning_rate": 9.931806517013612e-06,
561
+ "loss": 1.2491,
562
+ "step": 156
563
+ },
564
+ {
565
+ "epoch": 1.0128205128205128,
566
+ "grad_norm": 0.10750345822189263,
567
+ "learning_rate": 9.92827307288518e-06,
568
+ "loss": 1.2442,
569
+ "step": 158
570
+ },
571
+ {
572
+ "epoch": 1.0256410256410255,
573
+ "grad_norm": 0.10918642022881683,
574
+ "learning_rate": 9.924651044317017e-06,
575
+ "loss": 1.2286,
576
+ "step": 160
577
+ },
578
+ {
579
+ "epoch": 1.0384615384615385,
580
+ "grad_norm": 0.11225330042691335,
581
+ "learning_rate": 9.920940496414153e-06,
582
+ "loss": 1.2158,
583
+ "step": 162
584
+ },
585
+ {
586
+ "epoch": 1.0512820512820513,
587
+ "grad_norm": 0.11366482652198566,
588
+ "learning_rate": 9.917141495872733e-06,
589
+ "loss": 1.2074,
590
+ "step": 164
591
+ },
592
+ {
593
+ "epoch": 1.064102564102564,
594
+ "grad_norm": 0.12295651003296312,
595
+ "learning_rate": 9.913254110978812e-06,
596
+ "loss": 1.2003,
597
+ "step": 166
598
+ },
599
+ {
600
+ "epoch": 1.0769230769230769,
601
+ "grad_norm": 0.1144456030840293,
602
+ "learning_rate": 9.909278411607134e-06,
603
+ "loss": 1.206,
604
+ "step": 168
605
+ },
606
+ {
607
+ "epoch": 1.0897435897435896,
608
+ "grad_norm": 0.2468334129961725,
609
+ "learning_rate": 9.90521446921987e-06,
610
+ "loss": 1.2235,
611
+ "step": 170
612
+ },
613
+ {
614
+ "epoch": 1.1025641025641026,
615
+ "grad_norm": 0.127278158070263,
616
+ "learning_rate": 9.90106235686534e-06,
617
+ "loss": 1.1928,
618
+ "step": 172
619
+ },
620
+ {
621
+ "epoch": 1.1153846153846154,
622
+ "grad_norm": 0.1280282060730887,
623
+ "learning_rate": 9.896822149176695e-06,
624
+ "loss": 1.2068,
625
+ "step": 174
626
+ },
627
+ {
628
+ "epoch": 1.1282051282051282,
629
+ "grad_norm": 0.1142922422404122,
630
+ "learning_rate": 9.892493922370575e-06,
631
+ "loss": 1.217,
632
+ "step": 176
633
+ },
634
+ {
635
+ "epoch": 1.141025641025641,
636
+ "grad_norm": 0.17470470224878323,
637
+ "learning_rate": 9.888077754245741e-06,
638
+ "loss": 1.2099,
639
+ "step": 178
640
+ },
641
+ {
642
+ "epoch": 1.1538461538461537,
643
+ "grad_norm": 0.10477882692325258,
644
+ "learning_rate": 9.883573724181683e-06,
645
+ "loss": 1.1944,
646
+ "step": 180
647
+ },
648
+ {
649
+ "epoch": 1.1666666666666667,
650
+ "grad_norm": 0.114790034377695,
651
+ "learning_rate": 9.878981913137178e-06,
652
+ "loss": 1.172,
653
+ "step": 182
654
+ },
655
+ {
656
+ "epoch": 1.1794871794871795,
657
+ "grad_norm": 0.1044922535107306,
658
+ "learning_rate": 9.87430240364885e-06,
659
+ "loss": 1.2147,
660
+ "step": 184
661
+ },
662
+ {
663
+ "epoch": 1.1923076923076923,
664
+ "grad_norm": 0.09771283060341285,
665
+ "learning_rate": 9.869535279829674e-06,
666
+ "loss": 1.173,
667
+ "step": 186
668
+ },
669
+ {
670
+ "epoch": 1.205128205128205,
671
+ "grad_norm": 0.1013995999635824,
672
+ "learning_rate": 9.864680627367476e-06,
673
+ "loss": 1.2023,
674
+ "step": 188
675
+ },
676
+ {
677
+ "epoch": 1.217948717948718,
678
+ "grad_norm": 0.10273326452887067,
679
+ "learning_rate": 9.859738533523384e-06,
680
+ "loss": 1.1732,
681
+ "step": 190
682
+ },
683
+ {
684
+ "epoch": 1.2307692307692308,
685
+ "grad_norm": 0.09684048616936082,
686
+ "learning_rate": 9.854709087130261e-06,
687
+ "loss": 1.1952,
688
+ "step": 192
689
+ },
690
+ {
691
+ "epoch": 1.2435897435897436,
692
+ "grad_norm": 0.10827760658070901,
693
+ "learning_rate": 9.849592378591113e-06,
694
+ "loss": 1.1864,
695
+ "step": 194
696
+ },
697
+ {
698
+ "epoch": 1.2564102564102564,
699
+ "grad_norm": 0.09989527940011267,
700
+ "learning_rate": 9.844388499877457e-06,
701
+ "loss": 1.2016,
702
+ "step": 196
703
+ },
704
+ {
705
+ "epoch": 1.2692307692307692,
706
+ "grad_norm": 0.09930771667309381,
707
+ "learning_rate": 9.839097544527674e-06,
708
+ "loss": 1.1738,
709
+ "step": 198
710
+ },
711
+ {
712
+ "epoch": 1.282051282051282,
713
+ "grad_norm": 0.1032001919164007,
714
+ "learning_rate": 9.833719607645325e-06,
715
+ "loss": 1.176,
716
+ "step": 200
717
+ },
718
+ {
719
+ "epoch": 1.294871794871795,
720
+ "grad_norm": 0.09859412157061716,
721
+ "learning_rate": 9.82825478589744e-06,
722
+ "loss": 1.1682,
723
+ "step": 202
724
+ },
725
+ {
726
+ "epoch": 1.3076923076923077,
727
+ "grad_norm": 0.09558235334437347,
728
+ "learning_rate": 9.822703177512783e-06,
729
+ "loss": 1.181,
730
+ "step": 204
731
+ },
732
+ {
733
+ "epoch": 1.3205128205128205,
734
+ "grad_norm": 0.08733478657745303,
735
+ "learning_rate": 9.817064882280085e-06,
736
+ "loss": 1.1686,
737
+ "step": 206
738
+ },
739
+ {
740
+ "epoch": 1.3333333333333333,
741
+ "grad_norm": 0.09397505343456257,
742
+ "learning_rate": 9.811340001546252e-06,
743
+ "loss": 1.1778,
744
+ "step": 208
745
+ },
746
+ {
747
+ "epoch": 1.3461538461538463,
748
+ "grad_norm": 0.09590407825516856,
749
+ "learning_rate": 9.805528638214543e-06,
750
+ "loss": 1.1542,
751
+ "step": 210
752
+ },
753
+ {
754
+ "epoch": 1.358974358974359,
755
+ "grad_norm": 0.0912508440064145,
756
+ "learning_rate": 9.799630896742716e-06,
757
+ "loss": 1.1643,
758
+ "step": 212
759
+ },
760
+ {
761
+ "epoch": 1.3717948717948718,
762
+ "grad_norm": 0.09258955107744923,
763
+ "learning_rate": 9.793646883141155e-06,
764
+ "loss": 1.1686,
765
+ "step": 214
766
+ },
767
+ {
768
+ "epoch": 1.3846153846153846,
769
+ "grad_norm": 0.09889457149777804,
770
+ "learning_rate": 9.787576704970965e-06,
771
+ "loss": 1.1677,
772
+ "step": 216
773
+ },
774
+ {
775
+ "epoch": 1.3974358974358974,
776
+ "grad_norm": 0.09374670756166416,
777
+ "learning_rate": 9.781420471342035e-06,
778
+ "loss": 1.146,
779
+ "step": 218
780
+ },
781
+ {
782
+ "epoch": 1.4102564102564101,
783
+ "grad_norm": 0.09136677460744856,
784
+ "learning_rate": 9.77517829291108e-06,
785
+ "loss": 1.1594,
786
+ "step": 220
787
+ },
788
+ {
789
+ "epoch": 1.4230769230769231,
790
+ "grad_norm": 0.10584946030378292,
791
+ "learning_rate": 9.768850281879651e-06,
792
+ "loss": 1.1865,
793
+ "step": 222
794
+ },
795
+ {
796
+ "epoch": 1.435897435897436,
797
+ "grad_norm": 0.09187981607301214,
798
+ "learning_rate": 9.762436551992117e-06,
799
+ "loss": 1.1606,
800
+ "step": 224
801
+ },
802
+ {
803
+ "epoch": 1.4487179487179487,
804
+ "grad_norm": 0.09880449655805854,
805
+ "learning_rate": 9.755937218533622e-06,
806
+ "loss": 1.1586,
807
+ "step": 226
808
+ },
809
+ {
810
+ "epoch": 1.4615384615384617,
811
+ "grad_norm": 0.08704607108972029,
812
+ "learning_rate": 9.74935239832801e-06,
813
+ "loss": 1.1746,
814
+ "step": 228
815
+ },
816
+ {
817
+ "epoch": 1.4743589743589745,
818
+ "grad_norm": 0.08909112778091671,
819
+ "learning_rate": 9.742682209735727e-06,
820
+ "loss": 1.1575,
821
+ "step": 230
822
+ },
823
+ {
824
+ "epoch": 1.4871794871794872,
825
+ "grad_norm": 0.09035998053799675,
826
+ "learning_rate": 9.735926772651703e-06,
827
+ "loss": 1.1678,
828
+ "step": 232
829
+ },
830
+ {
831
+ "epoch": 1.5,
832
+ "grad_norm": 0.09500864788295198,
833
+ "learning_rate": 9.729086208503174e-06,
834
+ "loss": 1.1466,
835
+ "step": 234
836
+ },
837
+ {
838
+ "epoch": 1.5128205128205128,
839
+ "grad_norm": 0.09247434213683463,
840
+ "learning_rate": 9.722160640247523e-06,
841
+ "loss": 1.1687,
842
+ "step": 236
843
+ },
844
+ {
845
+ "epoch": 1.5256410256410255,
846
+ "grad_norm": 0.09322212100100113,
847
+ "learning_rate": 9.715150192370054e-06,
848
+ "loss": 1.1376,
849
+ "step": 238
850
+ },
851
+ {
852
+ "epoch": 1.5384615384615383,
853
+ "grad_norm": 0.08824919508271642,
854
+ "learning_rate": 9.708054990881763e-06,
855
+ "loss": 1.1523,
856
+ "step": 240
857
+ },
858
+ {
859
+ "epoch": 1.5512820512820513,
860
+ "grad_norm": 0.25559730635424294,
861
+ "learning_rate": 9.700875163317072e-06,
862
+ "loss": 1.1488,
863
+ "step": 242
864
+ },
865
+ {
866
+ "epoch": 1.564102564102564,
867
+ "grad_norm": 0.2487505162861363,
868
+ "learning_rate": 9.693610838731532e-06,
869
+ "loss": 1.1481,
870
+ "step": 244
871
+ },
872
+ {
873
+ "epoch": 1.5769230769230769,
874
+ "grad_norm": 0.12151469789600829,
875
+ "learning_rate": 9.686262147699507e-06,
876
+ "loss": 1.1483,
877
+ "step": 246
878
+ },
879
+ {
880
+ "epoch": 1.5897435897435899,
881
+ "grad_norm": 0.10407519891252137,
882
+ "learning_rate": 9.678829222311827e-06,
883
+ "loss": 1.13,
884
+ "step": 248
885
+ },
886
+ {
887
+ "epoch": 1.6025641025641026,
888
+ "grad_norm": 0.11236395690738615,
889
+ "learning_rate": 9.671312196173413e-06,
890
+ "loss": 1.1493,
891
+ "step": 250
892
+ },
893
+ {
894
+ "epoch": 1.6153846153846154,
895
+ "grad_norm": 0.1012523372817843,
896
+ "learning_rate": 9.663711204400872e-06,
897
+ "loss": 1.148,
898
+ "step": 252
899
+ },
900
+ {
901
+ "epoch": 1.6282051282051282,
902
+ "grad_norm": 0.09652583778417714,
903
+ "learning_rate": 9.656026383620076e-06,
904
+ "loss": 1.1074,
905
+ "step": 254
906
+ },
907
+ {
908
+ "epoch": 1.641025641025641,
909
+ "grad_norm": 0.09448533541138639,
910
+ "learning_rate": 9.6482578719637e-06,
911
+ "loss": 1.1486,
912
+ "step": 256
913
+ },
914
+ {
915
+ "epoch": 1.6538461538461537,
916
+ "grad_norm": 0.09453430664055591,
917
+ "learning_rate": 9.640405809068743e-06,
918
+ "loss": 1.1197,
919
+ "step": 258
920
+ },
921
+ {
922
+ "epoch": 1.6666666666666665,
923
+ "grad_norm": 0.0952812616531032,
924
+ "learning_rate": 9.632470336074009e-06,
925
+ "loss": 1.1337,
926
+ "step": 260
927
+ },
928
+ {
929
+ "epoch": 1.6794871794871795,
930
+ "grad_norm": 0.09048018082770859,
931
+ "learning_rate": 9.624451595617588e-06,
932
+ "loss": 1.0885,
933
+ "step": 262
934
+ },
935
+ {
936
+ "epoch": 1.6923076923076923,
937
+ "grad_norm": 0.0922717302732401,
938
+ "learning_rate": 9.616349731834271e-06,
939
+ "loss": 1.1294,
940
+ "step": 264
941
+ },
942
+ {
943
+ "epoch": 1.7051282051282053,
944
+ "grad_norm": 0.09113342238000427,
945
+ "learning_rate": 9.608164890352977e-06,
946
+ "loss": 1.0871,
947
+ "step": 266
948
+ },
949
+ {
950
+ "epoch": 1.717948717948718,
951
+ "grad_norm": 0.10188653395954697,
952
+ "learning_rate": 9.599897218294122e-06,
953
+ "loss": 1.1237,
954
+ "step": 268
955
+ },
956
+ {
957
+ "epoch": 1.7307692307692308,
958
+ "grad_norm": 0.08946291041522332,
959
+ "learning_rate": 9.591546864266983e-06,
960
+ "loss": 1.1129,
961
+ "step": 270
962
+ },
963
+ {
964
+ "epoch": 1.7435897435897436,
965
+ "grad_norm": 0.092702242157672,
966
+ "learning_rate": 9.583113978367026e-06,
967
+ "loss": 1.1089,
968
+ "step": 272
969
+ },
970
+ {
971
+ "epoch": 1.7564102564102564,
972
+ "grad_norm": 0.1140491779513373,
973
+ "learning_rate": 9.574598712173202e-06,
974
+ "loss": 1.1286,
975
+ "step": 274
976
+ },
977
+ {
978
+ "epoch": 1.7692307692307692,
979
+ "grad_norm": 0.09516237353719291,
980
+ "learning_rate": 9.56600121874523e-06,
981
+ "loss": 1.1122,
982
+ "step": 276
983
+ },
984
+ {
985
+ "epoch": 1.782051282051282,
986
+ "grad_norm": 0.08916708413619781,
987
+ "learning_rate": 9.557321652620839e-06,
988
+ "loss": 1.1048,
989
+ "step": 278
990
+ },
991
+ {
992
+ "epoch": 1.7948717948717947,
993
+ "grad_norm": 0.09140805156925046,
994
+ "learning_rate": 9.548560169812997e-06,
995
+ "loss": 1.1058,
996
+ "step": 280
997
+ },
998
+ {
999
+ "epoch": 1.8076923076923077,
1000
+ "grad_norm": 0.08683635001330178,
1001
+ "learning_rate": 9.539716927807102e-06,
1002
+ "loss": 1.0925,
1003
+ "step": 282
1004
+ },
1005
+ {
1006
+ "epoch": 1.8205128205128205,
1007
+ "grad_norm": 0.09284148179598711,
1008
+ "learning_rate": 9.530792085558151e-06,
1009
+ "loss": 1.0948,
1010
+ "step": 284
1011
+ },
1012
+ {
1013
+ "epoch": 1.8333333333333335,
1014
+ "grad_norm": 0.08800610945553744,
1015
+ "learning_rate": 9.521785803487888e-06,
1016
+ "loss": 1.1116,
1017
+ "step": 286
1018
+ },
1019
+ {
1020
+ "epoch": 1.8461538461538463,
1021
+ "grad_norm": 0.08758546749473674,
1022
+ "learning_rate": 9.512698243481914e-06,
1023
+ "loss": 1.1059,
1024
+ "step": 288
1025
+ },
1026
+ {
1027
+ "epoch": 1.858974358974359,
1028
+ "grad_norm": 0.08336608124209365,
1029
+ "learning_rate": 9.50352956888678e-06,
1030
+ "loss": 1.1015,
1031
+ "step": 290
1032
+ },
1033
+ {
1034
+ "epoch": 1.8717948717948718,
1035
+ "grad_norm": 0.09199580396288136,
1036
+ "learning_rate": 9.49427994450705e-06,
1037
+ "loss": 1.0828,
1038
+ "step": 292
1039
+ },
1040
+ {
1041
+ "epoch": 1.8846153846153846,
1042
+ "grad_norm": 0.5410940704298627,
1043
+ "learning_rate": 9.484949536602343e-06,
1044
+ "loss": 1.1412,
1045
+ "step": 294
1046
+ },
1047
+ {
1048
+ "epoch": 1.8974358974358974,
1049
+ "grad_norm": 0.08913430120295451,
1050
+ "learning_rate": 9.47553851288434e-06,
1051
+ "loss": 1.1073,
1052
+ "step": 296
1053
+ },
1054
+ {
1055
+ "epoch": 1.9102564102564101,
1056
+ "grad_norm": 0.09420167495815907,
1057
+ "learning_rate": 9.466047042513767e-06,
1058
+ "loss": 1.0957,
1059
+ "step": 298
1060
+ },
1061
+ {
1062
+ "epoch": 1.9230769230769231,
1063
+ "grad_norm": 0.08189970955203785,
1064
+ "learning_rate": 9.45647529609736e-06,
1065
+ "loss": 1.0909,
1066
+ "step": 300
1067
+ },
1068
+ {
1069
+ "epoch": 1.935897435897436,
1070
+ "grad_norm": 0.09065809775757692,
1071
+ "learning_rate": 9.4468234456848e-06,
1072
+ "loss": 1.0896,
1073
+ "step": 302
1074
+ },
1075
+ {
1076
+ "epoch": 1.9487179487179487,
1077
+ "grad_norm": 0.08763498764491487,
1078
+ "learning_rate": 9.437091664765611e-06,
1079
+ "loss": 1.1099,
1080
+ "step": 304
1081
+ },
1082
+ {
1083
+ "epoch": 1.9615384615384617,
1084
+ "grad_norm": 0.09257403574026254,
1085
+ "learning_rate": 9.427280128266049e-06,
1086
+ "loss": 1.1236,
1087
+ "step": 306
1088
+ },
1089
+ {
1090
+ "epoch": 1.9743589743589745,
1091
+ "grad_norm": 0.08983923370086075,
1092
+ "learning_rate": 9.41738901254596e-06,
1093
+ "loss": 1.0909,
1094
+ "step": 308
1095
+ },
1096
+ {
1097
+ "epoch": 1.9871794871794872,
1098
+ "grad_norm": 0.086289850522152,
1099
+ "learning_rate": 9.4074184953956e-06,
1100
+ "loss": 1.0942,
1101
+ "step": 310
1102
+ },
1103
+ {
1104
+ "epoch": 2.0,
1105
+ "grad_norm": 0.0874296283040965,
1106
+ "learning_rate": 9.397368756032445e-06,
1107
+ "loss": 1.0651,
1108
+ "step": 312
1109
+ }
1110
+ ],
1111
+ "logging_steps": 2,
1112
+ "max_steps": 1560,
1113
+ "num_input_tokens_seen": 0,
1114
+ "num_train_epochs": 10,
1115
+ "save_steps": 500,
1116
+ "stateful_callbacks": {
1117
+ "TrainerControl": {
1118
+ "args": {
1119
+ "should_epoch_stop": false,
1120
+ "should_evaluate": false,
1121
+ "should_log": false,
1122
+ "should_save": true,
1123
+ "should_training_stop": false
1124
+ },
1125
+ "attributes": {}
1126
+ }
1127
+ },
1128
+ "total_flos": 1.263134196533035e+19,
1129
+ "train_batch_size": 2,
1130
+ "trial_name": null,
1131
+ "trial_params": null
1132
+ }
uccix_instruct_191224_lr1e-5/checkpoint-312/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d03657189395bc20a651edd32d0f180bbab64bb031be8ead254fb2e38ffc37e
3
+ size 7288
uccix_instruct_191224_lr1e-5/checkpoint-312/zero_to_fp32.py ADDED
@@ -0,0 +1,592 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: python zero_to_fp32.py . pytorch_model.bin
14
+
15
+ import argparse
16
+ import torch
17
+ import glob
18
+ import math
19
+ import os
20
+ import re
21
+ from collections import OrderedDict
22
+ from dataclasses import dataclass
23
+
24
+ # while this script doesn't use deepspeed to recover data, since the checkpoints are pickled with
25
+ # DeepSpeed data structures it has to be available in the current python environment.
26
+ from deepspeed.utils import logger
27
+ from deepspeed.checkpoint.constants import (DS_VERSION, OPTIMIZER_STATE_DICT, SINGLE_PARTITION_OF_FP32_GROUPS,
28
+ FP32_FLAT_GROUPS, ZERO_STAGE, PARTITION_COUNT, PARAM_SHAPES, BUFFER_NAMES,
29
+ FROZEN_PARAM_SHAPES, FROZEN_PARAM_FRAGMENTS)
30
+
31
+
32
+ @dataclass
33
+ class zero_model_state:
34
+ buffers: dict()
35
+ param_shapes: dict()
36
+ shared_params: list
37
+ ds_version: int
38
+ frozen_param_shapes: dict()
39
+ frozen_param_fragments: dict()
40
+
41
+
42
+ debug = 0
43
+
44
+ # load to cpu
45
+ device = torch.device('cpu')
46
+
47
+
48
+ def atoi(text):
49
+ return int(text) if text.isdigit() else text
50
+
51
+
52
+ def natural_keys(text):
53
+ '''
54
+ alist.sort(key=natural_keys) sorts in human order
55
+ http://nedbatchelder.com/blog/200712/human_sorting.html
56
+ (See Toothy's implementation in the comments)
57
+ '''
58
+ return [atoi(c) for c in re.split(r'(\d+)', text)]
59
+
60
+
61
+ def get_model_state_file(checkpoint_dir, zero_stage):
62
+ if not os.path.isdir(checkpoint_dir):
63
+ raise FileNotFoundError(f"Directory '{checkpoint_dir}' doesn't exist")
64
+
65
+ # there should be only one file
66
+ if zero_stage <= 2:
67
+ file = os.path.join(checkpoint_dir, "mp_rank_00_model_states.pt")
68
+ elif zero_stage == 3:
69
+ file = os.path.join(checkpoint_dir, "zero_pp_rank_0_mp_rank_00_model_states.pt")
70
+
71
+ if not os.path.exists(file):
72
+ raise FileNotFoundError(f"can't find model states file at '{file}'")
73
+
74
+ return file
75
+
76
+
77
+ def get_checkpoint_files(checkpoint_dir, glob_pattern):
78
+ # XXX: need to test that this simple glob rule works for multi-node setup too
79
+ ckpt_files = sorted(glob.glob(os.path.join(checkpoint_dir, glob_pattern)), key=natural_keys)
80
+
81
+ if len(ckpt_files) == 0:
82
+ raise FileNotFoundError(f"can't find {glob_pattern} files in directory '{checkpoint_dir}'")
83
+
84
+ return ckpt_files
85
+
86
+
87
+ def get_optim_files(checkpoint_dir):
88
+ return get_checkpoint_files(checkpoint_dir, "*_optim_states.pt")
89
+
90
+
91
+ def get_model_state_files(checkpoint_dir):
92
+ return get_checkpoint_files(checkpoint_dir, "*_model_states.pt")
93
+
94
+
95
+ def parse_model_states(files):
96
+ zero_model_states = []
97
+ for file in files:
98
+ state_dict = torch.load(file, map_location=device)
99
+
100
+ if BUFFER_NAMES not in state_dict:
101
+ raise ValueError(f"{file} is not a model state checkpoint")
102
+ buffer_names = state_dict[BUFFER_NAMES]
103
+ if debug:
104
+ print("Found buffers:", buffer_names)
105
+
106
+ # recover just the buffers while restoring them to fp32 if they were saved in fp16
107
+ buffers = {k: v.float() for k, v in state_dict["module"].items() if k in buffer_names}
108
+ param_shapes = state_dict[PARAM_SHAPES]
109
+
110
+ # collect parameters that are included in param_shapes
111
+ param_names = []
112
+ for s in param_shapes:
113
+ for name in s.keys():
114
+ param_names.append(name)
115
+
116
+ # update with frozen parameters
117
+ frozen_param_shapes = state_dict.get(FROZEN_PARAM_SHAPES, None)
118
+ if frozen_param_shapes is not None:
119
+ if debug:
120
+ print(f"Found frozen_param_shapes: {frozen_param_shapes}")
121
+ param_names += list(frozen_param_shapes.keys())
122
+
123
+ # handle shared params
124
+ shared_params = [[k, v] for k, v in state_dict["shared_params"].items()]
125
+
126
+ ds_version = state_dict.get(DS_VERSION, None)
127
+
128
+ frozen_param_fragments = state_dict.get(FROZEN_PARAM_FRAGMENTS, None)
129
+
130
+ z_model_state = zero_model_state(buffers=buffers,
131
+ param_shapes=param_shapes,
132
+ shared_params=shared_params,
133
+ ds_version=ds_version,
134
+ frozen_param_shapes=frozen_param_shapes,
135
+ frozen_param_fragments=frozen_param_fragments)
136
+ zero_model_states.append(z_model_state)
137
+
138
+ return zero_model_states
139
+
140
+
141
+ def parse_optim_states(files, ds_checkpoint_dir):
142
+
143
+ total_files = len(files)
144
+ state_dicts = []
145
+ for f in files:
146
+ state_dict = torch.load(f, map_location=device)
147
+ # immediately discard the potentially huge 2 optimizer states as we only care for fp32 master weights
148
+ # and also handle the case where it was already removed by another helper script
149
+ state_dict["optimizer_state_dict"].pop("optimizer_state_dict", None)
150
+ state_dicts.append(state_dict)
151
+
152
+ if not ZERO_STAGE in state_dicts[0][OPTIMIZER_STATE_DICT]:
153
+ raise ValueError(f"{files[0]} is not a zero checkpoint")
154
+ zero_stage = state_dicts[0][OPTIMIZER_STATE_DICT][ZERO_STAGE]
155
+ world_size = state_dicts[0][OPTIMIZER_STATE_DICT][PARTITION_COUNT]
156
+
157
+ # For ZeRO-2 each param group can have different partition_count as data parallelism for expert
158
+ # parameters can be different from data parallelism for non-expert parameters. So we can just
159
+ # use the max of the partition_count to get the dp world_size.
160
+
161
+ if type(world_size) is list:
162
+ world_size = max(world_size)
163
+
164
+ if world_size != total_files:
165
+ raise ValueError(
166
+ f"Expected {world_size} of '*_optim_states.pt' under '{ds_checkpoint_dir}' but found {total_files} files. "
167
+ "Possibly due to an overwrite of an old checkpoint, or a checkpoint didn't get saved by one or more processes."
168
+ )
169
+
170
+ # the groups are named differently in each stage
171
+ if zero_stage <= 2:
172
+ fp32_groups_key = SINGLE_PARTITION_OF_FP32_GROUPS
173
+ elif zero_stage == 3:
174
+ fp32_groups_key = FP32_FLAT_GROUPS
175
+ else:
176
+ raise ValueError(f"unknown zero stage {zero_stage}")
177
+
178
+ if zero_stage <= 2:
179
+ fp32_flat_groups = [state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key] for i in range(len(state_dicts))]
180
+ elif zero_stage == 3:
181
+ # if there is more than one param group, there will be multiple flattened tensors - one
182
+ # flattened tensor per group - for simplicity merge them into a single tensor
183
+ #
184
+ # XXX: could make the script more memory efficient for when there are multiple groups - it
185
+ # will require matching the sub-lists of param_shapes for each param group flattened tensor
186
+
187
+ fp32_flat_groups = [
188
+ torch.cat(state_dicts[i][OPTIMIZER_STATE_DICT][fp32_groups_key], 0) for i in range(len(state_dicts))
189
+ ]
190
+
191
+ return zero_stage, world_size, fp32_flat_groups
192
+
193
+
194
+ def _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir):
195
+ """
196
+ Returns fp32 state_dict reconstructed from ds checkpoint
197
+
198
+ Args:
199
+ - ``ds_checkpoint_dir``: path to the deepspeed checkpoint folder (where the optimizer files are)
200
+
201
+ """
202
+ print(f"Processing zero checkpoint '{ds_checkpoint_dir}'")
203
+
204
+ optim_files = get_optim_files(ds_checkpoint_dir)
205
+ zero_stage, world_size, fp32_flat_groups = parse_optim_states(optim_files, ds_checkpoint_dir)
206
+ print(f"Detected checkpoint of type zero stage {zero_stage}, world_size: {world_size}")
207
+
208
+ model_files = get_model_state_files(ds_checkpoint_dir)
209
+
210
+ zero_model_states = parse_model_states(model_files)
211
+ print(f'Parsing checkpoint created by deepspeed=={zero_model_states[0].ds_version}')
212
+
213
+ if zero_stage <= 2:
214
+ return _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states)
215
+ elif zero_stage == 3:
216
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states)
217
+
218
+
219
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
220
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
221
+ return
222
+
223
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
224
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
225
+
226
+ if debug:
227
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
228
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
229
+
230
+ wanted_params = len(frozen_param_shapes)
231
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
232
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
233
+ print(f'Frozen params: Have {avail_numel} numels to process.')
234
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
235
+
236
+ total_params = 0
237
+ total_numel = 0
238
+ for name, shape in frozen_param_shapes.items():
239
+ total_params += 1
240
+ unpartitioned_numel = shape.numel()
241
+ total_numel += unpartitioned_numel
242
+
243
+ state_dict[name] = frozen_param_fragments[name]
244
+
245
+ if debug:
246
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
247
+
248
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
249
+
250
+
251
+ def _has_callable(obj, fn):
252
+ attr = getattr(obj, fn, None)
253
+ return callable(attr)
254
+
255
+
256
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
257
+ param_shapes = zero_model_states[0].param_shapes
258
+
259
+ # Reconstruction protocol:
260
+ #
261
+ # XXX: document this
262
+
263
+ if debug:
264
+ for i in range(world_size):
265
+ for j in range(len(fp32_flat_groups[0])):
266
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
267
+
268
+ # XXX: memory usage doubles here (zero2)
269
+ num_param_groups = len(fp32_flat_groups[0])
270
+ merged_single_partition_of_fp32_groups = []
271
+ for i in range(num_param_groups):
272
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
273
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
274
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
275
+ avail_numel = sum(
276
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
277
+
278
+ if debug:
279
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
280
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
281
+ # not asserting if there is a mismatch due to possible padding
282
+ print(f"Have {avail_numel} numels to process.")
283
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
284
+
285
+ # params
286
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
287
+ # out-of-core computing solution
288
+ total_numel = 0
289
+ total_params = 0
290
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
291
+ offset = 0
292
+ avail_numel = full_single_fp32_vector.numel()
293
+ for name, shape in shapes.items():
294
+
295
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
296
+ total_numel += unpartitioned_numel
297
+ total_params += 1
298
+
299
+ if debug:
300
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
301
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
302
+ offset += unpartitioned_numel
303
+
304
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
305
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
306
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
307
+ # live optimizer object, so we are checking that the numbers are within the right range
308
+ align_to = 2 * world_size
309
+
310
+ def zero2_align(x):
311
+ return align_to * math.ceil(x / align_to)
312
+
313
+ if debug:
314
+ print(f"original offset={offset}, avail_numel={avail_numel}")
315
+
316
+ offset = zero2_align(offset)
317
+ avail_numel = zero2_align(avail_numel)
318
+
319
+ if debug:
320
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
321
+
322
+ # Sanity check
323
+ if offset != avail_numel:
324
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
325
+
326
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
327
+
328
+
329
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states):
330
+ state_dict = OrderedDict()
331
+
332
+ # buffers
333
+ buffers = zero_model_states[0].buffers
334
+ state_dict.update(buffers)
335
+ if debug:
336
+ print(f"added {len(buffers)} buffers")
337
+
338
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
339
+
340
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
341
+
342
+ # recover shared parameters
343
+ for pair in zero_model_states[0].shared_params:
344
+ if pair[1] in state_dict:
345
+ state_dict[pair[0]] = state_dict[pair[1]]
346
+
347
+ return state_dict
348
+
349
+
350
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
351
+ remainder = unpartitioned_numel % world_size
352
+ padding_numel = (world_size - remainder) if remainder else 0
353
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
354
+ return partitioned_numel, padding_numel
355
+
356
+
357
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
358
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
359
+ return
360
+
361
+ if debug:
362
+ for i in range(world_size):
363
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
364
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
365
+
366
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
367
+ wanted_params = len(frozen_param_shapes)
368
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
369
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
370
+ print(f'Frozen params: Have {avail_numel} numels to process.')
371
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
372
+
373
+ total_params = 0
374
+ total_numel = 0
375
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
376
+ total_params += 1
377
+ unpartitioned_numel = shape.numel()
378
+ total_numel += unpartitioned_numel
379
+
380
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
381
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
382
+
383
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
384
+
385
+ if debug:
386
+ print(
387
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
388
+ )
389
+
390
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
391
+
392
+
393
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
394
+ param_shapes = zero_model_states[0].param_shapes
395
+ avail_numel = fp32_flat_groups[0].numel() * world_size
396
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
397
+ # param, re-consolidating each param, while dealing with padding if any
398
+
399
+ # merge list of dicts, preserving order
400
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
401
+
402
+ if debug:
403
+ for i in range(world_size):
404
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
405
+
406
+ wanted_params = len(param_shapes)
407
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
408
+ # not asserting if there is a mismatch due to possible padding
409
+ avail_numel = fp32_flat_groups[0].numel() * world_size
410
+ print(f"Trainable params: Have {avail_numel} numels to process.")
411
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
412
+
413
+ # params
414
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
415
+ # out-of-core computing solution
416
+ offset = 0
417
+ total_numel = 0
418
+ total_params = 0
419
+ for name, shape in param_shapes.items():
420
+
421
+ unpartitioned_numel = shape.numel()
422
+ total_numel += unpartitioned_numel
423
+ total_params += 1
424
+
425
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
426
+
427
+ if debug:
428
+ print(
429
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
430
+ )
431
+
432
+ # XXX: memory usage doubles here
433
+ state_dict[name] = torch.cat(
434
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
435
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
436
+ offset += partitioned_numel
437
+
438
+ offset *= world_size
439
+
440
+ # Sanity check
441
+ if offset != avail_numel:
442
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
443
+
444
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
445
+
446
+
447
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states):
448
+ state_dict = OrderedDict()
449
+
450
+ # buffers
451
+ buffers = zero_model_states[0].buffers
452
+ state_dict.update(buffers)
453
+ if debug:
454
+ print(f"added {len(buffers)} buffers")
455
+
456
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
457
+
458
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
459
+
460
+ # recover shared parameters
461
+ for pair in zero_model_states[0].shared_params:
462
+ if pair[1] in state_dict:
463
+ state_dict[pair[0]] = state_dict[pair[1]]
464
+
465
+ return state_dict
466
+
467
+
468
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None):
469
+ """
470
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
471
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
472
+ via a model hub.
473
+
474
+ Args:
475
+ - ``checkpoint_dir``: path to the desired checkpoint folder
476
+ - ``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``
477
+
478
+ Returns:
479
+ - pytorch ``state_dict``
480
+
481
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
482
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
483
+ the checkpoint.
484
+
485
+ A typical usage might be ::
486
+
487
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
488
+ # do the training and checkpoint saving
489
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
490
+ model = model.cpu() # move to cpu
491
+ model.load_state_dict(state_dict)
492
+ # submit to model hub or save the model to share with others
493
+
494
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
495
+ application. i.e. you will need to re-initialize the deepspeed engine, since
496
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
497
+
498
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
499
+
500
+ """
501
+ if tag is None:
502
+ latest_path = os.path.join(checkpoint_dir, 'latest')
503
+ if os.path.isfile(latest_path):
504
+ with open(latest_path, 'r') as fd:
505
+ tag = fd.read().strip()
506
+ else:
507
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
508
+
509
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
510
+
511
+ if not os.path.isdir(ds_checkpoint_dir):
512
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
513
+
514
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir)
515
+
516
+
517
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None):
518
+ """
519
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
520
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
521
+
522
+ Args:
523
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
524
+ - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
525
+ - ``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``
526
+ """
527
+
528
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
529
+ print(f"Saving fp32 state dict to {output_file}")
530
+ torch.save(state_dict, output_file)
531
+
532
+
533
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
534
+ """
535
+ 1. Put the provided model to cpu
536
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
537
+ 3. Load it into the provided model
538
+
539
+ Args:
540
+ - ``model``: the model object to update
541
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
542
+ - ``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``
543
+
544
+ Returns:
545
+ - ``model`: modified model
546
+
547
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
548
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
549
+ conveniently placed for you in the checkpoint folder.
550
+
551
+ A typical usage might be ::
552
+
553
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
554
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
555
+ # submit to model hub or save the model to share with others
556
+
557
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
558
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
559
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
560
+
561
+ """
562
+ logger.info(f"Extracting fp32 weights")
563
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
564
+
565
+ logger.info(f"Overwriting model with fp32 weights")
566
+ model = model.cpu()
567
+ model.load_state_dict(state_dict, strict=False)
568
+
569
+ return model
570
+
571
+
572
+ if __name__ == "__main__":
573
+
574
+ parser = argparse.ArgumentParser()
575
+ parser.add_argument("checkpoint_dir",
576
+ type=str,
577
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
578
+ parser.add_argument(
579
+ "output_file",
580
+ type=str,
581
+ help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
582
+ parser.add_argument("-t",
583
+ "--tag",
584
+ type=str,
585
+ default=None,
586
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
587
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
588
+ args = parser.parse_args()
589
+
590
+ debug = args.debug
591
+
592
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir, args.output_file, tag=args.tag)