Upload folder using huggingface_hub
Browse files- added_tokens.json +13 -0
- config.json +138 -0
- generation_config.json +11 -0
- global_step5300/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt +3 -0
- global_step5300/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt +3 -0
- global_step5300/zero_pp_rank_0_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_1_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_2_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_3_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_4_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_5_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_6_mp_rank_00_model_states.pt +3 -0
- global_step5300/zero_pp_rank_7_mp_rank_00_model_states.pt +3 -0
- latest +1 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +202 -0
- rng_state_0.pth +3 -0
- rng_state_1.pth +3 -0
- rng_state_2.pth +3 -0
- rng_state_3.pth +3 -0
- rng_state_4.pth +3 -0
- rng_state_5.pth +3 -0
- rng_state_6.pth +3 -0
- rng_state_7.pth +3 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +131 -0
- trainer_state.json +828 -0
- training_args.bin +3 -0
- zero_to_fp32.py +592 -0
added_tokens.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"<|assistant|>": 32001,
|
| 3 |
+
"<|endoftext|>": 32000,
|
| 4 |
+
"<|end|>": 32007,
|
| 5 |
+
"<|placeholder1|>": 32002,
|
| 6 |
+
"<|placeholder2|>": 32003,
|
| 7 |
+
"<|placeholder3|>": 32004,
|
| 8 |
+
"<|placeholder4|>": 32005,
|
| 9 |
+
"<|placeholder5|>": 32008,
|
| 10 |
+
"<|placeholder6|>": 32009,
|
| 11 |
+
"<|system|>": 32006,
|
| 12 |
+
"<|user|>": 32010
|
| 13 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "microsoft/Phi-3.5-mini-instruct",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"Phi3ForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"auto_map": {
|
| 9 |
+
"AutoConfig": "microsoft/Phi-3.5-mini-instruct--configuration_phi3.Phi3Config",
|
| 10 |
+
"AutoModelForCausalLM": "microsoft/Phi-3.5-mini-instruct--modeling_phi3.Phi3ForCausalLM"
|
| 11 |
+
},
|
| 12 |
+
"bos_token_id": 1,
|
| 13 |
+
"embd_pdrop": 0.0,
|
| 14 |
+
"eos_token_id": 32000,
|
| 15 |
+
"hidden_act": "silu",
|
| 16 |
+
"hidden_size": 3072,
|
| 17 |
+
"initializer_range": 0.02,
|
| 18 |
+
"intermediate_size": 8192,
|
| 19 |
+
"max_position_embeddings": 131072,
|
| 20 |
+
"model_type": "phi3",
|
| 21 |
+
"num_attention_heads": 32,
|
| 22 |
+
"num_hidden_layers": 32,
|
| 23 |
+
"num_key_value_heads": 32,
|
| 24 |
+
"original_max_position_embeddings": 4096,
|
| 25 |
+
"pad_token_id": 32000,
|
| 26 |
+
"resid_pdrop": 0.0,
|
| 27 |
+
"rms_norm_eps": 1e-05,
|
| 28 |
+
"rope_scaling": {
|
| 29 |
+
"long_factor": [
|
| 30 |
+
1.0800000429153442,
|
| 31 |
+
1.1100000143051147,
|
| 32 |
+
1.1399999856948853,
|
| 33 |
+
1.340000033378601,
|
| 34 |
+
1.5899999141693115,
|
| 35 |
+
1.600000023841858,
|
| 36 |
+
1.6200000047683716,
|
| 37 |
+
2.620000123977661,
|
| 38 |
+
3.2300000190734863,
|
| 39 |
+
3.2300000190734863,
|
| 40 |
+
4.789999961853027,
|
| 41 |
+
7.400000095367432,
|
| 42 |
+
7.700000286102295,
|
| 43 |
+
9.09000015258789,
|
| 44 |
+
12.199999809265137,
|
| 45 |
+
17.670000076293945,
|
| 46 |
+
24.46000099182129,
|
| 47 |
+
28.57000160217285,
|
| 48 |
+
30.420001983642578,
|
| 49 |
+
30.840002059936523,
|
| 50 |
+
32.590003967285156,
|
| 51 |
+
32.93000411987305,
|
| 52 |
+
42.320003509521484,
|
| 53 |
+
44.96000289916992,
|
| 54 |
+
50.340003967285156,
|
| 55 |
+
50.45000457763672,
|
| 56 |
+
57.55000305175781,
|
| 57 |
+
57.93000411987305,
|
| 58 |
+
58.21000289916992,
|
| 59 |
+
60.1400032043457,
|
| 60 |
+
62.61000442504883,
|
| 61 |
+
62.62000274658203,
|
| 62 |
+
62.71000289916992,
|
| 63 |
+
63.1400032043457,
|
| 64 |
+
63.1400032043457,
|
| 65 |
+
63.77000427246094,
|
| 66 |
+
63.93000411987305,
|
| 67 |
+
63.96000289916992,
|
| 68 |
+
63.970001220703125,
|
| 69 |
+
64.02999877929688,
|
| 70 |
+
64.06999969482422,
|
| 71 |
+
64.08000183105469,
|
| 72 |
+
64.12000274658203,
|
| 73 |
+
64.41000366210938,
|
| 74 |
+
64.4800033569336,
|
| 75 |
+
64.51000213623047,
|
| 76 |
+
64.52999877929688,
|
| 77 |
+
64.83999633789062
|
| 78 |
+
],
|
| 79 |
+
"short_factor": [
|
| 80 |
+
1.0,
|
| 81 |
+
1.0199999809265137,
|
| 82 |
+
1.0299999713897705,
|
| 83 |
+
1.0299999713897705,
|
| 84 |
+
1.0499999523162842,
|
| 85 |
+
1.0499999523162842,
|
| 86 |
+
1.0499999523162842,
|
| 87 |
+
1.0499999523162842,
|
| 88 |
+
1.0499999523162842,
|
| 89 |
+
1.0699999332427979,
|
| 90 |
+
1.0999999046325684,
|
| 91 |
+
1.1099998950958252,
|
| 92 |
+
1.1599998474121094,
|
| 93 |
+
1.1599998474121094,
|
| 94 |
+
1.1699998378753662,
|
| 95 |
+
1.2899998426437378,
|
| 96 |
+
1.339999794960022,
|
| 97 |
+
1.679999828338623,
|
| 98 |
+
1.7899998426437378,
|
| 99 |
+
1.8199998140335083,
|
| 100 |
+
1.8499997854232788,
|
| 101 |
+
1.8799997568130493,
|
| 102 |
+
1.9099997282028198,
|
| 103 |
+
1.9399996995925903,
|
| 104 |
+
1.9899996519088745,
|
| 105 |
+
2.0199997425079346,
|
| 106 |
+
2.0199997425079346,
|
| 107 |
+
2.0199997425079346,
|
| 108 |
+
2.0199997425079346,
|
| 109 |
+
2.0199997425079346,
|
| 110 |
+
2.0199997425079346,
|
| 111 |
+
2.0299997329711914,
|
| 112 |
+
2.0299997329711914,
|
| 113 |
+
2.0299997329711914,
|
| 114 |
+
2.0299997329711914,
|
| 115 |
+
2.0299997329711914,
|
| 116 |
+
2.0299997329711914,
|
| 117 |
+
2.0299997329711914,
|
| 118 |
+
2.0299997329711914,
|
| 119 |
+
2.0299997329711914,
|
| 120 |
+
2.0799996852874756,
|
| 121 |
+
2.0899996757507324,
|
| 122 |
+
2.189999580383301,
|
| 123 |
+
2.2199995517730713,
|
| 124 |
+
2.5899994373321533,
|
| 125 |
+
2.729999542236328,
|
| 126 |
+
2.749999523162842,
|
| 127 |
+
2.8399994373321533
|
| 128 |
+
],
|
| 129 |
+
"type": "longrope"
|
| 130 |
+
},
|
| 131 |
+
"rope_theta": 10000.0,
|
| 132 |
+
"sliding_window": 262144,
|
| 133 |
+
"tie_word_embeddings": false,
|
| 134 |
+
"torch_dtype": "bfloat16",
|
| 135 |
+
"transformers_version": "4.43.0",
|
| 136 |
+
"use_cache": false,
|
| 137 |
+
"vocab_size": 32064
|
| 138 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 1,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
32007,
|
| 6 |
+
32001,
|
| 7 |
+
32000
|
| 8 |
+
],
|
| 9 |
+
"pad_token_id": 32000,
|
| 10 |
+
"transformers_version": "4.43.0"
|
| 11 |
+
}
|
global_step5300/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:faef1a24311539d30db55d12f29dd5efb11fa93c9c152ddac4b844b6b4f6e567
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3cc4ab5f7a97fcd72c488897553e3a3a27d48b4d0ef76bdf448e09151ce4cf9d
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_2_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d5ce7a6cab5e49c922d231c45807b953091a749fe35f3f5317ebbcaa4651b2df
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_3_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b158f45746f6eef76be6e088ab219635b6a41a323636b325b7111d85a7ceb82d
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_4_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8436206151a47dab4201eec803abb7951c76af9f961ec249d0e1bec70cb3d3fb
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_5_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:71dafcefd2df7b214d78633366085c0a97a7edb317c7dc4c06dfd343f74e7a3c
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_6_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:05b376b0911febcd3f461709e46fecca83d667a5d6690d54330e3b44df7300fb
|
| 3 |
+
size 5731623920
|
global_step5300/bf16_zero_pp_rank_7_mp_rank_00_optim_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:85aa1546e557b299b60def83bf073b4ab62ddd070e326fb85cb3d6743c13026d
|
| 3 |
+
size 5731623920
|
global_step5300/zero_pp_rank_0_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ae92015bf64800d09f6df193133b9a8725d59e340f32442aacb6828b8c3278f
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_1_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:404d9c8e9fc67c32fbf1badeaf37337bac674fd155b1adb32fb720c35f6bd4d9
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_2_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64858182fadc84e5d4726c8fb5e95bc57cbd49f6ab9b9256fe1ac7fd8b4f6fe8
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_3_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a72371ca04ece39df30e58f0024c96939000049af09559f974159ea21fc8ac10
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_4_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7107b53629f602dcae5d29af0dd4400f1adea9fda238a304264c531e589928e0
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_5_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebe448e245b317651f2f368e5b2516d633fba95889a7c53913679699cbc4d344
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_6_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89be40a5d104566a94c6107b61bf03dcd3f006f8bba37d5a006a64b3901f2f0a
|
| 3 |
+
size 109445
|
global_step5300/zero_pp_rank_7_mp_rank_00_model_states.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7b994ae34c3b896404541217aca16651f1b0243e334c04f8146a341cf0161759
|
| 3 |
+
size 109445
|
latest
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
global_step5300
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b103b8f056b41aa1ab5dc60c5cb614c9aefd3e2bf322fbe9935a760ab835a23
|
| 3 |
+
size 4972489328
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00e5909dc3348ea95d1c35ab08fb281dee667c1ee7d8441039d932381513eb5d
|
| 3 |
+
size 2669692552
|
model.safetensors.index.json
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"metadata": {
|
| 3 |
+
"total_size": 7642159104
|
| 4 |
+
},
|
| 5 |
+
"weight_map": {
|
| 6 |
+
"lm_head.weight": "model-00002-of-00002.safetensors",
|
| 7 |
+
"model.embed_tokens.weight": "model-00001-of-00002.safetensors",
|
| 8 |
+
"model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 9 |
+
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 10 |
+
"model.layers.0.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 11 |
+
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 12 |
+
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 13 |
+
"model.layers.0.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 14 |
+
"model.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 15 |
+
"model.layers.1.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 16 |
+
"model.layers.1.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 17 |
+
"model.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 18 |
+
"model.layers.1.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 19 |
+
"model.layers.1.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 20 |
+
"model.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 21 |
+
"model.layers.10.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 22 |
+
"model.layers.10.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 23 |
+
"model.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 24 |
+
"model.layers.10.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 25 |
+
"model.layers.10.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 26 |
+
"model.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 27 |
+
"model.layers.11.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 28 |
+
"model.layers.11.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 29 |
+
"model.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 30 |
+
"model.layers.11.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 31 |
+
"model.layers.11.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 32 |
+
"model.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 33 |
+
"model.layers.12.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 34 |
+
"model.layers.12.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 35 |
+
"model.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 36 |
+
"model.layers.12.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 37 |
+
"model.layers.12.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 38 |
+
"model.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 39 |
+
"model.layers.13.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 40 |
+
"model.layers.13.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 41 |
+
"model.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 42 |
+
"model.layers.13.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 43 |
+
"model.layers.13.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 44 |
+
"model.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 45 |
+
"model.layers.14.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 46 |
+
"model.layers.14.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 47 |
+
"model.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 48 |
+
"model.layers.14.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 49 |
+
"model.layers.14.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 50 |
+
"model.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 51 |
+
"model.layers.15.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 52 |
+
"model.layers.15.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 53 |
+
"model.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 54 |
+
"model.layers.15.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 55 |
+
"model.layers.15.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 56 |
+
"model.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 57 |
+
"model.layers.16.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 58 |
+
"model.layers.16.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 59 |
+
"model.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 60 |
+
"model.layers.16.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 61 |
+
"model.layers.16.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 62 |
+
"model.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 63 |
+
"model.layers.17.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 64 |
+
"model.layers.17.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 65 |
+
"model.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 66 |
+
"model.layers.17.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 67 |
+
"model.layers.17.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 68 |
+
"model.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 69 |
+
"model.layers.18.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 70 |
+
"model.layers.18.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 71 |
+
"model.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 72 |
+
"model.layers.18.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 73 |
+
"model.layers.18.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 74 |
+
"model.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 75 |
+
"model.layers.19.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 76 |
+
"model.layers.19.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 77 |
+
"model.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 78 |
+
"model.layers.19.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 79 |
+
"model.layers.19.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 80 |
+
"model.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 81 |
+
"model.layers.2.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 82 |
+
"model.layers.2.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 83 |
+
"model.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 84 |
+
"model.layers.2.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 85 |
+
"model.layers.2.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 86 |
+
"model.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 87 |
+
"model.layers.20.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 88 |
+
"model.layers.20.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 89 |
+
"model.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 90 |
+
"model.layers.20.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 91 |
+
"model.layers.20.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 92 |
+
"model.layers.21.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 93 |
+
"model.layers.21.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 94 |
+
"model.layers.21.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 95 |
+
"model.layers.21.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 96 |
+
"model.layers.21.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 97 |
+
"model.layers.21.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 98 |
+
"model.layers.22.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 99 |
+
"model.layers.22.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 100 |
+
"model.layers.22.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 101 |
+
"model.layers.22.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 102 |
+
"model.layers.22.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 103 |
+
"model.layers.22.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 104 |
+
"model.layers.23.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 105 |
+
"model.layers.23.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 106 |
+
"model.layers.23.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 107 |
+
"model.layers.23.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 108 |
+
"model.layers.23.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 109 |
+
"model.layers.23.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 110 |
+
"model.layers.24.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 111 |
+
"model.layers.24.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 112 |
+
"model.layers.24.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 113 |
+
"model.layers.24.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 114 |
+
"model.layers.24.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 115 |
+
"model.layers.24.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 116 |
+
"model.layers.25.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 117 |
+
"model.layers.25.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 118 |
+
"model.layers.25.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 119 |
+
"model.layers.25.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 120 |
+
"model.layers.25.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 121 |
+
"model.layers.25.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 122 |
+
"model.layers.26.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 123 |
+
"model.layers.26.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 124 |
+
"model.layers.26.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 125 |
+
"model.layers.26.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 126 |
+
"model.layers.26.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 127 |
+
"model.layers.26.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 128 |
+
"model.layers.27.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 129 |
+
"model.layers.27.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 130 |
+
"model.layers.27.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 131 |
+
"model.layers.27.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 132 |
+
"model.layers.27.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 133 |
+
"model.layers.27.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 134 |
+
"model.layers.28.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 135 |
+
"model.layers.28.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 136 |
+
"model.layers.28.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 137 |
+
"model.layers.28.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 138 |
+
"model.layers.28.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 139 |
+
"model.layers.28.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 140 |
+
"model.layers.29.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 141 |
+
"model.layers.29.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 142 |
+
"model.layers.29.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 143 |
+
"model.layers.29.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 144 |
+
"model.layers.29.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 145 |
+
"model.layers.29.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 146 |
+
"model.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 147 |
+
"model.layers.3.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 148 |
+
"model.layers.3.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 149 |
+
"model.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 150 |
+
"model.layers.3.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 151 |
+
"model.layers.3.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 152 |
+
"model.layers.30.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 153 |
+
"model.layers.30.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 154 |
+
"model.layers.30.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 155 |
+
"model.layers.30.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 156 |
+
"model.layers.30.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 157 |
+
"model.layers.30.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 158 |
+
"model.layers.31.input_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 159 |
+
"model.layers.31.mlp.down_proj.weight": "model-00002-of-00002.safetensors",
|
| 160 |
+
"model.layers.31.mlp.gate_up_proj.weight": "model-00002-of-00002.safetensors",
|
| 161 |
+
"model.layers.31.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
|
| 162 |
+
"model.layers.31.self_attn.o_proj.weight": "model-00002-of-00002.safetensors",
|
| 163 |
+
"model.layers.31.self_attn.qkv_proj.weight": "model-00002-of-00002.safetensors",
|
| 164 |
+
"model.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 165 |
+
"model.layers.4.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 166 |
+
"model.layers.4.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 167 |
+
"model.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 168 |
+
"model.layers.4.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 169 |
+
"model.layers.4.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 170 |
+
"model.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 171 |
+
"model.layers.5.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 172 |
+
"model.layers.5.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 173 |
+
"model.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 174 |
+
"model.layers.5.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 175 |
+
"model.layers.5.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 176 |
+
"model.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 177 |
+
"model.layers.6.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 178 |
+
"model.layers.6.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 179 |
+
"model.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 180 |
+
"model.layers.6.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 181 |
+
"model.layers.6.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 182 |
+
"model.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 183 |
+
"model.layers.7.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 184 |
+
"model.layers.7.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 185 |
+
"model.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 186 |
+
"model.layers.7.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 187 |
+
"model.layers.7.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 188 |
+
"model.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 189 |
+
"model.layers.8.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 190 |
+
"model.layers.8.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 191 |
+
"model.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 192 |
+
"model.layers.8.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 193 |
+
"model.layers.8.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 194 |
+
"model.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 195 |
+
"model.layers.9.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
|
| 196 |
+
"model.layers.9.mlp.gate_up_proj.weight": "model-00001-of-00002.safetensors",
|
| 197 |
+
"model.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
|
| 198 |
+
"model.layers.9.self_attn.o_proj.weight": "model-00001-of-00002.safetensors",
|
| 199 |
+
"model.layers.9.self_attn.qkv_proj.weight": "model-00001-of-00002.safetensors",
|
| 200 |
+
"model.norm.weight": "model-00002-of-00002.safetensors"
|
| 201 |
+
}
|
| 202 |
+
}
|
rng_state_0.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3624bcbf3b2b80eb48fc69b2a097502aab1a6fc1ade816c01bc4bc97e8f71dbf
|
| 3 |
+
size 15984
|
rng_state_1.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e3e4827c63b744e87a5cec7b9a6843237a006fa8952bdbe029824f038c45be8
|
| 3 |
+
size 15984
|
rng_state_2.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98255e3c6a0a64a839ed2630289688899472cf9462ec6c38881e3b157ea5db9a
|
| 3 |
+
size 15984
|
rng_state_3.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:18c0fd1771075ebb94c7d7c3a275c21e327f2c42fc8e2048e9f6d647045e92fb
|
| 3 |
+
size 15984
|
rng_state_4.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2261a70c95b0f831d329a0371c347336b1cc6c49bc51dd39536786cfb83c0efe
|
| 3 |
+
size 15984
|
rng_state_5.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bce16ded967463fccf3716a13e55f084cd48e215a035683d634bed5a4d7aea3d
|
| 3 |
+
size 15984
|
rng_state_6.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:16d4865060de2a0d3e7e14fdf5aebf32c329573574fba9930819564a2c807632
|
| 3 |
+
size 15984
|
rng_state_7.pth
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a9ffd58f2d675ad36d489e78e8761cba065070485cadfe0055277898459cc72d
|
| 3 |
+
size 15984
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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": "<|endoftext|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<|endoftext|>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<unk>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": false,
|
| 3 |
+
"add_eos_token": true,
|
| 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": true,
|
| 27 |
+
"single_word": false,
|
| 28 |
+
"special": false
|
| 29 |
+
},
|
| 30 |
+
"32000": {
|
| 31 |
+
"content": "<|endoftext|>",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false,
|
| 36 |
+
"special": true
|
| 37 |
+
},
|
| 38 |
+
"32001": {
|
| 39 |
+
"content": "<|assistant|>",
|
| 40 |
+
"lstrip": false,
|
| 41 |
+
"normalized": false,
|
| 42 |
+
"rstrip": true,
|
| 43 |
+
"single_word": false,
|
| 44 |
+
"special": true
|
| 45 |
+
},
|
| 46 |
+
"32002": {
|
| 47 |
+
"content": "<|placeholder1|>",
|
| 48 |
+
"lstrip": false,
|
| 49 |
+
"normalized": false,
|
| 50 |
+
"rstrip": true,
|
| 51 |
+
"single_word": false,
|
| 52 |
+
"special": true
|
| 53 |
+
},
|
| 54 |
+
"32003": {
|
| 55 |
+
"content": "<|placeholder2|>",
|
| 56 |
+
"lstrip": false,
|
| 57 |
+
"normalized": false,
|
| 58 |
+
"rstrip": true,
|
| 59 |
+
"single_word": false,
|
| 60 |
+
"special": true
|
| 61 |
+
},
|
| 62 |
+
"32004": {
|
| 63 |
+
"content": "<|placeholder3|>",
|
| 64 |
+
"lstrip": false,
|
| 65 |
+
"normalized": false,
|
| 66 |
+
"rstrip": true,
|
| 67 |
+
"single_word": false,
|
| 68 |
+
"special": true
|
| 69 |
+
},
|
| 70 |
+
"32005": {
|
| 71 |
+
"content": "<|placeholder4|>",
|
| 72 |
+
"lstrip": false,
|
| 73 |
+
"normalized": false,
|
| 74 |
+
"rstrip": true,
|
| 75 |
+
"single_word": false,
|
| 76 |
+
"special": true
|
| 77 |
+
},
|
| 78 |
+
"32006": {
|
| 79 |
+
"content": "<|system|>",
|
| 80 |
+
"lstrip": false,
|
| 81 |
+
"normalized": false,
|
| 82 |
+
"rstrip": true,
|
| 83 |
+
"single_word": false,
|
| 84 |
+
"special": true
|
| 85 |
+
},
|
| 86 |
+
"32007": {
|
| 87 |
+
"content": "<|end|>",
|
| 88 |
+
"lstrip": false,
|
| 89 |
+
"normalized": false,
|
| 90 |
+
"rstrip": true,
|
| 91 |
+
"single_word": false,
|
| 92 |
+
"special": true
|
| 93 |
+
},
|
| 94 |
+
"32008": {
|
| 95 |
+
"content": "<|placeholder5|>",
|
| 96 |
+
"lstrip": false,
|
| 97 |
+
"normalized": false,
|
| 98 |
+
"rstrip": true,
|
| 99 |
+
"single_word": false,
|
| 100 |
+
"special": true
|
| 101 |
+
},
|
| 102 |
+
"32009": {
|
| 103 |
+
"content": "<|placeholder6|>",
|
| 104 |
+
"lstrip": false,
|
| 105 |
+
"normalized": false,
|
| 106 |
+
"rstrip": true,
|
| 107 |
+
"single_word": false,
|
| 108 |
+
"special": true
|
| 109 |
+
},
|
| 110 |
+
"32010": {
|
| 111 |
+
"content": "<|user|>",
|
| 112 |
+
"lstrip": false,
|
| 113 |
+
"normalized": false,
|
| 114 |
+
"rstrip": true,
|
| 115 |
+
"single_word": false,
|
| 116 |
+
"special": true
|
| 117 |
+
}
|
| 118 |
+
},
|
| 119 |
+
"bos_token": "<s>",
|
| 120 |
+
"chat_template": "{% for message in messages %}{% if message['role'] == 'system' and message['content'] %}{{'<|system|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'user' %}{{'<|user|>\n' + message['content'] + '<|end|>\n'}}{% elif message['role'] == 'assistant' %}{{'<|assistant|>\n' + message['content'] + '<|end|>\n'}}{% endif %}{% endfor %}{% if add_generation_prompt %}{{ '<|assistant|>\n' }}{% else %}{{ eos_token }}{% endif %}",
|
| 121 |
+
"clean_up_tokenization_spaces": false,
|
| 122 |
+
"eos_token": "<|endoftext|>",
|
| 123 |
+
"legacy": false,
|
| 124 |
+
"model_max_length": 131072,
|
| 125 |
+
"pad_token": "<|endoftext|>",
|
| 126 |
+
"padding_side": "left",
|
| 127 |
+
"sp_model_kwargs": {},
|
| 128 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 129 |
+
"unk_token": "<unk>",
|
| 130 |
+
"use_default_system_prompt": false
|
| 131 |
+
}
|
trainer_state.json
ADDED
|
@@ -0,0 +1,828 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"best_metric": null,
|
| 3 |
+
"best_model_checkpoint": null,
|
| 4 |
+
"epoch": 10.0,
|
| 5 |
+
"eval_steps": 100,
|
| 6 |
+
"global_step": 5300,
|
| 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.18867924528301888,
|
| 13 |
+
"grad_norm": 4.437798503453146,
|
| 14 |
+
"learning_rate": 7.341400415124174e-07,
|
| 15 |
+
"loss": 5.3755,
|
| 16 |
+
"step": 100
|
| 17 |
+
},
|
| 18 |
+
{
|
| 19 |
+
"epoch": 0.18867924528301888,
|
| 20 |
+
"eval_loss": 1.0850828886032104,
|
| 21 |
+
"eval_runtime": 149.7427,
|
| 22 |
+
"eval_samples_per_second": 452.857,
|
| 23 |
+
"eval_steps_per_second": 0.888,
|
| 24 |
+
"step": 100
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"epoch": 0.37735849056603776,
|
| 28 |
+
"grad_norm": 1.6459101244560304,
|
| 29 |
+
"learning_rate": 8.446391282690362e-07,
|
| 30 |
+
"loss": 0.9681,
|
| 31 |
+
"step": 200
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"epoch": 0.37735849056603776,
|
| 35 |
+
"eval_loss": 0.9421371817588806,
|
| 36 |
+
"eval_runtime": 149.748,
|
| 37 |
+
"eval_samples_per_second": 452.841,
|
| 38 |
+
"eval_steps_per_second": 0.888,
|
| 39 |
+
"step": 200
|
| 40 |
+
},
|
| 41 |
+
{
|
| 42 |
+
"epoch": 0.5660377358490566,
|
| 43 |
+
"grad_norm": 4.060133963944513,
|
| 44 |
+
"learning_rate": 9.09276950385592e-07,
|
| 45 |
+
"loss": 0.9538,
|
| 46 |
+
"step": 300
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"epoch": 0.5660377358490566,
|
| 50 |
+
"eval_loss": 0.9655478596687317,
|
| 51 |
+
"eval_runtime": 149.5973,
|
| 52 |
+
"eval_samples_per_second": 453.297,
|
| 53 |
+
"eval_steps_per_second": 0.889,
|
| 54 |
+
"step": 300
|
| 55 |
+
},
|
| 56 |
+
{
|
| 57 |
+
"epoch": 0.7547169811320755,
|
| 58 |
+
"grad_norm": 41.89172794379802,
|
| 59 |
+
"learning_rate": 9.551382150256551e-07,
|
| 60 |
+
"loss": 0.9761,
|
| 61 |
+
"step": 400
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"epoch": 0.7547169811320755,
|
| 65 |
+
"eval_loss": 0.976280152797699,
|
| 66 |
+
"eval_runtime": 149.6311,
|
| 67 |
+
"eval_samples_per_second": 453.195,
|
| 68 |
+
"eval_steps_per_second": 0.889,
|
| 69 |
+
"step": 400
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"epoch": 0.9433962264150944,
|
| 73 |
+
"grad_norm": 70.58972777939259,
|
| 74 |
+
"learning_rate": 9.907109755120069e-07,
|
| 75 |
+
"loss": 0.9786,
|
| 76 |
+
"step": 500
|
| 77 |
+
},
|
| 78 |
+
{
|
| 79 |
+
"epoch": 0.9433962264150944,
|
| 80 |
+
"eval_loss": 0.9799396991729736,
|
| 81 |
+
"eval_runtime": 149.6428,
|
| 82 |
+
"eval_samples_per_second": 453.159,
|
| 83 |
+
"eval_steps_per_second": 0.889,
|
| 84 |
+
"step": 500
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"epoch": 1.1320754716981132,
|
| 88 |
+
"grad_norm": 154.52662720587995,
|
| 89 |
+
"learning_rate": 1e-06,
|
| 90 |
+
"loss": 0.9851,
|
| 91 |
+
"step": 600
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
"epoch": 1.1320754716981132,
|
| 95 |
+
"eval_loss": 0.9846892952919006,
|
| 96 |
+
"eval_runtime": 150.8433,
|
| 97 |
+
"eval_samples_per_second": 449.553,
|
| 98 |
+
"eval_steps_per_second": 0.882,
|
| 99 |
+
"step": 600
|
| 100 |
+
},
|
| 101 |
+
{
|
| 102 |
+
"epoch": 1.320754716981132,
|
| 103 |
+
"grad_norm": 147.98867672055184,
|
| 104 |
+
"learning_rate": 1e-06,
|
| 105 |
+
"loss": 0.9876,
|
| 106 |
+
"step": 700
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"epoch": 1.320754716981132,
|
| 110 |
+
"eval_loss": 0.9889557957649231,
|
| 111 |
+
"eval_runtime": 149.6471,
|
| 112 |
+
"eval_samples_per_second": 453.146,
|
| 113 |
+
"eval_steps_per_second": 0.889,
|
| 114 |
+
"step": 700
|
| 115 |
+
},
|
| 116 |
+
{
|
| 117 |
+
"epoch": 1.509433962264151,
|
| 118 |
+
"grad_norm": 93.50922205523368,
|
| 119 |
+
"learning_rate": 1e-06,
|
| 120 |
+
"loss": 0.9892,
|
| 121 |
+
"step": 800
|
| 122 |
+
},
|
| 123 |
+
{
|
| 124 |
+
"epoch": 1.509433962264151,
|
| 125 |
+
"eval_loss": 0.9961430430412292,
|
| 126 |
+
"eval_runtime": 149.7573,
|
| 127 |
+
"eval_samples_per_second": 452.813,
|
| 128 |
+
"eval_steps_per_second": 0.888,
|
| 129 |
+
"step": 800
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"epoch": 1.6981132075471699,
|
| 133 |
+
"grad_norm": 53.06237347231676,
|
| 134 |
+
"learning_rate": 1e-06,
|
| 135 |
+
"loss": 0.9983,
|
| 136 |
+
"step": 900
|
| 137 |
+
},
|
| 138 |
+
{
|
| 139 |
+
"epoch": 1.6981132075471699,
|
| 140 |
+
"eval_loss": 1.0119000673294067,
|
| 141 |
+
"eval_runtime": 149.7765,
|
| 142 |
+
"eval_samples_per_second": 452.755,
|
| 143 |
+
"eval_steps_per_second": 0.888,
|
| 144 |
+
"step": 900
|
| 145 |
+
},
|
| 146 |
+
{
|
| 147 |
+
"epoch": 1.8867924528301887,
|
| 148 |
+
"grad_norm": 65.28104430915417,
|
| 149 |
+
"learning_rate": 1e-06,
|
| 150 |
+
"loss": 1.0228,
|
| 151 |
+
"step": 1000
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"epoch": 1.8867924528301887,
|
| 155 |
+
"eval_loss": 1.027756690979004,
|
| 156 |
+
"eval_runtime": 149.4845,
|
| 157 |
+
"eval_samples_per_second": 453.639,
|
| 158 |
+
"eval_steps_per_second": 0.89,
|
| 159 |
+
"step": 1000
|
| 160 |
+
},
|
| 161 |
+
{
|
| 162 |
+
"epoch": 2.0754716981132075,
|
| 163 |
+
"grad_norm": 84.50132037152585,
|
| 164 |
+
"learning_rate": 1e-06,
|
| 165 |
+
"loss": 1.0433,
|
| 166 |
+
"step": 1100
|
| 167 |
+
},
|
| 168 |
+
{
|
| 169 |
+
"epoch": 2.0754716981132075,
|
| 170 |
+
"eval_loss": 1.059239149093628,
|
| 171 |
+
"eval_runtime": 149.7269,
|
| 172 |
+
"eval_samples_per_second": 452.905,
|
| 173 |
+
"eval_steps_per_second": 0.888,
|
| 174 |
+
"step": 1100
|
| 175 |
+
},
|
| 176 |
+
{
|
| 177 |
+
"epoch": 2.2641509433962264,
|
| 178 |
+
"grad_norm": 29.00236133301261,
|
| 179 |
+
"learning_rate": 1e-06,
|
| 180 |
+
"loss": 1.0644,
|
| 181 |
+
"step": 1200
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"epoch": 2.2641509433962264,
|
| 185 |
+
"eval_loss": 1.0800738334655762,
|
| 186 |
+
"eval_runtime": 149.9162,
|
| 187 |
+
"eval_samples_per_second": 452.333,
|
| 188 |
+
"eval_steps_per_second": 0.887,
|
| 189 |
+
"step": 1200
|
| 190 |
+
},
|
| 191 |
+
{
|
| 192 |
+
"epoch": 2.452830188679245,
|
| 193 |
+
"grad_norm": 411.7064146634104,
|
| 194 |
+
"learning_rate": 1e-06,
|
| 195 |
+
"loss": 1.0917,
|
| 196 |
+
"step": 1300
|
| 197 |
+
},
|
| 198 |
+
{
|
| 199 |
+
"epoch": 2.452830188679245,
|
| 200 |
+
"eval_loss": 1.1134124994277954,
|
| 201 |
+
"eval_runtime": 149.7734,
|
| 202 |
+
"eval_samples_per_second": 452.764,
|
| 203 |
+
"eval_steps_per_second": 0.888,
|
| 204 |
+
"step": 1300
|
| 205 |
+
},
|
| 206 |
+
{
|
| 207 |
+
"epoch": 2.641509433962264,
|
| 208 |
+
"grad_norm": 229.88146571929195,
|
| 209 |
+
"learning_rate": 1e-06,
|
| 210 |
+
"loss": 1.1147,
|
| 211 |
+
"step": 1400
|
| 212 |
+
},
|
| 213 |
+
{
|
| 214 |
+
"epoch": 2.641509433962264,
|
| 215 |
+
"eval_loss": 1.1160598993301392,
|
| 216 |
+
"eval_runtime": 149.7257,
|
| 217 |
+
"eval_samples_per_second": 452.908,
|
| 218 |
+
"eval_steps_per_second": 0.888,
|
| 219 |
+
"step": 1400
|
| 220 |
+
},
|
| 221 |
+
{
|
| 222 |
+
"epoch": 2.830188679245283,
|
| 223 |
+
"grad_norm": 7.414451982821549,
|
| 224 |
+
"learning_rate": 1e-06,
|
| 225 |
+
"loss": 1.1581,
|
| 226 |
+
"step": 1500
|
| 227 |
+
},
|
| 228 |
+
{
|
| 229 |
+
"epoch": 2.830188679245283,
|
| 230 |
+
"eval_loss": 1.2751212120056152,
|
| 231 |
+
"eval_runtime": 149.6311,
|
| 232 |
+
"eval_samples_per_second": 453.195,
|
| 233 |
+
"eval_steps_per_second": 0.889,
|
| 234 |
+
"step": 1500
|
| 235 |
+
},
|
| 236 |
+
{
|
| 237 |
+
"epoch": 3.018867924528302,
|
| 238 |
+
"grad_norm": 51.75196724068806,
|
| 239 |
+
"learning_rate": 1e-06,
|
| 240 |
+
"loss": 1.4543,
|
| 241 |
+
"step": 1600
|
| 242 |
+
},
|
| 243 |
+
{
|
| 244 |
+
"epoch": 3.018867924528302,
|
| 245 |
+
"eval_loss": 1.5799795389175415,
|
| 246 |
+
"eval_runtime": 149.5252,
|
| 247 |
+
"eval_samples_per_second": 453.516,
|
| 248 |
+
"eval_steps_per_second": 0.889,
|
| 249 |
+
"step": 1600
|
| 250 |
+
},
|
| 251 |
+
{
|
| 252 |
+
"epoch": 3.207547169811321,
|
| 253 |
+
"grad_norm": 8.197678623516119,
|
| 254 |
+
"learning_rate": 1e-06,
|
| 255 |
+
"loss": 1.6332,
|
| 256 |
+
"step": 1700
|
| 257 |
+
},
|
| 258 |
+
{
|
| 259 |
+
"epoch": 3.207547169811321,
|
| 260 |
+
"eval_loss": 1.7048678398132324,
|
| 261 |
+
"eval_runtime": 149.7414,
|
| 262 |
+
"eval_samples_per_second": 452.861,
|
| 263 |
+
"eval_steps_per_second": 0.888,
|
| 264 |
+
"step": 1700
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"epoch": 3.3962264150943398,
|
| 268 |
+
"grad_norm": 9.609718378646408,
|
| 269 |
+
"learning_rate": 1e-06,
|
| 270 |
+
"loss": 1.7915,
|
| 271 |
+
"step": 1800
|
| 272 |
+
},
|
| 273 |
+
{
|
| 274 |
+
"epoch": 3.3962264150943398,
|
| 275 |
+
"eval_loss": 1.8891370296478271,
|
| 276 |
+
"eval_runtime": 149.8519,
|
| 277 |
+
"eval_samples_per_second": 452.527,
|
| 278 |
+
"eval_steps_per_second": 0.888,
|
| 279 |
+
"step": 1800
|
| 280 |
+
},
|
| 281 |
+
{
|
| 282 |
+
"epoch": 3.5849056603773586,
|
| 283 |
+
"grad_norm": 87.68727169428583,
|
| 284 |
+
"learning_rate": 1e-06,
|
| 285 |
+
"loss": 1.9812,
|
| 286 |
+
"step": 1900
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
"epoch": 3.5849056603773586,
|
| 290 |
+
"eval_loss": 2.057527780532837,
|
| 291 |
+
"eval_runtime": 149.7699,
|
| 292 |
+
"eval_samples_per_second": 452.774,
|
| 293 |
+
"eval_steps_per_second": 0.888,
|
| 294 |
+
"step": 1900
|
| 295 |
+
},
|
| 296 |
+
{
|
| 297 |
+
"epoch": 3.7735849056603774,
|
| 298 |
+
"grad_norm": 12.995456781993322,
|
| 299 |
+
"learning_rate": 1e-06,
|
| 300 |
+
"loss": 2.0982,
|
| 301 |
+
"step": 2000
|
| 302 |
+
},
|
| 303 |
+
{
|
| 304 |
+
"epoch": 3.7735849056603774,
|
| 305 |
+
"eval_loss": 2.1332101821899414,
|
| 306 |
+
"eval_runtime": 149.6771,
|
| 307 |
+
"eval_samples_per_second": 453.055,
|
| 308 |
+
"eval_steps_per_second": 0.889,
|
| 309 |
+
"step": 2000
|
| 310 |
+
},
|
| 311 |
+
{
|
| 312 |
+
"epoch": 3.9622641509433962,
|
| 313 |
+
"grad_norm": 13.605685201407708,
|
| 314 |
+
"learning_rate": 1e-06,
|
| 315 |
+
"loss": 2.1784,
|
| 316 |
+
"step": 2100
|
| 317 |
+
},
|
| 318 |
+
{
|
| 319 |
+
"epoch": 3.9622641509433962,
|
| 320 |
+
"eval_loss": 2.2318856716156006,
|
| 321 |
+
"eval_runtime": 149.8102,
|
| 322 |
+
"eval_samples_per_second": 452.653,
|
| 323 |
+
"eval_steps_per_second": 0.888,
|
| 324 |
+
"step": 2100
|
| 325 |
+
},
|
| 326 |
+
{
|
| 327 |
+
"epoch": 4.150943396226415,
|
| 328 |
+
"grad_norm": 12.732750088048045,
|
| 329 |
+
"learning_rate": 1e-06,
|
| 330 |
+
"loss": 2.2661,
|
| 331 |
+
"step": 2200
|
| 332 |
+
},
|
| 333 |
+
{
|
| 334 |
+
"epoch": 4.150943396226415,
|
| 335 |
+
"eval_loss": 2.3092291355133057,
|
| 336 |
+
"eval_runtime": 149.6232,
|
| 337 |
+
"eval_samples_per_second": 453.219,
|
| 338 |
+
"eval_steps_per_second": 0.889,
|
| 339 |
+
"step": 2200
|
| 340 |
+
},
|
| 341 |
+
{
|
| 342 |
+
"epoch": 4.339622641509434,
|
| 343 |
+
"grad_norm": 13.451602224902139,
|
| 344 |
+
"learning_rate": 1e-06,
|
| 345 |
+
"loss": 2.3259,
|
| 346 |
+
"step": 2300
|
| 347 |
+
},
|
| 348 |
+
{
|
| 349 |
+
"epoch": 4.339622641509434,
|
| 350 |
+
"eval_loss": 2.3665931224823,
|
| 351 |
+
"eval_runtime": 149.8265,
|
| 352 |
+
"eval_samples_per_second": 452.604,
|
| 353 |
+
"eval_steps_per_second": 0.888,
|
| 354 |
+
"step": 2300
|
| 355 |
+
},
|
| 356 |
+
{
|
| 357 |
+
"epoch": 4.528301886792453,
|
| 358 |
+
"grad_norm": 13.331046925646502,
|
| 359 |
+
"learning_rate": 1e-06,
|
| 360 |
+
"loss": 2.3908,
|
| 361 |
+
"step": 2400
|
| 362 |
+
},
|
| 363 |
+
{
|
| 364 |
+
"epoch": 4.528301886792453,
|
| 365 |
+
"eval_loss": 2.4305644035339355,
|
| 366 |
+
"eval_runtime": 149.9235,
|
| 367 |
+
"eval_samples_per_second": 452.311,
|
| 368 |
+
"eval_steps_per_second": 0.887,
|
| 369 |
+
"step": 2400
|
| 370 |
+
},
|
| 371 |
+
{
|
| 372 |
+
"epoch": 4.716981132075472,
|
| 373 |
+
"grad_norm": 17.21909294548451,
|
| 374 |
+
"learning_rate": 1e-06,
|
| 375 |
+
"loss": 2.4521,
|
| 376 |
+
"step": 2500
|
| 377 |
+
},
|
| 378 |
+
{
|
| 379 |
+
"epoch": 4.716981132075472,
|
| 380 |
+
"eval_loss": 2.545186758041382,
|
| 381 |
+
"eval_runtime": 149.7293,
|
| 382 |
+
"eval_samples_per_second": 452.897,
|
| 383 |
+
"eval_steps_per_second": 0.888,
|
| 384 |
+
"step": 2500
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"epoch": 4.90566037735849,
|
| 388 |
+
"grad_norm": 16.704993975768705,
|
| 389 |
+
"learning_rate": 1e-06,
|
| 390 |
+
"loss": 2.5541,
|
| 391 |
+
"step": 2600
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"epoch": 4.90566037735849,
|
| 395 |
+
"eval_loss": 2.6449944972991943,
|
| 396 |
+
"eval_runtime": 149.6085,
|
| 397 |
+
"eval_samples_per_second": 453.263,
|
| 398 |
+
"eval_steps_per_second": 0.889,
|
| 399 |
+
"step": 2600
|
| 400 |
+
},
|
| 401 |
+
{
|
| 402 |
+
"epoch": 5.09433962264151,
|
| 403 |
+
"grad_norm": 17.23044971023092,
|
| 404 |
+
"learning_rate": 1e-06,
|
| 405 |
+
"loss": 2.7022,
|
| 406 |
+
"step": 2700
|
| 407 |
+
},
|
| 408 |
+
{
|
| 409 |
+
"epoch": 5.09433962264151,
|
| 410 |
+
"eval_loss": 2.7793149948120117,
|
| 411 |
+
"eval_runtime": 149.7512,
|
| 412 |
+
"eval_samples_per_second": 452.831,
|
| 413 |
+
"eval_steps_per_second": 0.888,
|
| 414 |
+
"step": 2700
|
| 415 |
+
},
|
| 416 |
+
{
|
| 417 |
+
"epoch": 5.283018867924528,
|
| 418 |
+
"grad_norm": 17.47208816215434,
|
| 419 |
+
"learning_rate": 1e-06,
|
| 420 |
+
"loss": 2.8302,
|
| 421 |
+
"step": 2800
|
| 422 |
+
},
|
| 423 |
+
{
|
| 424 |
+
"epoch": 5.283018867924528,
|
| 425 |
+
"eval_loss": 2.888209581375122,
|
| 426 |
+
"eval_runtime": 149.8872,
|
| 427 |
+
"eval_samples_per_second": 452.42,
|
| 428 |
+
"eval_steps_per_second": 0.887,
|
| 429 |
+
"step": 2800
|
| 430 |
+
},
|
| 431 |
+
{
|
| 432 |
+
"epoch": 5.471698113207547,
|
| 433 |
+
"grad_norm": 17.705909664870283,
|
| 434 |
+
"learning_rate": 1e-06,
|
| 435 |
+
"loss": 2.9344,
|
| 436 |
+
"step": 2900
|
| 437 |
+
},
|
| 438 |
+
{
|
| 439 |
+
"epoch": 5.471698113207547,
|
| 440 |
+
"eval_loss": 2.9951322078704834,
|
| 441 |
+
"eval_runtime": 149.9777,
|
| 442 |
+
"eval_samples_per_second": 452.147,
|
| 443 |
+
"eval_steps_per_second": 0.887,
|
| 444 |
+
"step": 2900
|
| 445 |
+
},
|
| 446 |
+
{
|
| 447 |
+
"epoch": 5.660377358490566,
|
| 448 |
+
"grad_norm": 19.101859660265248,
|
| 449 |
+
"learning_rate": 1e-06,
|
| 450 |
+
"loss": 3.0392,
|
| 451 |
+
"step": 3000
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"epoch": 5.660377358490566,
|
| 455 |
+
"eval_loss": 3.0882513523101807,
|
| 456 |
+
"eval_runtime": 149.9153,
|
| 457 |
+
"eval_samples_per_second": 452.335,
|
| 458 |
+
"eval_steps_per_second": 0.887,
|
| 459 |
+
"step": 3000
|
| 460 |
+
},
|
| 461 |
+
{
|
| 462 |
+
"epoch": 5.849056603773585,
|
| 463 |
+
"grad_norm": 19.07389675964658,
|
| 464 |
+
"learning_rate": 1e-06,
|
| 465 |
+
"loss": 3.0997,
|
| 466 |
+
"step": 3100
|
| 467 |
+
},
|
| 468 |
+
{
|
| 469 |
+
"epoch": 5.849056603773585,
|
| 470 |
+
"eval_loss": 3.1218082904815674,
|
| 471 |
+
"eval_runtime": 149.7905,
|
| 472 |
+
"eval_samples_per_second": 452.712,
|
| 473 |
+
"eval_steps_per_second": 0.888,
|
| 474 |
+
"step": 3100
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"epoch": 6.037735849056604,
|
| 478 |
+
"grad_norm": 18.92461175759707,
|
| 479 |
+
"learning_rate": 1e-06,
|
| 480 |
+
"loss": 3.1321,
|
| 481 |
+
"step": 3200
|
| 482 |
+
},
|
| 483 |
+
{
|
| 484 |
+
"epoch": 6.037735849056604,
|
| 485 |
+
"eval_loss": 3.153890609741211,
|
| 486 |
+
"eval_runtime": 149.8617,
|
| 487 |
+
"eval_samples_per_second": 452.497,
|
| 488 |
+
"eval_steps_per_second": 0.887,
|
| 489 |
+
"step": 3200
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"epoch": 6.226415094339623,
|
| 493 |
+
"grad_norm": 20.348062318970786,
|
| 494 |
+
"learning_rate": 1e-06,
|
| 495 |
+
"loss": 3.1567,
|
| 496 |
+
"step": 3300
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"epoch": 6.226415094339623,
|
| 500 |
+
"eval_loss": 3.180058240890503,
|
| 501 |
+
"eval_runtime": 149.6522,
|
| 502 |
+
"eval_samples_per_second": 453.131,
|
| 503 |
+
"eval_steps_per_second": 0.889,
|
| 504 |
+
"step": 3300
|
| 505 |
+
},
|
| 506 |
+
{
|
| 507 |
+
"epoch": 6.415094339622642,
|
| 508 |
+
"grad_norm": 19.380403417398043,
|
| 509 |
+
"learning_rate": 1e-06,
|
| 510 |
+
"loss": 3.1885,
|
| 511 |
+
"step": 3400
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"epoch": 6.415094339622642,
|
| 515 |
+
"eval_loss": 3.2085678577423096,
|
| 516 |
+
"eval_runtime": 149.9193,
|
| 517 |
+
"eval_samples_per_second": 452.323,
|
| 518 |
+
"eval_steps_per_second": 0.887,
|
| 519 |
+
"step": 3400
|
| 520 |
+
},
|
| 521 |
+
{
|
| 522 |
+
"epoch": 6.60377358490566,
|
| 523 |
+
"grad_norm": 19.172157540450666,
|
| 524 |
+
"learning_rate": 1e-06,
|
| 525 |
+
"loss": 3.2066,
|
| 526 |
+
"step": 3500
|
| 527 |
+
},
|
| 528 |
+
{
|
| 529 |
+
"epoch": 6.60377358490566,
|
| 530 |
+
"eval_loss": 3.2430124282836914,
|
| 531 |
+
"eval_runtime": 149.5804,
|
| 532 |
+
"eval_samples_per_second": 453.348,
|
| 533 |
+
"eval_steps_per_second": 0.889,
|
| 534 |
+
"step": 3500
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"epoch": 6.7924528301886795,
|
| 538 |
+
"grad_norm": 20.834808216022473,
|
| 539 |
+
"learning_rate": 1e-06,
|
| 540 |
+
"loss": 3.2529,
|
| 541 |
+
"step": 3600
|
| 542 |
+
},
|
| 543 |
+
{
|
| 544 |
+
"epoch": 6.7924528301886795,
|
| 545 |
+
"eval_loss": 3.2701263427734375,
|
| 546 |
+
"eval_runtime": 149.8287,
|
| 547 |
+
"eval_samples_per_second": 452.597,
|
| 548 |
+
"eval_steps_per_second": 0.888,
|
| 549 |
+
"step": 3600
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"epoch": 6.981132075471698,
|
| 553 |
+
"grad_norm": 20.71072973537811,
|
| 554 |
+
"learning_rate": 1e-06,
|
| 555 |
+
"loss": 3.2788,
|
| 556 |
+
"step": 3700
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"epoch": 6.981132075471698,
|
| 560 |
+
"eval_loss": 3.3030686378479004,
|
| 561 |
+
"eval_runtime": 149.8206,
|
| 562 |
+
"eval_samples_per_second": 452.621,
|
| 563 |
+
"eval_steps_per_second": 0.888,
|
| 564 |
+
"step": 3700
|
| 565 |
+
},
|
| 566 |
+
{
|
| 567 |
+
"epoch": 7.169811320754717,
|
| 568 |
+
"grad_norm": 20.550695492004113,
|
| 569 |
+
"learning_rate": 1e-06,
|
| 570 |
+
"loss": 3.3094,
|
| 571 |
+
"step": 3800
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"epoch": 7.169811320754717,
|
| 575 |
+
"eval_loss": 3.3228628635406494,
|
| 576 |
+
"eval_runtime": 149.8243,
|
| 577 |
+
"eval_samples_per_second": 452.61,
|
| 578 |
+
"eval_steps_per_second": 0.888,
|
| 579 |
+
"step": 3800
|
| 580 |
+
},
|
| 581 |
+
{
|
| 582 |
+
"epoch": 7.3584905660377355,
|
| 583 |
+
"grad_norm": 22.750882645137363,
|
| 584 |
+
"learning_rate": 1e-06,
|
| 585 |
+
"loss": 3.3288,
|
| 586 |
+
"step": 3900
|
| 587 |
+
},
|
| 588 |
+
{
|
| 589 |
+
"epoch": 7.3584905660377355,
|
| 590 |
+
"eval_loss": 3.355827808380127,
|
| 591 |
+
"eval_runtime": 149.6529,
|
| 592 |
+
"eval_samples_per_second": 453.129,
|
| 593 |
+
"eval_steps_per_second": 0.889,
|
| 594 |
+
"step": 3900
|
| 595 |
+
},
|
| 596 |
+
{
|
| 597 |
+
"epoch": 7.547169811320755,
|
| 598 |
+
"grad_norm": 21.426519401026805,
|
| 599 |
+
"learning_rate": 1e-06,
|
| 600 |
+
"loss": 3.3727,
|
| 601 |
+
"step": 4000
|
| 602 |
+
},
|
| 603 |
+
{
|
| 604 |
+
"epoch": 7.547169811320755,
|
| 605 |
+
"eval_loss": 3.3865537643432617,
|
| 606 |
+
"eval_runtime": 150.2322,
|
| 607 |
+
"eval_samples_per_second": 451.381,
|
| 608 |
+
"eval_steps_per_second": 0.885,
|
| 609 |
+
"step": 4000
|
| 610 |
+
},
|
| 611 |
+
{
|
| 612 |
+
"epoch": 7.735849056603773,
|
| 613 |
+
"grad_norm": 21.858010980941717,
|
| 614 |
+
"learning_rate": 1e-06,
|
| 615 |
+
"loss": 3.3938,
|
| 616 |
+
"step": 4100
|
| 617 |
+
},
|
| 618 |
+
{
|
| 619 |
+
"epoch": 7.735849056603773,
|
| 620 |
+
"eval_loss": 3.4126923084259033,
|
| 621 |
+
"eval_runtime": 149.7102,
|
| 622 |
+
"eval_samples_per_second": 452.955,
|
| 623 |
+
"eval_steps_per_second": 0.888,
|
| 624 |
+
"step": 4100
|
| 625 |
+
},
|
| 626 |
+
{
|
| 627 |
+
"epoch": 7.9245283018867925,
|
| 628 |
+
"grad_norm": 21.32876029273619,
|
| 629 |
+
"learning_rate": 1e-06,
|
| 630 |
+
"loss": 3.4334,
|
| 631 |
+
"step": 4200
|
| 632 |
+
},
|
| 633 |
+
{
|
| 634 |
+
"epoch": 7.9245283018867925,
|
| 635 |
+
"eval_loss": 3.4582273960113525,
|
| 636 |
+
"eval_runtime": 149.6771,
|
| 637 |
+
"eval_samples_per_second": 453.055,
|
| 638 |
+
"eval_steps_per_second": 0.889,
|
| 639 |
+
"step": 4200
|
| 640 |
+
},
|
| 641 |
+
{
|
| 642 |
+
"epoch": 8.11320754716981,
|
| 643 |
+
"grad_norm": 23.89601752008716,
|
| 644 |
+
"learning_rate": 1e-06,
|
| 645 |
+
"loss": 3.4769,
|
| 646 |
+
"step": 4300
|
| 647 |
+
},
|
| 648 |
+
{
|
| 649 |
+
"epoch": 8.11320754716981,
|
| 650 |
+
"eval_loss": 3.505073308944702,
|
| 651 |
+
"eval_runtime": 149.8114,
|
| 652 |
+
"eval_samples_per_second": 452.649,
|
| 653 |
+
"eval_steps_per_second": 0.888,
|
| 654 |
+
"step": 4300
|
| 655 |
+
},
|
| 656 |
+
{
|
| 657 |
+
"epoch": 8.30188679245283,
|
| 658 |
+
"grad_norm": 22.427822055394444,
|
| 659 |
+
"learning_rate": 1e-06,
|
| 660 |
+
"loss": 3.5019,
|
| 661 |
+
"step": 4400
|
| 662 |
+
},
|
| 663 |
+
{
|
| 664 |
+
"epoch": 8.30188679245283,
|
| 665 |
+
"eval_loss": 3.5005218982696533,
|
| 666 |
+
"eval_runtime": 149.7083,
|
| 667 |
+
"eval_samples_per_second": 452.961,
|
| 668 |
+
"eval_steps_per_second": 0.888,
|
| 669 |
+
"step": 4400
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"epoch": 8.49056603773585,
|
| 673 |
+
"grad_norm": 20.122035975196678,
|
| 674 |
+
"learning_rate": 1e-06,
|
| 675 |
+
"loss": 3.4841,
|
| 676 |
+
"step": 4500
|
| 677 |
+
},
|
| 678 |
+
{
|
| 679 |
+
"epoch": 8.49056603773585,
|
| 680 |
+
"eval_loss": 3.4907851219177246,
|
| 681 |
+
"eval_runtime": 149.5966,
|
| 682 |
+
"eval_samples_per_second": 453.299,
|
| 683 |
+
"eval_steps_per_second": 0.889,
|
| 684 |
+
"step": 4500
|
| 685 |
+
},
|
| 686 |
+
{
|
| 687 |
+
"epoch": 8.679245283018869,
|
| 688 |
+
"grad_norm": 7.060014135330357,
|
| 689 |
+
"learning_rate": 1e-06,
|
| 690 |
+
"loss": 3.4805,
|
| 691 |
+
"step": 4600
|
| 692 |
+
},
|
| 693 |
+
{
|
| 694 |
+
"epoch": 8.679245283018869,
|
| 695 |
+
"eval_loss": 3.2945797443389893,
|
| 696 |
+
"eval_runtime": 149.8934,
|
| 697 |
+
"eval_samples_per_second": 452.402,
|
| 698 |
+
"eval_steps_per_second": 0.887,
|
| 699 |
+
"step": 4600
|
| 700 |
+
},
|
| 701 |
+
{
|
| 702 |
+
"epoch": 8.867924528301886,
|
| 703 |
+
"grad_norm": 17.493433128940666,
|
| 704 |
+
"learning_rate": 1e-06,
|
| 705 |
+
"loss": 3.332,
|
| 706 |
+
"step": 4700
|
| 707 |
+
},
|
| 708 |
+
{
|
| 709 |
+
"epoch": 8.867924528301886,
|
| 710 |
+
"eval_loss": 3.3459222316741943,
|
| 711 |
+
"eval_runtime": 149.8771,
|
| 712 |
+
"eval_samples_per_second": 452.451,
|
| 713 |
+
"eval_steps_per_second": 0.887,
|
| 714 |
+
"step": 4700
|
| 715 |
+
},
|
| 716 |
+
{
|
| 717 |
+
"epoch": 9.056603773584905,
|
| 718 |
+
"grad_norm": 24.996170360974173,
|
| 719 |
+
"learning_rate": 1e-06,
|
| 720 |
+
"loss": 3.3797,
|
| 721 |
+
"step": 4800
|
| 722 |
+
},
|
| 723 |
+
{
|
| 724 |
+
"epoch": 9.056603773584905,
|
| 725 |
+
"eval_loss": 3.4055655002593994,
|
| 726 |
+
"eval_runtime": 149.7316,
|
| 727 |
+
"eval_samples_per_second": 452.89,
|
| 728 |
+
"eval_steps_per_second": 0.888,
|
| 729 |
+
"step": 4800
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"epoch": 9.245283018867925,
|
| 733 |
+
"grad_norm": 215.6769864867367,
|
| 734 |
+
"learning_rate": 1e-06,
|
| 735 |
+
"loss": 3.4551,
|
| 736 |
+
"step": 4900
|
| 737 |
+
},
|
| 738 |
+
{
|
| 739 |
+
"epoch": 9.245283018867925,
|
| 740 |
+
"eval_loss": 3.5277042388916016,
|
| 741 |
+
"eval_runtime": 149.7551,
|
| 742 |
+
"eval_samples_per_second": 452.819,
|
| 743 |
+
"eval_steps_per_second": 0.888,
|
| 744 |
+
"step": 4900
|
| 745 |
+
},
|
| 746 |
+
{
|
| 747 |
+
"epoch": 9.433962264150944,
|
| 748 |
+
"grad_norm": 329.1368446406449,
|
| 749 |
+
"learning_rate": 1e-06,
|
| 750 |
+
"loss": 3.4127,
|
| 751 |
+
"step": 5000
|
| 752 |
+
},
|
| 753 |
+
{
|
| 754 |
+
"epoch": 9.433962264150944,
|
| 755 |
+
"eval_loss": 3.399594783782959,
|
| 756 |
+
"eval_runtime": 150.0027,
|
| 757 |
+
"eval_samples_per_second": 452.072,
|
| 758 |
+
"eval_steps_per_second": 0.887,
|
| 759 |
+
"step": 5000
|
| 760 |
+
},
|
| 761 |
+
{
|
| 762 |
+
"epoch": 9.622641509433961,
|
| 763 |
+
"grad_norm": 189.47715891368014,
|
| 764 |
+
"learning_rate": 1e-06,
|
| 765 |
+
"loss": 3.5646,
|
| 766 |
+
"step": 5100
|
| 767 |
+
},
|
| 768 |
+
{
|
| 769 |
+
"epoch": 9.622641509433961,
|
| 770 |
+
"eval_loss": 3.6223909854888916,
|
| 771 |
+
"eval_runtime": 149.6317,
|
| 772 |
+
"eval_samples_per_second": 453.193,
|
| 773 |
+
"eval_steps_per_second": 0.889,
|
| 774 |
+
"step": 5100
|
| 775 |
+
},
|
| 776 |
+
{
|
| 777 |
+
"epoch": 9.81132075471698,
|
| 778 |
+
"grad_norm": 154.57704389721005,
|
| 779 |
+
"learning_rate": 1e-06,
|
| 780 |
+
"loss": 3.6037,
|
| 781 |
+
"step": 5200
|
| 782 |
+
},
|
| 783 |
+
{
|
| 784 |
+
"epoch": 9.81132075471698,
|
| 785 |
+
"eval_loss": 3.698052406311035,
|
| 786 |
+
"eval_runtime": 149.5975,
|
| 787 |
+
"eval_samples_per_second": 453.296,
|
| 788 |
+
"eval_steps_per_second": 0.889,
|
| 789 |
+
"step": 5200
|
| 790 |
+
},
|
| 791 |
+
{
|
| 792 |
+
"epoch": 10.0,
|
| 793 |
+
"grad_norm": 201.5213039296342,
|
| 794 |
+
"learning_rate": 1e-06,
|
| 795 |
+
"loss": 3.698,
|
| 796 |
+
"step": 5300
|
| 797 |
+
},
|
| 798 |
+
{
|
| 799 |
+
"epoch": 10.0,
|
| 800 |
+
"eval_loss": 3.721698522567749,
|
| 801 |
+
"eval_runtime": 149.7798,
|
| 802 |
+
"eval_samples_per_second": 452.745,
|
| 803 |
+
"eval_steps_per_second": 0.888,
|
| 804 |
+
"step": 5300
|
| 805 |
+
}
|
| 806 |
+
],
|
| 807 |
+
"logging_steps": 100,
|
| 808 |
+
"max_steps": 5300,
|
| 809 |
+
"num_input_tokens_seen": 0,
|
| 810 |
+
"num_train_epochs": 10,
|
| 811 |
+
"save_steps": 500,
|
| 812 |
+
"stateful_callbacks": {
|
| 813 |
+
"TrainerControl": {
|
| 814 |
+
"args": {
|
| 815 |
+
"should_epoch_stop": false,
|
| 816 |
+
"should_evaluate": false,
|
| 817 |
+
"should_log": false,
|
| 818 |
+
"should_save": true,
|
| 819 |
+
"should_training_stop": true
|
| 820 |
+
},
|
| 821 |
+
"attributes": {}
|
| 822 |
+
}
|
| 823 |
+
},
|
| 824 |
+
"total_flos": 1664568262656000.0,
|
| 825 |
+
"train_batch_size": 64,
|
| 826 |
+
"trial_name": null,
|
| 827 |
+
"trial_params": null
|
| 828 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5854041825d4e3c49b0fe41047ce3abdea7df279bd9d55b5e7da360624c358ca
|
| 3 |
+
size 7608
|
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)
|