akkky02 commited on
Commit
ca5f7f5
1 Parent(s): 94eb8cd

Upload folder using huggingface_hub

Browse files
Files changed (34) hide show
  1. Qwen/Qwen1.5_1.8B_ledgar/README.md +93 -0
  2. Qwen/Qwen1.5_1.8B_ledgar/added_tokens.json +5 -0
  3. Qwen/Qwen1.5_1.8B_ledgar/all_results.json +23 -0
  4. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/added_tokens.json +5 -0
  5. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/config.json +235 -0
  6. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/global_step1800/bf16_zero_pp_rank_0_mp_rank_00_optim_states.pt +3 -0
  7. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/global_step1800/bf16_zero_pp_rank_1_mp_rank_00_optim_states.pt +3 -0
  8. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/global_step1800/mp_rank_00_model_states.pt +3 -0
  9. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/latest +1 -0
  10. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/merges.txt +0 -0
  11. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/model.safetensors +3 -0
  12. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/rng_state_0.pth +3 -0
  13. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/rng_state_1.pth +3 -0
  14. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/scheduler.pt +3 -0
  15. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/special_tokens_map.json +14 -0
  16. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/tokenizer.json +0 -0
  17. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/tokenizer_config.json +43 -0
  18. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/trainer_state.json +723 -0
  19. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/training_args.bin +3 -0
  20. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/vocab.json +0 -0
  21. Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/zero_to_fp32.py +604 -0
  22. Qwen/Qwen1.5_1.8B_ledgar/config.json +235 -0
  23. Qwen/Qwen1.5_1.8B_ledgar/eval_results.json +11 -0
  24. Qwen/Qwen1.5_1.8B_ledgar/merges.txt +0 -0
  25. Qwen/Qwen1.5_1.8B_ledgar/model.safetensors +3 -0
  26. Qwen/Qwen1.5_1.8B_ledgar/run.log +4 -0
  27. Qwen/Qwen1.5_1.8B_ledgar/special_tokens_map.json +14 -0
  28. Qwen/Qwen1.5_1.8B_ledgar/test_results.json +10 -0
  29. Qwen/Qwen1.5_1.8B_ledgar/tokenizer.json +0 -0
  30. Qwen/Qwen1.5_1.8B_ledgar/tokenizer_config.json +43 -0
  31. Qwen/Qwen1.5_1.8B_ledgar/train_results.json +8 -0
  32. Qwen/Qwen1.5_1.8B_ledgar/trainer_state.json +1122 -0
  33. Qwen/Qwen1.5_1.8B_ledgar/training_args.bin +3 -0
  34. Qwen/Qwen1.5_1.8B_ledgar/vocab.json +0 -0
Qwen/Qwen1.5_1.8B_ledgar/README.md ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ base_model: Qwen/Qwen1.5-1.8B
4
+ tags:
5
+ - generated_from_trainer
6
+ metrics:
7
+ - accuracy
8
+ model-index:
9
+ - name: Qwen1.5_1.8B_ledgar
10
+ results: []
11
+ ---
12
+
13
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
+ should probably proofread and complete it, then remove this comment. -->
15
+
16
+ # Qwen1.5_1.8B_ledgar
17
+
18
+ This model is a fine-tuned version of [Qwen/Qwen1.5-1.8B](https://huggingface.co/Qwen/Qwen1.5-1.8B) on an unknown dataset.
19
+ It achieves the following results on the evaluation set:
20
+ - Loss: 0.5064
21
+ - Accuracy: 0.8669
22
+ - F1 Macro: 0.7902
23
+ - F1 Micro: 0.8669
24
+
25
+ ## Model description
26
+
27
+ More information needed
28
+
29
+ ## Intended uses & limitations
30
+
31
+ More information needed
32
+
33
+ ## Training and evaluation data
34
+
35
+ More information needed
36
+
37
+ ## Training procedure
38
+
39
+ ### Training hyperparameters
40
+
41
+ The following hyperparameters were used during training:
42
+ - learning_rate: 5e-06
43
+ - train_batch_size: 32
44
+ - eval_batch_size: 32
45
+ - seed: 42
46
+ - distributed_type: multi-GPU
47
+ - num_devices: 2
48
+ - total_train_batch_size: 64
49
+ - total_eval_batch_size: 64
50
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
51
+ - lr_scheduler_type: linear
52
+ - num_epochs: 3.0
53
+
54
+ ### Training results
55
+
56
+ | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 Macro | F1 Micro |
57
+ |:-------------:|:-----:|:----:|:---------------:|:--------:|:--------:|:--------:|
58
+ | 1.3077 | 0.11 | 100 | 1.0945 | 0.7277 | 0.5771 | 0.7277 |
59
+ | 0.8627 | 0.21 | 200 | 0.8368 | 0.7907 | 0.6657 | 0.7907 |
60
+ | 0.7179 | 0.32 | 300 | 0.7824 | 0.7971 | 0.6862 | 0.7971 |
61
+ | 0.6961 | 0.43 | 400 | 0.6952 | 0.8138 | 0.6992 | 0.8138 |
62
+ | 0.745 | 0.53 | 500 | 0.6719 | 0.8121 | 0.7034 | 0.8121 |
63
+ | 0.6505 | 0.64 | 600 | 0.6220 | 0.834 | 0.7469 | 0.834 |
64
+ | 0.5914 | 0.75 | 700 | 0.6110 | 0.8362 | 0.7411 | 0.8362 |
65
+ | 0.5837 | 0.85 | 800 | 0.5767 | 0.8385 | 0.7413 | 0.8385 |
66
+ | 0.5218 | 0.96 | 900 | 0.5365 | 0.849 | 0.7703 | 0.849 |
67
+ | 0.2632 | 1.07 | 1000 | 0.5504 | 0.8562 | 0.7684 | 0.8562 |
68
+ | 0.2607 | 1.17 | 1100 | 0.5497 | 0.8525 | 0.7657 | 0.8525 |
69
+ | 0.274 | 1.28 | 1200 | 0.5439 | 0.8584 | 0.7746 | 0.8584 |
70
+ | 0.2216 | 1.39 | 1300 | 0.5687 | 0.8563 | 0.7754 | 0.8563 |
71
+ | 0.2044 | 1.49 | 1400 | 0.5385 | 0.861 | 0.7820 | 0.861 |
72
+ | 0.2508 | 1.6 | 1500 | 0.5658 | 0.8577 | 0.7711 | 0.8577 |
73
+ | 0.2513 | 1.71 | 1600 | 0.5367 | 0.8589 | 0.7872 | 0.8589 |
74
+ | 0.2787 | 1.81 | 1700 | 0.5133 | 0.8653 | 0.7903 | 0.8653 |
75
+ | 0.2357 | 1.92 | 1800 | 0.5064 | 0.8669 | 0.7902 | 0.8669 |
76
+ | 0.049 | 2.03 | 1900 | 0.5344 | 0.8719 | 0.7978 | 0.8719 |
77
+ | 0.0298 | 2.13 | 2000 | 0.5762 | 0.8737 | 0.7992 | 0.8737 |
78
+ | 0.0427 | 2.24 | 2100 | 0.5961 | 0.8708 | 0.7976 | 0.8708 |
79
+ | 0.036 | 2.35 | 2200 | 0.6128 | 0.8728 | 0.7988 | 0.8728 |
80
+ | 0.0551 | 2.45 | 2300 | 0.6165 | 0.8708 | 0.7976 | 0.8708 |
81
+ | 0.0392 | 2.56 | 2400 | 0.6023 | 0.8749 | 0.8038 | 0.8749 |
82
+ | 0.0364 | 2.67 | 2500 | 0.6168 | 0.8729 | 0.8001 | 0.8729 |
83
+ | 0.0416 | 2.77 | 2600 | 0.6103 | 0.8753 | 0.8048 | 0.8753 |
84
+ | 0.0353 | 2.88 | 2700 | 0.6118 | 0.8749 | 0.8054 | 0.8749 |
85
+ | 0.0308 | 2.99 | 2800 | 0.6114 | 0.875 | 0.8057 | 0.875 |
86
+
87
+
88
+ ### Framework versions
89
+
90
+ - Transformers 4.39.0.dev0
91
+ - Pytorch 2.2.1+cu121
92
+ - Datasets 2.18.0
93
+ - Tokenizers 0.15.2
Qwen/Qwen1.5_1.8B_ledgar/added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
Qwen/Qwen1.5_1.8B_ledgar/all_results.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.8669,
4
+ "eval_f1_macro": 0.7902403947168268,
5
+ "eval_f1_micro": 0.8669,
6
+ "eval_loss": 0.5063937306404114,
7
+ "eval_runtime": 24.4305,
8
+ "eval_samples": 10000,
9
+ "eval_samples_per_second": 409.324,
10
+ "eval_steps_per_second": 6.426,
11
+ "test_accuracy": 0.8664,
12
+ "test_f1_macro": 0.7974226514742132,
13
+ "test_f1_micro": 0.8664,
14
+ "test_loss": 0.532435953617096,
15
+ "test_runtime": 25.4113,
16
+ "test_samples_per_second": 393.525,
17
+ "test_steps_per_second": 6.178,
18
+ "train_loss": 0.42635450247932005,
19
+ "train_runtime": 3623.2348,
20
+ "train_samples": 60000,
21
+ "train_samples_per_second": 49.679,
22
+ "train_steps_per_second": 0.777
23
+ }
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/added_tokens.json ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/config.json ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Qwen/Qwen1.5-1.8B",
3
+ "architectures": [
4
+ "Qwen2ForSequenceClassification"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "eos_token_id": 151643,
9
+ "finetuning_task": "text-classification",
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "id2label": {
13
+ "0": "0",
14
+ "1": "1",
15
+ "2": "10",
16
+ "3": "11",
17
+ "4": "12",
18
+ "5": "13",
19
+ "6": "14",
20
+ "7": "15",
21
+ "8": "16",
22
+ "9": "17",
23
+ "10": "18",
24
+ "11": "19",
25
+ "12": "2",
26
+ "13": "20",
27
+ "14": "21",
28
+ "15": "22",
29
+ "16": "23",
30
+ "17": "24",
31
+ "18": "25",
32
+ "19": "26",
33
+ "20": "27",
34
+ "21": "28",
35
+ "22": "29",
36
+ "23": "3",
37
+ "24": "30",
38
+ "25": "31",
39
+ "26": "32",
40
+ "27": "33",
41
+ "28": "34",
42
+ "29": "35",
43
+ "30": "36",
44
+ "31": "37",
45
+ "32": "38",
46
+ "33": "39",
47
+ "34": "4",
48
+ "35": "40",
49
+ "36": "41",
50
+ "37": "42",
51
+ "38": "43",
52
+ "39": "44",
53
+ "40": "45",
54
+ "41": "46",
55
+ "42": "47",
56
+ "43": "48",
57
+ "44": "49",
58
+ "45": "5",
59
+ "46": "50",
60
+ "47": "51",
61
+ "48": "52",
62
+ "49": "53",
63
+ "50": "54",
64
+ "51": "55",
65
+ "52": "56",
66
+ "53": "57",
67
+ "54": "58",
68
+ "55": "59",
69
+ "56": "6",
70
+ "57": "60",
71
+ "58": "61",
72
+ "59": "62",
73
+ "60": "63",
74
+ "61": "64",
75
+ "62": "65",
76
+ "63": "66",
77
+ "64": "67",
78
+ "65": "68",
79
+ "66": "69",
80
+ "67": "7",
81
+ "68": "70",
82
+ "69": "71",
83
+ "70": "72",
84
+ "71": "73",
85
+ "72": "74",
86
+ "73": "75",
87
+ "74": "76",
88
+ "75": "77",
89
+ "76": "78",
90
+ "77": "79",
91
+ "78": "8",
92
+ "79": "80",
93
+ "80": "81",
94
+ "81": "82",
95
+ "82": "83",
96
+ "83": "84",
97
+ "84": "85",
98
+ "85": "86",
99
+ "86": "87",
100
+ "87": "88",
101
+ "88": "89",
102
+ "89": "9",
103
+ "90": "90",
104
+ "91": "91",
105
+ "92": "92",
106
+ "93": "93",
107
+ "94": "94",
108
+ "95": "95",
109
+ "96": "96",
110
+ "97": "97",
111
+ "98": "98",
112
+ "99": "99"
113
+ },
114
+ "initializer_range": 0.02,
115
+ "intermediate_size": 5504,
116
+ "label2id": {
117
+ "0": 0,
118
+ "1": 1,
119
+ "10": 2,
120
+ "11": 3,
121
+ "12": 4,
122
+ "13": 5,
123
+ "14": 6,
124
+ "15": 7,
125
+ "16": 8,
126
+ "17": 9,
127
+ "18": 10,
128
+ "19": 11,
129
+ "2": 12,
130
+ "20": 13,
131
+ "21": 14,
132
+ "22": 15,
133
+ "23": 16,
134
+ "24": 17,
135
+ "25": 18,
136
+ "26": 19,
137
+ "27": 20,
138
+ "28": 21,
139
+ "29": 22,
140
+ "3": 23,
141
+ "30": 24,
142
+ "31": 25,
143
+ "32": 26,
144
+ "33": 27,
145
+ "34": 28,
146
+ "35": 29,
147
+ "36": 30,
148
+ "37": 31,
149
+ "38": 32,
150
+ "39": 33,
151
+ "4": 34,
152
+ "40": 35,
153
+ "41": 36,
154
+ "42": 37,
155
+ "43": 38,
156
+ "44": 39,
157
+ "45": 40,
158
+ "46": 41,
159
+ "47": 42,
160
+ "48": 43,
161
+ "49": 44,
162
+ "5": 45,
163
+ "50": 46,
164
+ "51": 47,
165
+ "52": 48,
166
+ "53": 49,
167
+ "54": 50,
168
+ "55": 51,
169
+ "56": 52,
170
+ "57": 53,
171
+ "58": 54,
172
+ "59": 55,
173
+ "6": 56,
174
+ "60": 57,
175
+ "61": 58,
176
+ "62": 59,
177
+ "63": 60,
178
+ "64": 61,
179
+ "65": 62,
180
+ "66": 63,
181
+ "67": 64,
182
+ "68": 65,
183
+ "69": 66,
184
+ "7": 67,
185
+ "70": 68,
186
+ "71": 69,
187
+ "72": 70,
188
+ "73": 71,
189
+ "74": 72,
190
+ "75": 73,
191
+ "76": 74,
192
+ "77": 75,
193
+ "78": 76,
194
+ "79": 77,
195
+ "8": 78,
196
+ "80": 79,
197
+ "81": 80,
198
+ "82": 81,
199
+ "83": 82,
200
+ "84": 83,
201
+ "85": 84,
202
+ "86": 85,
203
+ "87": 86,
204
+ "88": 87,
205
+ "89": 88,
206
+ "9": 89,
207
+ "90": 90,
208
+ "91": 91,
209
+ "92": 92,
210
+ "93": 93,
211
+ "94": 94,
212
+ "95": 95,
213
+ "96": 96,
214
+ "97": 97,
215
+ "98": 98,
216
+ "99": 99
217
+ },
218
+ "max_position_embeddings": 32768,
219
+ "max_window_layers": 21,
220
+ "model_type": "qwen2",
221
+ "num_attention_heads": 16,
222
+ "num_hidden_layers": 24,
223
+ "num_key_value_heads": 16,
224
+ "pad_token_id": 151643,
225
+ "problem_type": "single_label_classification",
226
+ "rms_norm_eps": 1e-06,
227
+ "rope_theta": 1000000.0,
228
+ "sliding_window": 32768,
229
+ "tie_word_embeddings": false,
230
+ "torch_dtype": "bfloat16",
231
+ "transformers_version": "4.39.0.dev0",
232
+ "use_cache": true,
233
+ "use_sliding_window": false,
234
+ "vocab_size": 151646
235
+ }
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/global_step1800/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:ef1b558ae70d0d44599d87ecd1dfb077c81a23f338132f079e36f7b5290e7c08
3
+ size 9151661452
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/global_step1800/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:370b65eed061f4813c54cd3f474407c386b95d6eb5825fc476c6a954ed387a5b
3
+ size 9151666316
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/global_step1800/mp_rank_00_model_states.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:122da52fa34439283e1b14257cdd1cdeb266e23b92ffc56b8f05f799ec83fc3e
3
+ size 3050629496
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/latest ADDED
@@ -0,0 +1 @@
 
 
1
+ global_step1800
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6be1da9a3d742bcd4f56af0dd627ec82b2b529a0f3a3259561a3da60f4f2dffc
3
+ size 3050582504
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/rng_state_0.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65f5ad184cd93fcb3486b7d9a9620ac3dd75a9ac32473b69036d8a9ea5d74a35
3
+ size 14512
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/rng_state_1.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca245034f0fb0f22361e0627eba02734337b9a09a6d7dfcd1d3684fc6f29790d
3
+ size 14512
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:73fb8dcc2e911a74681d6256ed942bb17afce93f5ee2a12d46277718ba595f5e
3
+ size 1064
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/special_tokens_map.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": "<|endoftext|>"
14
+ }
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
35
+ "clean_up_tokenization_spaces": false,
36
+ "eos_token": "<|endoftext|>",
37
+ "errors": "replace",
38
+ "model_max_length": 32768,
39
+ "pad_token": "<|endoftext|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/trainer_state.json ADDED
@@ -0,0 +1,723 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.5063937306404114,
3
+ "best_model_checkpoint": "../../experiments_checkpoints/MAdAiLab/Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800",
4
+ "epoch": 1.9189765458422174,
5
+ "eval_steps": 100,
6
+ "global_step": 1800,
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.03,
13
+ "grad_norm": 80.4836196899414,
14
+ "learning_rate": 4.9555792466240235e-06,
15
+ "loss": 7.9887,
16
+ "step": 25
17
+ },
18
+ {
19
+ "epoch": 0.05,
20
+ "grad_norm": 60.927364349365234,
21
+ "learning_rate": 4.911158493248046e-06,
22
+ "loss": 3.1908,
23
+ "step": 50
24
+ },
25
+ {
26
+ "epoch": 0.08,
27
+ "grad_norm": 49.68091583251953,
28
+ "learning_rate": 4.866737739872069e-06,
29
+ "loss": 1.7183,
30
+ "step": 75
31
+ },
32
+ {
33
+ "epoch": 0.11,
34
+ "grad_norm": 55.176666259765625,
35
+ "learning_rate": 4.822316986496091e-06,
36
+ "loss": 1.3077,
37
+ "step": 100
38
+ },
39
+ {
40
+ "epoch": 0.11,
41
+ "eval_accuracy": 0.7277,
42
+ "eval_f1_macro": 0.5770831474844406,
43
+ "eval_f1_micro": 0.7277,
44
+ "eval_loss": 1.0944937467575073,
45
+ "eval_runtime": 25.447,
46
+ "eval_samples_per_second": 392.973,
47
+ "eval_steps_per_second": 6.17,
48
+ "step": 100
49
+ },
50
+ {
51
+ "epoch": 0.13,
52
+ "grad_norm": 46.64506530761719,
53
+ "learning_rate": 4.777896233120114e-06,
54
+ "loss": 1.1393,
55
+ "step": 125
56
+ },
57
+ {
58
+ "epoch": 0.16,
59
+ "grad_norm": 41.11891174316406,
60
+ "learning_rate": 4.733475479744136e-06,
61
+ "loss": 1.0243,
62
+ "step": 150
63
+ },
64
+ {
65
+ "epoch": 0.19,
66
+ "grad_norm": 34.20009994506836,
67
+ "learning_rate": 4.6890547263681595e-06,
68
+ "loss": 0.9005,
69
+ "step": 175
70
+ },
71
+ {
72
+ "epoch": 0.21,
73
+ "grad_norm": 38.80377197265625,
74
+ "learning_rate": 4.644633972992183e-06,
75
+ "loss": 0.8627,
76
+ "step": 200
77
+ },
78
+ {
79
+ "epoch": 0.21,
80
+ "eval_accuracy": 0.7907,
81
+ "eval_f1_macro": 0.6657039157603262,
82
+ "eval_f1_micro": 0.7907,
83
+ "eval_loss": 0.8368468880653381,
84
+ "eval_runtime": 25.9484,
85
+ "eval_samples_per_second": 385.38,
86
+ "eval_steps_per_second": 6.05,
87
+ "step": 200
88
+ },
89
+ {
90
+ "epoch": 0.24,
91
+ "grad_norm": 34.973506927490234,
92
+ "learning_rate": 4.600213219616206e-06,
93
+ "loss": 0.7896,
94
+ "step": 225
95
+ },
96
+ {
97
+ "epoch": 0.27,
98
+ "grad_norm": 29.98388671875,
99
+ "learning_rate": 4.555792466240228e-06,
100
+ "loss": 0.8307,
101
+ "step": 250
102
+ },
103
+ {
104
+ "epoch": 0.29,
105
+ "grad_norm": 27.09973907470703,
106
+ "learning_rate": 4.51137171286425e-06,
107
+ "loss": 0.7846,
108
+ "step": 275
109
+ },
110
+ {
111
+ "epoch": 0.32,
112
+ "grad_norm": 36.151161193847656,
113
+ "learning_rate": 4.466950959488273e-06,
114
+ "loss": 0.7179,
115
+ "step": 300
116
+ },
117
+ {
118
+ "epoch": 0.32,
119
+ "eval_accuracy": 0.7971,
120
+ "eval_f1_macro": 0.6861778340669753,
121
+ "eval_f1_micro": 0.7971,
122
+ "eval_loss": 0.7824062705039978,
123
+ "eval_runtime": 25.9003,
124
+ "eval_samples_per_second": 386.095,
125
+ "eval_steps_per_second": 6.062,
126
+ "step": 300
127
+ },
128
+ {
129
+ "epoch": 0.35,
130
+ "grad_norm": 33.09822463989258,
131
+ "learning_rate": 4.422530206112296e-06,
132
+ "loss": 0.7133,
133
+ "step": 325
134
+ },
135
+ {
136
+ "epoch": 0.37,
137
+ "grad_norm": 35.52923583984375,
138
+ "learning_rate": 4.378109452736319e-06,
139
+ "loss": 0.7354,
140
+ "step": 350
141
+ },
142
+ {
143
+ "epoch": 0.4,
144
+ "grad_norm": 39.79545211791992,
145
+ "learning_rate": 4.333688699360342e-06,
146
+ "loss": 0.6619,
147
+ "step": 375
148
+ },
149
+ {
150
+ "epoch": 0.43,
151
+ "grad_norm": 30.13161849975586,
152
+ "learning_rate": 4.289267945984365e-06,
153
+ "loss": 0.6961,
154
+ "step": 400
155
+ },
156
+ {
157
+ "epoch": 0.43,
158
+ "eval_accuracy": 0.8138,
159
+ "eval_f1_macro": 0.6992465625213966,
160
+ "eval_f1_micro": 0.8138,
161
+ "eval_loss": 0.6951531171798706,
162
+ "eval_runtime": 25.6082,
163
+ "eval_samples_per_second": 390.5,
164
+ "eval_steps_per_second": 6.131,
165
+ "step": 400
166
+ },
167
+ {
168
+ "epoch": 0.45,
169
+ "grad_norm": 27.575519561767578,
170
+ "learning_rate": 4.244847192608387e-06,
171
+ "loss": 0.7162,
172
+ "step": 425
173
+ },
174
+ {
175
+ "epoch": 0.48,
176
+ "grad_norm": 35.084754943847656,
177
+ "learning_rate": 4.200426439232409e-06,
178
+ "loss": 0.7722,
179
+ "step": 450
180
+ },
181
+ {
182
+ "epoch": 0.51,
183
+ "grad_norm": 28.47511863708496,
184
+ "learning_rate": 4.156005685856432e-06,
185
+ "loss": 0.6866,
186
+ "step": 475
187
+ },
188
+ {
189
+ "epoch": 0.53,
190
+ "grad_norm": 32.34709548950195,
191
+ "learning_rate": 4.1115849324804554e-06,
192
+ "loss": 0.745,
193
+ "step": 500
194
+ },
195
+ {
196
+ "epoch": 0.53,
197
+ "eval_accuracy": 0.8121,
198
+ "eval_f1_macro": 0.7033560293953169,
199
+ "eval_f1_micro": 0.8121,
200
+ "eval_loss": 0.6718780994415283,
201
+ "eval_runtime": 25.9161,
202
+ "eval_samples_per_second": 385.86,
203
+ "eval_steps_per_second": 6.058,
204
+ "step": 500
205
+ },
206
+ {
207
+ "epoch": 0.56,
208
+ "grad_norm": 25.5845890045166,
209
+ "learning_rate": 4.067164179104478e-06,
210
+ "loss": 0.6535,
211
+ "step": 525
212
+ },
213
+ {
214
+ "epoch": 0.59,
215
+ "grad_norm": 22.466503143310547,
216
+ "learning_rate": 4.022743425728501e-06,
217
+ "loss": 0.5969,
218
+ "step": 550
219
+ },
220
+ {
221
+ "epoch": 0.61,
222
+ "grad_norm": 27.53134536743164,
223
+ "learning_rate": 3.978322672352524e-06,
224
+ "loss": 0.5926,
225
+ "step": 575
226
+ },
227
+ {
228
+ "epoch": 0.64,
229
+ "grad_norm": 31.356454849243164,
230
+ "learning_rate": 3.933901918976546e-06,
231
+ "loss": 0.6505,
232
+ "step": 600
233
+ },
234
+ {
235
+ "epoch": 0.64,
236
+ "eval_accuracy": 0.834,
237
+ "eval_f1_macro": 0.7469091035082649,
238
+ "eval_f1_micro": 0.834,
239
+ "eval_loss": 0.6219750046730042,
240
+ "eval_runtime": 25.9316,
241
+ "eval_samples_per_second": 385.63,
242
+ "eval_steps_per_second": 6.054,
243
+ "step": 600
244
+ },
245
+ {
246
+ "epoch": 0.67,
247
+ "grad_norm": 37.17654800415039,
248
+ "learning_rate": 3.889481165600569e-06,
249
+ "loss": 0.6171,
250
+ "step": 625
251
+ },
252
+ {
253
+ "epoch": 0.69,
254
+ "grad_norm": 26.71038055419922,
255
+ "learning_rate": 3.8450604122245914e-06,
256
+ "loss": 0.6218,
257
+ "step": 650
258
+ },
259
+ {
260
+ "epoch": 0.72,
261
+ "grad_norm": 27.787952423095703,
262
+ "learning_rate": 3.8006396588486145e-06,
263
+ "loss": 0.6124,
264
+ "step": 675
265
+ },
266
+ {
267
+ "epoch": 0.75,
268
+ "grad_norm": 30.405912399291992,
269
+ "learning_rate": 3.756218905472637e-06,
270
+ "loss": 0.5914,
271
+ "step": 700
272
+ },
273
+ {
274
+ "epoch": 0.75,
275
+ "eval_accuracy": 0.8362,
276
+ "eval_f1_macro": 0.7410957777496914,
277
+ "eval_f1_micro": 0.8362,
278
+ "eval_loss": 0.6109625101089478,
279
+ "eval_runtime": 25.6247,
280
+ "eval_samples_per_second": 390.248,
281
+ "eval_steps_per_second": 6.127,
282
+ "step": 700
283
+ },
284
+ {
285
+ "epoch": 0.77,
286
+ "grad_norm": 30.52012062072754,
287
+ "learning_rate": 3.71179815209666e-06,
288
+ "loss": 0.5711,
289
+ "step": 725
290
+ },
291
+ {
292
+ "epoch": 0.8,
293
+ "grad_norm": 30.88004493713379,
294
+ "learning_rate": 3.667377398720683e-06,
295
+ "loss": 0.6695,
296
+ "step": 750
297
+ },
298
+ {
299
+ "epoch": 0.83,
300
+ "grad_norm": 22.504459381103516,
301
+ "learning_rate": 3.622956645344705e-06,
302
+ "loss": 0.5731,
303
+ "step": 775
304
+ },
305
+ {
306
+ "epoch": 0.85,
307
+ "grad_norm": 21.515512466430664,
308
+ "learning_rate": 3.578535891968728e-06,
309
+ "loss": 0.5837,
310
+ "step": 800
311
+ },
312
+ {
313
+ "epoch": 0.85,
314
+ "eval_accuracy": 0.8385,
315
+ "eval_f1_macro": 0.7413235492734335,
316
+ "eval_f1_micro": 0.8385,
317
+ "eval_loss": 0.5766780972480774,
318
+ "eval_runtime": 25.6608,
319
+ "eval_samples_per_second": 389.7,
320
+ "eval_steps_per_second": 6.118,
321
+ "step": 800
322
+ },
323
+ {
324
+ "epoch": 0.88,
325
+ "grad_norm": 30.9660587310791,
326
+ "learning_rate": 3.534115138592751e-06,
327
+ "loss": 0.6085,
328
+ "step": 825
329
+ },
330
+ {
331
+ "epoch": 0.91,
332
+ "grad_norm": 18.883647918701172,
333
+ "learning_rate": 3.4896943852167736e-06,
334
+ "loss": 0.5121,
335
+ "step": 850
336
+ },
337
+ {
338
+ "epoch": 0.93,
339
+ "grad_norm": 24.548561096191406,
340
+ "learning_rate": 3.4452736318407963e-06,
341
+ "loss": 0.5621,
342
+ "step": 875
343
+ },
344
+ {
345
+ "epoch": 0.96,
346
+ "grad_norm": 29.833791732788086,
347
+ "learning_rate": 3.4008528784648194e-06,
348
+ "loss": 0.5218,
349
+ "step": 900
350
+ },
351
+ {
352
+ "epoch": 0.96,
353
+ "eval_accuracy": 0.849,
354
+ "eval_f1_macro": 0.7702797685808792,
355
+ "eval_f1_micro": 0.849,
356
+ "eval_loss": 0.5365203022956848,
357
+ "eval_runtime": 25.9091,
358
+ "eval_samples_per_second": 385.964,
359
+ "eval_steps_per_second": 6.06,
360
+ "step": 900
361
+ },
362
+ {
363
+ "epoch": 0.99,
364
+ "grad_norm": 27.948928833007812,
365
+ "learning_rate": 3.3564321250888416e-06,
366
+ "loss": 0.5681,
367
+ "step": 925
368
+ },
369
+ {
370
+ "epoch": 1.01,
371
+ "grad_norm": 19.800880432128906,
372
+ "learning_rate": 3.3120113717128643e-06,
373
+ "loss": 0.4014,
374
+ "step": 950
375
+ },
376
+ {
377
+ "epoch": 1.04,
378
+ "grad_norm": 19.333465576171875,
379
+ "learning_rate": 3.2675906183368874e-06,
380
+ "loss": 0.2795,
381
+ "step": 975
382
+ },
383
+ {
384
+ "epoch": 1.07,
385
+ "grad_norm": 22.315195083618164,
386
+ "learning_rate": 3.22316986496091e-06,
387
+ "loss": 0.2632,
388
+ "step": 1000
389
+ },
390
+ {
391
+ "epoch": 1.07,
392
+ "eval_accuracy": 0.8562,
393
+ "eval_f1_macro": 0.7683569808757446,
394
+ "eval_f1_micro": 0.8562,
395
+ "eval_loss": 0.5503664016723633,
396
+ "eval_runtime": 25.5198,
397
+ "eval_samples_per_second": 391.852,
398
+ "eval_steps_per_second": 6.152,
399
+ "step": 1000
400
+ },
401
+ {
402
+ "epoch": 1.09,
403
+ "grad_norm": 24.819501876831055,
404
+ "learning_rate": 3.1787491115849327e-06,
405
+ "loss": 0.2532,
406
+ "step": 1025
407
+ },
408
+ {
409
+ "epoch": 1.12,
410
+ "grad_norm": 21.534936904907227,
411
+ "learning_rate": 3.1343283582089558e-06,
412
+ "loss": 0.2311,
413
+ "step": 1050
414
+ },
415
+ {
416
+ "epoch": 1.15,
417
+ "grad_norm": 24.088809967041016,
418
+ "learning_rate": 3.0899076048329785e-06,
419
+ "loss": 0.3134,
420
+ "step": 1075
421
+ },
422
+ {
423
+ "epoch": 1.17,
424
+ "grad_norm": 27.605493545532227,
425
+ "learning_rate": 3.0454868514570007e-06,
426
+ "loss": 0.2607,
427
+ "step": 1100
428
+ },
429
+ {
430
+ "epoch": 1.17,
431
+ "eval_accuracy": 0.8525,
432
+ "eval_f1_macro": 0.7656891626030512,
433
+ "eval_f1_micro": 0.8525,
434
+ "eval_loss": 0.5496523380279541,
435
+ "eval_runtime": 25.7081,
436
+ "eval_samples_per_second": 388.982,
437
+ "eval_steps_per_second": 6.107,
438
+ "step": 1100
439
+ },
440
+ {
441
+ "epoch": 1.2,
442
+ "grad_norm": 22.955158233642578,
443
+ "learning_rate": 3.0010660980810234e-06,
444
+ "loss": 0.2674,
445
+ "step": 1125
446
+ },
447
+ {
448
+ "epoch": 1.23,
449
+ "grad_norm": 19.089893341064453,
450
+ "learning_rate": 2.9566453447050464e-06,
451
+ "loss": 0.2074,
452
+ "step": 1150
453
+ },
454
+ {
455
+ "epoch": 1.25,
456
+ "grad_norm": 19.285688400268555,
457
+ "learning_rate": 2.912224591329069e-06,
458
+ "loss": 0.2488,
459
+ "step": 1175
460
+ },
461
+ {
462
+ "epoch": 1.28,
463
+ "grad_norm": 23.45233726501465,
464
+ "learning_rate": 2.867803837953092e-06,
465
+ "loss": 0.274,
466
+ "step": 1200
467
+ },
468
+ {
469
+ "epoch": 1.28,
470
+ "eval_accuracy": 0.8584,
471
+ "eval_f1_macro": 0.7746299057445165,
472
+ "eval_f1_micro": 0.8584,
473
+ "eval_loss": 0.5439000129699707,
474
+ "eval_runtime": 25.9014,
475
+ "eval_samples_per_second": 386.079,
476
+ "eval_steps_per_second": 6.061,
477
+ "step": 1200
478
+ },
479
+ {
480
+ "epoch": 1.31,
481
+ "grad_norm": 31.231454849243164,
482
+ "learning_rate": 2.823383084577115e-06,
483
+ "loss": 0.2624,
484
+ "step": 1225
485
+ },
486
+ {
487
+ "epoch": 1.33,
488
+ "grad_norm": 28.1010799407959,
489
+ "learning_rate": 2.7789623312011375e-06,
490
+ "loss": 0.2992,
491
+ "step": 1250
492
+ },
493
+ {
494
+ "epoch": 1.36,
495
+ "grad_norm": 30.002384185791016,
496
+ "learning_rate": 2.7345415778251598e-06,
497
+ "loss": 0.2589,
498
+ "step": 1275
499
+ },
500
+ {
501
+ "epoch": 1.39,
502
+ "grad_norm": 23.61323356628418,
503
+ "learning_rate": 2.690120824449183e-06,
504
+ "loss": 0.2216,
505
+ "step": 1300
506
+ },
507
+ {
508
+ "epoch": 1.39,
509
+ "eval_accuracy": 0.8563,
510
+ "eval_f1_macro": 0.7753520513346309,
511
+ "eval_f1_micro": 0.8563,
512
+ "eval_loss": 0.5687375068664551,
513
+ "eval_runtime": 25.9424,
514
+ "eval_samples_per_second": 385.47,
515
+ "eval_steps_per_second": 6.052,
516
+ "step": 1300
517
+ },
518
+ {
519
+ "epoch": 1.41,
520
+ "grad_norm": 27.56183433532715,
521
+ "learning_rate": 2.6457000710732055e-06,
522
+ "loss": 0.2845,
523
+ "step": 1325
524
+ },
525
+ {
526
+ "epoch": 1.44,
527
+ "grad_norm": 18.88576316833496,
528
+ "learning_rate": 2.601279317697228e-06,
529
+ "loss": 0.2685,
530
+ "step": 1350
531
+ },
532
+ {
533
+ "epoch": 1.47,
534
+ "grad_norm": 19.662220001220703,
535
+ "learning_rate": 2.5568585643212513e-06,
536
+ "loss": 0.2489,
537
+ "step": 1375
538
+ },
539
+ {
540
+ "epoch": 1.49,
541
+ "grad_norm": 22.736656188964844,
542
+ "learning_rate": 2.512437810945274e-06,
543
+ "loss": 0.2044,
544
+ "step": 1400
545
+ },
546
+ {
547
+ "epoch": 1.49,
548
+ "eval_accuracy": 0.861,
549
+ "eval_f1_macro": 0.7820141563614671,
550
+ "eval_f1_micro": 0.861,
551
+ "eval_loss": 0.5385035276412964,
552
+ "eval_runtime": 25.6666,
553
+ "eval_samples_per_second": 389.612,
554
+ "eval_steps_per_second": 6.117,
555
+ "step": 1400
556
+ },
557
+ {
558
+ "epoch": 1.52,
559
+ "grad_norm": 24.569435119628906,
560
+ "learning_rate": 2.4680170575692966e-06,
561
+ "loss": 0.2388,
562
+ "step": 1425
563
+ },
564
+ {
565
+ "epoch": 1.55,
566
+ "grad_norm": 17.50179100036621,
567
+ "learning_rate": 2.4235963041933193e-06,
568
+ "loss": 0.2556,
569
+ "step": 1450
570
+ },
571
+ {
572
+ "epoch": 1.57,
573
+ "grad_norm": 15.387917518615723,
574
+ "learning_rate": 2.379175550817342e-06,
575
+ "loss": 0.2343,
576
+ "step": 1475
577
+ },
578
+ {
579
+ "epoch": 1.6,
580
+ "grad_norm": 29.757495880126953,
581
+ "learning_rate": 2.3347547974413646e-06,
582
+ "loss": 0.2508,
583
+ "step": 1500
584
+ },
585
+ {
586
+ "epoch": 1.6,
587
+ "eval_accuracy": 0.8577,
588
+ "eval_f1_macro": 0.7710712973870113,
589
+ "eval_f1_micro": 0.8577,
590
+ "eval_loss": 0.5657808780670166,
591
+ "eval_runtime": 25.9754,
592
+ "eval_samples_per_second": 384.98,
593
+ "eval_steps_per_second": 6.044,
594
+ "step": 1500
595
+ },
596
+ {
597
+ "epoch": 1.63,
598
+ "grad_norm": 24.104217529296875,
599
+ "learning_rate": 2.2903340440653877e-06,
600
+ "loss": 0.2647,
601
+ "step": 1525
602
+ },
603
+ {
604
+ "epoch": 1.65,
605
+ "grad_norm": 29.48048973083496,
606
+ "learning_rate": 2.24591329068941e-06,
607
+ "loss": 0.212,
608
+ "step": 1550
609
+ },
610
+ {
611
+ "epoch": 1.68,
612
+ "grad_norm": 11.834880828857422,
613
+ "learning_rate": 2.201492537313433e-06,
614
+ "loss": 0.1939,
615
+ "step": 1575
616
+ },
617
+ {
618
+ "epoch": 1.71,
619
+ "grad_norm": 24.24506378173828,
620
+ "learning_rate": 2.1570717839374557e-06,
621
+ "loss": 0.2513,
622
+ "step": 1600
623
+ },
624
+ {
625
+ "epoch": 1.71,
626
+ "eval_accuracy": 0.8589,
627
+ "eval_f1_macro": 0.7871987440671023,
628
+ "eval_f1_micro": 0.8589,
629
+ "eval_loss": 0.5366827845573425,
630
+ "eval_runtime": 25.9643,
631
+ "eval_samples_per_second": 385.144,
632
+ "eval_steps_per_second": 6.047,
633
+ "step": 1600
634
+ },
635
+ {
636
+ "epoch": 1.73,
637
+ "grad_norm": 23.33180046081543,
638
+ "learning_rate": 2.112651030561479e-06,
639
+ "loss": 0.2409,
640
+ "step": 1625
641
+ },
642
+ {
643
+ "epoch": 1.76,
644
+ "grad_norm": 18.71114730834961,
645
+ "learning_rate": 2.068230277185501e-06,
646
+ "loss": 0.224,
647
+ "step": 1650
648
+ },
649
+ {
650
+ "epoch": 1.79,
651
+ "grad_norm": 21.95819854736328,
652
+ "learning_rate": 2.023809523809524e-06,
653
+ "loss": 0.2223,
654
+ "step": 1675
655
+ },
656
+ {
657
+ "epoch": 1.81,
658
+ "grad_norm": 27.065677642822266,
659
+ "learning_rate": 1.979388770433547e-06,
660
+ "loss": 0.2787,
661
+ "step": 1700
662
+ },
663
+ {
664
+ "epoch": 1.81,
665
+ "eval_accuracy": 0.8653,
666
+ "eval_f1_macro": 0.790261134849528,
667
+ "eval_f1_micro": 0.8653,
668
+ "eval_loss": 0.5133171677589417,
669
+ "eval_runtime": 25.5701,
670
+ "eval_samples_per_second": 391.081,
671
+ "eval_steps_per_second": 6.14,
672
+ "step": 1700
673
+ },
674
+ {
675
+ "epoch": 1.84,
676
+ "grad_norm": 35.288761138916016,
677
+ "learning_rate": 1.9349680170575695e-06,
678
+ "loss": 0.2709,
679
+ "step": 1725
680
+ },
681
+ {
682
+ "epoch": 1.87,
683
+ "grad_norm": 21.077306747436523,
684
+ "learning_rate": 1.8905472636815921e-06,
685
+ "loss": 0.2002,
686
+ "step": 1750
687
+ },
688
+ {
689
+ "epoch": 1.89,
690
+ "grad_norm": 25.394838333129883,
691
+ "learning_rate": 1.846126510305615e-06,
692
+ "loss": 0.2461,
693
+ "step": 1775
694
+ },
695
+ {
696
+ "epoch": 1.92,
697
+ "grad_norm": 26.597759246826172,
698
+ "learning_rate": 1.8017057569296375e-06,
699
+ "loss": 0.2357,
700
+ "step": 1800
701
+ },
702
+ {
703
+ "epoch": 1.92,
704
+ "eval_accuracy": 0.8669,
705
+ "eval_f1_macro": 0.7902403947168268,
706
+ "eval_f1_micro": 0.8669,
707
+ "eval_loss": 0.5063937306404114,
708
+ "eval_runtime": 25.6031,
709
+ "eval_samples_per_second": 390.577,
710
+ "eval_steps_per_second": 6.132,
711
+ "step": 1800
712
+ }
713
+ ],
714
+ "logging_steps": 25,
715
+ "max_steps": 2814,
716
+ "num_input_tokens_seen": 0,
717
+ "num_train_epochs": 3,
718
+ "save_steps": 100,
719
+ "total_flos": 1.074692042564567e+17,
720
+ "train_batch_size": 32,
721
+ "trial_name": null,
722
+ "trial_params": null
723
+ }
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f26a8af75d31668209ed94c987a4170cdf12fb1b08369f54b4ac17f6f18edc56
3
+ size 5944
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800/zero_to_fp32.py ADDED
@@ -0,0 +1,604 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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, exclude_frozen_parameters):
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
+ exclude_frozen_parameters)
216
+ elif zero_stage == 3:
217
+ return _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
218
+ exclude_frozen_parameters)
219
+
220
+
221
+ def _zero2_merge_frozen_params(state_dict, zero_model_states):
222
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
223
+ return
224
+
225
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
226
+ frozen_param_fragments = zero_model_states[0].frozen_param_fragments
227
+
228
+ if debug:
229
+ num_elem = sum(s.numel() for s in frozen_param_shapes.values())
230
+ print(f'rank 0: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
231
+
232
+ wanted_params = len(frozen_param_shapes)
233
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
234
+ avail_numel = sum([p.numel() for p in frozen_param_fragments.values()])
235
+ print(f'Frozen params: Have {avail_numel} numels to process.')
236
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
237
+
238
+ total_params = 0
239
+ total_numel = 0
240
+ for name, shape in frozen_param_shapes.items():
241
+ total_params += 1
242
+ unpartitioned_numel = shape.numel()
243
+ total_numel += unpartitioned_numel
244
+
245
+ state_dict[name] = frozen_param_fragments[name]
246
+
247
+ if debug:
248
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
249
+
250
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
251
+
252
+
253
+ def _has_callable(obj, fn):
254
+ attr = getattr(obj, fn, None)
255
+ return callable(attr)
256
+
257
+
258
+ def _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
259
+ param_shapes = zero_model_states[0].param_shapes
260
+
261
+ # Reconstruction protocol:
262
+ #
263
+ # XXX: document this
264
+
265
+ if debug:
266
+ for i in range(world_size):
267
+ for j in range(len(fp32_flat_groups[0])):
268
+ print(f"{FP32_FLAT_GROUPS}[{i}][{j}].shape={fp32_flat_groups[i][j].shape}")
269
+
270
+ # XXX: memory usage doubles here (zero2)
271
+ num_param_groups = len(fp32_flat_groups[0])
272
+ merged_single_partition_of_fp32_groups = []
273
+ for i in range(num_param_groups):
274
+ merged_partitions = [sd[i] for sd in fp32_flat_groups]
275
+ full_single_fp32_vector = torch.cat(merged_partitions, 0)
276
+ merged_single_partition_of_fp32_groups.append(full_single_fp32_vector)
277
+ avail_numel = sum(
278
+ [full_single_fp32_vector.numel() for full_single_fp32_vector in merged_single_partition_of_fp32_groups])
279
+
280
+ if debug:
281
+ wanted_params = sum([len(shapes) for shapes in param_shapes])
282
+ wanted_numel = sum([sum(shape.numel() for shape in shapes.values()) for shapes in param_shapes])
283
+ # not asserting if there is a mismatch due to possible padding
284
+ print(f"Have {avail_numel} numels to process.")
285
+ print(f"Need {wanted_numel} numels in {wanted_params} params.")
286
+
287
+ # params
288
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
289
+ # out-of-core computing solution
290
+ total_numel = 0
291
+ total_params = 0
292
+ for shapes, full_single_fp32_vector in zip(param_shapes, merged_single_partition_of_fp32_groups):
293
+ offset = 0
294
+ avail_numel = full_single_fp32_vector.numel()
295
+ for name, shape in shapes.items():
296
+
297
+ unpartitioned_numel = shape.numel() if _has_callable(shape, 'numel') else math.prod(shape)
298
+ total_numel += unpartitioned_numel
299
+ total_params += 1
300
+
301
+ if debug:
302
+ print(f"{name} full shape: {shape} unpartitioned numel {unpartitioned_numel} ")
303
+ state_dict[name] = full_single_fp32_vector.narrow(0, offset, unpartitioned_numel).view(shape)
304
+ offset += unpartitioned_numel
305
+
306
+ # Z2 started to align to 2*world_size to improve nccl performance. Therefore both offset and
307
+ # avail_numel can differ by anywhere between 0..2*world_size. Due to two unrelated complex
308
+ # paddings performed in the code it's almost impossible to predict the exact numbers w/o the
309
+ # live optimizer object, so we are checking that the numbers are within the right range
310
+ align_to = 2 * world_size
311
+
312
+ def zero2_align(x):
313
+ return align_to * math.ceil(x / align_to)
314
+
315
+ if debug:
316
+ print(f"original offset={offset}, avail_numel={avail_numel}")
317
+
318
+ offset = zero2_align(offset)
319
+ avail_numel = zero2_align(avail_numel)
320
+
321
+ if debug:
322
+ print(f"aligned offset={offset}, avail_numel={avail_numel}")
323
+
324
+ # Sanity check
325
+ if offset != avail_numel:
326
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
327
+
328
+ print(f"Reconstructed fp32 state dict with {total_params} params {total_numel} elements")
329
+
330
+
331
+ def _get_fp32_state_dict_from_zero2_checkpoint(world_size, fp32_flat_groups, zero_model_states,
332
+ exclude_frozen_parameters):
333
+ state_dict = OrderedDict()
334
+
335
+ # buffers
336
+ buffers = zero_model_states[0].buffers
337
+ state_dict.update(buffers)
338
+ if debug:
339
+ print(f"added {len(buffers)} buffers")
340
+
341
+ if not exclude_frozen_parameters:
342
+ _zero2_merge_frozen_params(state_dict, zero_model_states)
343
+
344
+ _zero2_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
345
+
346
+ # recover shared parameters
347
+ for pair in zero_model_states[0].shared_params:
348
+ if pair[1] in state_dict:
349
+ state_dict[pair[0]] = state_dict[pair[1]]
350
+
351
+ return state_dict
352
+
353
+
354
+ def zero3_partitioned_param_info(unpartitioned_numel, world_size):
355
+ remainder = unpartitioned_numel % world_size
356
+ padding_numel = (world_size - remainder) if remainder else 0
357
+ partitioned_numel = math.ceil(unpartitioned_numel / world_size)
358
+ return partitioned_numel, padding_numel
359
+
360
+
361
+ def _zero3_merge_frozen_params(state_dict, world_size, zero_model_states):
362
+ if zero_model_states[0].frozen_param_shapes is None or len(zero_model_states[0].frozen_param_shapes) == 0:
363
+ return
364
+
365
+ if debug:
366
+ for i in range(world_size):
367
+ num_elem = sum(s.numel() for s in zero_model_states[i].frozen_param_fragments.values())
368
+ print(f'rank {i}: {FROZEN_PARAM_SHAPES}.numel = {num_elem}')
369
+
370
+ frozen_param_shapes = zero_model_states[0].frozen_param_shapes
371
+ wanted_params = len(frozen_param_shapes)
372
+ wanted_numel = sum(s.numel() for s in frozen_param_shapes.values())
373
+ avail_numel = sum([p.numel() for p in zero_model_states[0].frozen_param_fragments.values()]) * world_size
374
+ print(f'Frozen params: Have {avail_numel} numels to process.')
375
+ print(f'Frozen params: Need {wanted_numel} numels in {wanted_params} params')
376
+
377
+ total_params = 0
378
+ total_numel = 0
379
+ for name, shape in zero_model_states[0].frozen_param_shapes.items():
380
+ total_params += 1
381
+ unpartitioned_numel = shape.numel()
382
+ total_numel += unpartitioned_numel
383
+
384
+ param_frags = tuple(model_state.frozen_param_fragments[name] for model_state in zero_model_states)
385
+ state_dict[name] = torch.cat(param_frags, 0).narrow(0, 0, unpartitioned_numel).view(shape)
386
+
387
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
388
+
389
+ if debug:
390
+ print(
391
+ f"Frozen params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
392
+ )
393
+
394
+ print(f"Reconstructed Frozen fp32 state dict with {total_params} params {total_numel} elements")
395
+
396
+
397
+ def _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states):
398
+ param_shapes = zero_model_states[0].param_shapes
399
+ avail_numel = fp32_flat_groups[0].numel() * world_size
400
+ # Reconstruction protocol: For zero3 we need to zip the partitions together at boundary of each
401
+ # param, re-consolidating each param, while dealing with padding if any
402
+
403
+ # merge list of dicts, preserving order
404
+ param_shapes = {k: v for d in param_shapes for k, v in d.items()}
405
+
406
+ if debug:
407
+ for i in range(world_size):
408
+ print(f"{FP32_FLAT_GROUPS}[{i}].shape={fp32_flat_groups[i].shape}")
409
+
410
+ wanted_params = len(param_shapes)
411
+ wanted_numel = sum(shape.numel() for shape in param_shapes.values())
412
+ # not asserting if there is a mismatch due to possible padding
413
+ avail_numel = fp32_flat_groups[0].numel() * world_size
414
+ print(f"Trainable params: Have {avail_numel} numels to process.")
415
+ print(f"Trainable params: Need {wanted_numel} numels in {wanted_params} params.")
416
+
417
+ # params
418
+ # XXX: for huge models that can't fit into the host's RAM we will have to recode this to support
419
+ # out-of-core computing solution
420
+ offset = 0
421
+ total_numel = 0
422
+ total_params = 0
423
+ for name, shape in param_shapes.items():
424
+
425
+ unpartitioned_numel = shape.numel()
426
+ total_numel += unpartitioned_numel
427
+ total_params += 1
428
+
429
+ partitioned_numel, partitioned_padding_numel = zero3_partitioned_param_info(unpartitioned_numel, world_size)
430
+
431
+ if debug:
432
+ print(
433
+ f"Trainable params: {total_params} {name} full shape: {shape} partition0 numel={partitioned_numel} partitioned_padding_numel={partitioned_padding_numel}"
434
+ )
435
+
436
+ # XXX: memory usage doubles here
437
+ state_dict[name] = torch.cat(
438
+ tuple(fp32_flat_groups[i].narrow(0, offset, partitioned_numel) for i in range(world_size)),
439
+ 0).narrow(0, 0, unpartitioned_numel).view(shape)
440
+ offset += partitioned_numel
441
+
442
+ offset *= world_size
443
+
444
+ # Sanity check
445
+ if offset != avail_numel:
446
+ raise ValueError(f"consumed {offset} numels out of {avail_numel} - something is wrong")
447
+
448
+ print(f"Reconstructed Trainable fp32 state dict with {total_params} params {total_numel} elements")
449
+
450
+
451
+ def _get_fp32_state_dict_from_zero3_checkpoint(world_size, fp32_flat_groups, zero_model_states,
452
+ exclude_frozen_parameters):
453
+ state_dict = OrderedDict()
454
+
455
+ # buffers
456
+ buffers = zero_model_states[0].buffers
457
+ state_dict.update(buffers)
458
+ if debug:
459
+ print(f"added {len(buffers)} buffers")
460
+
461
+ if not exclude_frozen_parameters:
462
+ _zero3_merge_frozen_params(state_dict, world_size, zero_model_states)
463
+
464
+ _zero3_merge_trainable_params(state_dict, world_size, fp32_flat_groups, zero_model_states)
465
+
466
+ # recover shared parameters
467
+ for pair in zero_model_states[0].shared_params:
468
+ if pair[1] in state_dict:
469
+ state_dict[pair[0]] = state_dict[pair[1]]
470
+
471
+ return state_dict
472
+
473
+
474
+ def get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag=None, exclude_frozen_parameters=False):
475
+ """
476
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated state_dict that can be loaded with
477
+ ``load_state_dict()`` and used for training without DeepSpeed or shared with others, for example
478
+ via a model hub.
479
+
480
+ Args:
481
+ - ``checkpoint_dir``: path to the desired checkpoint folder
482
+ - ``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``
483
+ - ``exclude_frozen_parameters``: exclude frozen parameters
484
+
485
+ Returns:
486
+ - pytorch ``state_dict``
487
+
488
+ Note: this approach may not work if your application doesn't have sufficient free CPU memory and
489
+ you may need to use the offline approach using the ``zero_to_fp32.py`` script that is saved with
490
+ the checkpoint.
491
+
492
+ A typical usage might be ::
493
+
494
+ from deepspeed.utils.zero_to_fp32 import get_fp32_state_dict_from_zero_checkpoint
495
+ # do the training and checkpoint saving
496
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir) # already on cpu
497
+ model = model.cpu() # move to cpu
498
+ model.load_state_dict(state_dict)
499
+ # submit to model hub or save the model to share with others
500
+
501
+ In this example the ``model`` will no longer be usable in the deepspeed context of the same
502
+ application. i.e. you will need to re-initialize the deepspeed engine, since
503
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
504
+
505
+ If you want it all done for you, use ``load_state_dict_from_zero_checkpoint`` instead.
506
+
507
+ """
508
+ if tag is None:
509
+ latest_path = os.path.join(checkpoint_dir, 'latest')
510
+ if os.path.isfile(latest_path):
511
+ with open(latest_path, 'r') as fd:
512
+ tag = fd.read().strip()
513
+ else:
514
+ raise ValueError(f"Unable to find 'latest' file at {latest_path}")
515
+
516
+ ds_checkpoint_dir = os.path.join(checkpoint_dir, tag)
517
+
518
+ if not os.path.isdir(ds_checkpoint_dir):
519
+ raise FileNotFoundError(f"Directory '{ds_checkpoint_dir}' doesn't exist")
520
+
521
+ return _get_fp32_state_dict_from_zero_checkpoint(ds_checkpoint_dir, exclude_frozen_parameters)
522
+
523
+
524
+ def convert_zero_checkpoint_to_fp32_state_dict(checkpoint_dir, output_file, tag=None, exclude_frozen_parameters=False):
525
+ """
526
+ Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict`` file that can be
527
+ loaded with ``torch.load(file)`` + ``load_state_dict()`` and used for training without DeepSpeed.
528
+
529
+ Args:
530
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
531
+ - ``output_file``: path to the pytorch fp32 state_dict output file (e.g. path/pytorch_model.bin)
532
+ - ``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``
533
+ - ``exclude_frozen_parameters``: exclude frozen parameters
534
+ """
535
+
536
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag, exclude_frozen_parameters)
537
+ print(f"Saving fp32 state dict to {output_file}")
538
+ torch.save(state_dict, output_file)
539
+
540
+
541
+ def load_state_dict_from_zero_checkpoint(model, checkpoint_dir, tag=None):
542
+ """
543
+ 1. Put the provided model to cpu
544
+ 2. Convert ZeRO 2 or 3 checkpoint into a single fp32 consolidated ``state_dict``
545
+ 3. Load it into the provided model
546
+
547
+ Args:
548
+ - ``model``: the model object to update
549
+ - ``checkpoint_dir``: path to the desired checkpoint folder. (one that contains the tag-folder, like ``global_step14``)
550
+ - ``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``
551
+
552
+ Returns:
553
+ - ``model`: modified model
554
+
555
+ Make sure you have plenty of CPU memory available before you call this function. If you don't
556
+ have enough use the ``zero_to_fp32.py`` utility to do the conversion. You will find it
557
+ conveniently placed for you in the checkpoint folder.
558
+
559
+ A typical usage might be ::
560
+
561
+ from deepspeed.utils.zero_to_fp32 import load_state_dict_from_zero_checkpoint
562
+ model = load_state_dict_from_zero_checkpoint(trainer.model, checkpoint_dir)
563
+ # submit to model hub or save the model to share with others
564
+
565
+ Note, that once this was run, the ``model`` will no longer be usable in the deepspeed context
566
+ of the same application. i.e. you will need to re-initialize the deepspeed engine, since
567
+ ``model.load_state_dict(state_dict)`` will remove all the deepspeed magic from it.
568
+
569
+ """
570
+ logger.info(f"Extracting fp32 weights")
571
+ state_dict = get_fp32_state_dict_from_zero_checkpoint(checkpoint_dir, tag)
572
+
573
+ logger.info(f"Overwriting model with fp32 weights")
574
+ model = model.cpu()
575
+ model.load_state_dict(state_dict, strict=False)
576
+
577
+ return model
578
+
579
+
580
+ if __name__ == "__main__":
581
+
582
+ parser = argparse.ArgumentParser()
583
+ parser.add_argument("checkpoint_dir",
584
+ type=str,
585
+ help="path to the desired checkpoint folder, e.g., path/checkpoint-12")
586
+ parser.add_argument(
587
+ "output_file",
588
+ type=str,
589
+ help="path to the pytorch fp32 state_dict output file (e.g. path/checkpoint-12/pytorch_model.bin)")
590
+ parser.add_argument("-t",
591
+ "--tag",
592
+ type=str,
593
+ default=None,
594
+ help="checkpoint tag used as a unique identifier for checkpoint. e.g., global_step1")
595
+ parser.add_argument("--exclude_frozen_parameters", action='store_true', help="exclude frozen parameters")
596
+ parser.add_argument("-d", "--debug", action='store_true', help="enable debug")
597
+ args = parser.parse_args()
598
+
599
+ debug = args.debug
600
+
601
+ convert_zero_checkpoint_to_fp32_state_dict(args.checkpoint_dir,
602
+ args.output_file,
603
+ tag=args.tag,
604
+ exclude_frozen_parameters=args.exclude_frozen_parameters)
Qwen/Qwen1.5_1.8B_ledgar/config.json ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Qwen/Qwen1.5-1.8B",
3
+ "architectures": [
4
+ "Qwen2ForSequenceClassification"
5
+ ],
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "eos_token_id": 151643,
9
+ "finetuning_task": "text-classification",
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "id2label": {
13
+ "0": "0",
14
+ "1": "1",
15
+ "2": "10",
16
+ "3": "11",
17
+ "4": "12",
18
+ "5": "13",
19
+ "6": "14",
20
+ "7": "15",
21
+ "8": "16",
22
+ "9": "17",
23
+ "10": "18",
24
+ "11": "19",
25
+ "12": "2",
26
+ "13": "20",
27
+ "14": "21",
28
+ "15": "22",
29
+ "16": "23",
30
+ "17": "24",
31
+ "18": "25",
32
+ "19": "26",
33
+ "20": "27",
34
+ "21": "28",
35
+ "22": "29",
36
+ "23": "3",
37
+ "24": "30",
38
+ "25": "31",
39
+ "26": "32",
40
+ "27": "33",
41
+ "28": "34",
42
+ "29": "35",
43
+ "30": "36",
44
+ "31": "37",
45
+ "32": "38",
46
+ "33": "39",
47
+ "34": "4",
48
+ "35": "40",
49
+ "36": "41",
50
+ "37": "42",
51
+ "38": "43",
52
+ "39": "44",
53
+ "40": "45",
54
+ "41": "46",
55
+ "42": "47",
56
+ "43": "48",
57
+ "44": "49",
58
+ "45": "5",
59
+ "46": "50",
60
+ "47": "51",
61
+ "48": "52",
62
+ "49": "53",
63
+ "50": "54",
64
+ "51": "55",
65
+ "52": "56",
66
+ "53": "57",
67
+ "54": "58",
68
+ "55": "59",
69
+ "56": "6",
70
+ "57": "60",
71
+ "58": "61",
72
+ "59": "62",
73
+ "60": "63",
74
+ "61": "64",
75
+ "62": "65",
76
+ "63": "66",
77
+ "64": "67",
78
+ "65": "68",
79
+ "66": "69",
80
+ "67": "7",
81
+ "68": "70",
82
+ "69": "71",
83
+ "70": "72",
84
+ "71": "73",
85
+ "72": "74",
86
+ "73": "75",
87
+ "74": "76",
88
+ "75": "77",
89
+ "76": "78",
90
+ "77": "79",
91
+ "78": "8",
92
+ "79": "80",
93
+ "80": "81",
94
+ "81": "82",
95
+ "82": "83",
96
+ "83": "84",
97
+ "84": "85",
98
+ "85": "86",
99
+ "86": "87",
100
+ "87": "88",
101
+ "88": "89",
102
+ "89": "9",
103
+ "90": "90",
104
+ "91": "91",
105
+ "92": "92",
106
+ "93": "93",
107
+ "94": "94",
108
+ "95": "95",
109
+ "96": "96",
110
+ "97": "97",
111
+ "98": "98",
112
+ "99": "99"
113
+ },
114
+ "initializer_range": 0.02,
115
+ "intermediate_size": 5504,
116
+ "label2id": {
117
+ "0": 0,
118
+ "1": 1,
119
+ "10": 2,
120
+ "11": 3,
121
+ "12": 4,
122
+ "13": 5,
123
+ "14": 6,
124
+ "15": 7,
125
+ "16": 8,
126
+ "17": 9,
127
+ "18": 10,
128
+ "19": 11,
129
+ "2": 12,
130
+ "20": 13,
131
+ "21": 14,
132
+ "22": 15,
133
+ "23": 16,
134
+ "24": 17,
135
+ "25": 18,
136
+ "26": 19,
137
+ "27": 20,
138
+ "28": 21,
139
+ "29": 22,
140
+ "3": 23,
141
+ "30": 24,
142
+ "31": 25,
143
+ "32": 26,
144
+ "33": 27,
145
+ "34": 28,
146
+ "35": 29,
147
+ "36": 30,
148
+ "37": 31,
149
+ "38": 32,
150
+ "39": 33,
151
+ "4": 34,
152
+ "40": 35,
153
+ "41": 36,
154
+ "42": 37,
155
+ "43": 38,
156
+ "44": 39,
157
+ "45": 40,
158
+ "46": 41,
159
+ "47": 42,
160
+ "48": 43,
161
+ "49": 44,
162
+ "5": 45,
163
+ "50": 46,
164
+ "51": 47,
165
+ "52": 48,
166
+ "53": 49,
167
+ "54": 50,
168
+ "55": 51,
169
+ "56": 52,
170
+ "57": 53,
171
+ "58": 54,
172
+ "59": 55,
173
+ "6": 56,
174
+ "60": 57,
175
+ "61": 58,
176
+ "62": 59,
177
+ "63": 60,
178
+ "64": 61,
179
+ "65": 62,
180
+ "66": 63,
181
+ "67": 64,
182
+ "68": 65,
183
+ "69": 66,
184
+ "7": 67,
185
+ "70": 68,
186
+ "71": 69,
187
+ "72": 70,
188
+ "73": 71,
189
+ "74": 72,
190
+ "75": 73,
191
+ "76": 74,
192
+ "77": 75,
193
+ "78": 76,
194
+ "79": 77,
195
+ "8": 78,
196
+ "80": 79,
197
+ "81": 80,
198
+ "82": 81,
199
+ "83": 82,
200
+ "84": 83,
201
+ "85": 84,
202
+ "86": 85,
203
+ "87": 86,
204
+ "88": 87,
205
+ "89": 88,
206
+ "9": 89,
207
+ "90": 90,
208
+ "91": 91,
209
+ "92": 92,
210
+ "93": 93,
211
+ "94": 94,
212
+ "95": 95,
213
+ "96": 96,
214
+ "97": 97,
215
+ "98": 98,
216
+ "99": 99
217
+ },
218
+ "max_position_embeddings": 32768,
219
+ "max_window_layers": 21,
220
+ "model_type": "qwen2",
221
+ "num_attention_heads": 16,
222
+ "num_hidden_layers": 24,
223
+ "num_key_value_heads": 16,
224
+ "pad_token_id": 151643,
225
+ "problem_type": "single_label_classification",
226
+ "rms_norm_eps": 1e-06,
227
+ "rope_theta": 1000000.0,
228
+ "sliding_window": 32768,
229
+ "tie_word_embeddings": false,
230
+ "torch_dtype": "bfloat16",
231
+ "transformers_version": "4.39.0.dev0",
232
+ "use_cache": true,
233
+ "use_sliding_window": false,
234
+ "vocab_size": 151646
235
+ }
Qwen/Qwen1.5_1.8B_ledgar/eval_results.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "eval_accuracy": 0.8669,
4
+ "eval_f1_macro": 0.7902403947168268,
5
+ "eval_f1_micro": 0.8669,
6
+ "eval_loss": 0.5063937306404114,
7
+ "eval_runtime": 24.4305,
8
+ "eval_samples": 10000,
9
+ "eval_samples_per_second": 409.324,
10
+ "eval_steps_per_second": 6.426
11
+ }
Qwen/Qwen1.5_1.8B_ledgar/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
Qwen/Qwen1.5_1.8B_ledgar/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6be1da9a3d742bcd4f56af0dd627ec82b2b529a0f3a3259561a3da60f4f2dffc
3
+ size 3050582504
Qwen/Qwen1.5_1.8B_ledgar/run.log ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ 03/16/2024 00:29:25 - WARNING - __main__ - Process rank: 0, device: cuda:0, n_gpu: 1, distributed training: True, 16-bits training: False
2
+ 03/16/2024 00:29:26 - WARNING - __main__ - Process rank: 1, device: cuda:1, n_gpu: 1, distributed training: True, 16-bits training: False
3
+ 03/16/2024 00:29:35 - WARNING - __main__ - The label2id key in the model config.json is not equal to the label2id key of this run. You can ignore this if you are doing finetuning.
4
+ 03/16/2024 00:29:36 - WARNING - __main__ - The label2id key in the model config.json is not equal to the label2id key of this run. You can ignore this if you are doing finetuning.
Qwen/Qwen1.5_1.8B_ledgar/special_tokens_map.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|endoftext|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": "<|endoftext|>"
14
+ }
Qwen/Qwen1.5_1.8B_ledgar/test_results.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "test_accuracy": 0.8664,
4
+ "test_f1_macro": 0.7974226514742132,
5
+ "test_f1_micro": 0.8664,
6
+ "test_loss": 0.532435953617096,
7
+ "test_runtime": 25.4113,
8
+ "test_samples_per_second": 393.525,
9
+ "test_steps_per_second": 6.178
10
+ }
Qwen/Qwen1.5_1.8B_ledgar/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
Qwen/Qwen1.5_1.8B_ledgar/tokenizer_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
35
+ "clean_up_tokenization_spaces": false,
36
+ "eos_token": "<|endoftext|>",
37
+ "errors": "replace",
38
+ "model_max_length": 32768,
39
+ "pad_token": "<|endoftext|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }
Qwen/Qwen1.5_1.8B_ledgar/train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 3.0,
3
+ "train_loss": 0.42635450247932005,
4
+ "train_runtime": 3623.2348,
5
+ "train_samples": 60000,
6
+ "train_samples_per_second": 49.679,
7
+ "train_steps_per_second": 0.777
8
+ }
Qwen/Qwen1.5_1.8B_ledgar/trainer_state.json ADDED
@@ -0,0 +1,1122 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.5063937306404114,
3
+ "best_model_checkpoint": "../../experiments_checkpoints/MAdAiLab/Qwen/Qwen1.5_1.8B_ledgar/checkpoint-1800",
4
+ "epoch": 3.0,
5
+ "eval_steps": 100,
6
+ "global_step": 2814,
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.03,
13
+ "grad_norm": 80.4836196899414,
14
+ "learning_rate": 4.9555792466240235e-06,
15
+ "loss": 7.9887,
16
+ "step": 25
17
+ },
18
+ {
19
+ "epoch": 0.05,
20
+ "grad_norm": 60.927364349365234,
21
+ "learning_rate": 4.911158493248046e-06,
22
+ "loss": 3.1908,
23
+ "step": 50
24
+ },
25
+ {
26
+ "epoch": 0.08,
27
+ "grad_norm": 49.68091583251953,
28
+ "learning_rate": 4.866737739872069e-06,
29
+ "loss": 1.7183,
30
+ "step": 75
31
+ },
32
+ {
33
+ "epoch": 0.11,
34
+ "grad_norm": 55.176666259765625,
35
+ "learning_rate": 4.822316986496091e-06,
36
+ "loss": 1.3077,
37
+ "step": 100
38
+ },
39
+ {
40
+ "epoch": 0.11,
41
+ "eval_accuracy": 0.7277,
42
+ "eval_f1_macro": 0.5770831474844406,
43
+ "eval_f1_micro": 0.7277,
44
+ "eval_loss": 1.0944937467575073,
45
+ "eval_runtime": 25.447,
46
+ "eval_samples_per_second": 392.973,
47
+ "eval_steps_per_second": 6.17,
48
+ "step": 100
49
+ },
50
+ {
51
+ "epoch": 0.13,
52
+ "grad_norm": 46.64506530761719,
53
+ "learning_rate": 4.777896233120114e-06,
54
+ "loss": 1.1393,
55
+ "step": 125
56
+ },
57
+ {
58
+ "epoch": 0.16,
59
+ "grad_norm": 41.11891174316406,
60
+ "learning_rate": 4.733475479744136e-06,
61
+ "loss": 1.0243,
62
+ "step": 150
63
+ },
64
+ {
65
+ "epoch": 0.19,
66
+ "grad_norm": 34.20009994506836,
67
+ "learning_rate": 4.6890547263681595e-06,
68
+ "loss": 0.9005,
69
+ "step": 175
70
+ },
71
+ {
72
+ "epoch": 0.21,
73
+ "grad_norm": 38.80377197265625,
74
+ "learning_rate": 4.644633972992183e-06,
75
+ "loss": 0.8627,
76
+ "step": 200
77
+ },
78
+ {
79
+ "epoch": 0.21,
80
+ "eval_accuracy": 0.7907,
81
+ "eval_f1_macro": 0.6657039157603262,
82
+ "eval_f1_micro": 0.7907,
83
+ "eval_loss": 0.8368468880653381,
84
+ "eval_runtime": 25.9484,
85
+ "eval_samples_per_second": 385.38,
86
+ "eval_steps_per_second": 6.05,
87
+ "step": 200
88
+ },
89
+ {
90
+ "epoch": 0.24,
91
+ "grad_norm": 34.973506927490234,
92
+ "learning_rate": 4.600213219616206e-06,
93
+ "loss": 0.7896,
94
+ "step": 225
95
+ },
96
+ {
97
+ "epoch": 0.27,
98
+ "grad_norm": 29.98388671875,
99
+ "learning_rate": 4.555792466240228e-06,
100
+ "loss": 0.8307,
101
+ "step": 250
102
+ },
103
+ {
104
+ "epoch": 0.29,
105
+ "grad_norm": 27.09973907470703,
106
+ "learning_rate": 4.51137171286425e-06,
107
+ "loss": 0.7846,
108
+ "step": 275
109
+ },
110
+ {
111
+ "epoch": 0.32,
112
+ "grad_norm": 36.151161193847656,
113
+ "learning_rate": 4.466950959488273e-06,
114
+ "loss": 0.7179,
115
+ "step": 300
116
+ },
117
+ {
118
+ "epoch": 0.32,
119
+ "eval_accuracy": 0.7971,
120
+ "eval_f1_macro": 0.6861778340669753,
121
+ "eval_f1_micro": 0.7971,
122
+ "eval_loss": 0.7824062705039978,
123
+ "eval_runtime": 25.9003,
124
+ "eval_samples_per_second": 386.095,
125
+ "eval_steps_per_second": 6.062,
126
+ "step": 300
127
+ },
128
+ {
129
+ "epoch": 0.35,
130
+ "grad_norm": 33.09822463989258,
131
+ "learning_rate": 4.422530206112296e-06,
132
+ "loss": 0.7133,
133
+ "step": 325
134
+ },
135
+ {
136
+ "epoch": 0.37,
137
+ "grad_norm": 35.52923583984375,
138
+ "learning_rate": 4.378109452736319e-06,
139
+ "loss": 0.7354,
140
+ "step": 350
141
+ },
142
+ {
143
+ "epoch": 0.4,
144
+ "grad_norm": 39.79545211791992,
145
+ "learning_rate": 4.333688699360342e-06,
146
+ "loss": 0.6619,
147
+ "step": 375
148
+ },
149
+ {
150
+ "epoch": 0.43,
151
+ "grad_norm": 30.13161849975586,
152
+ "learning_rate": 4.289267945984365e-06,
153
+ "loss": 0.6961,
154
+ "step": 400
155
+ },
156
+ {
157
+ "epoch": 0.43,
158
+ "eval_accuracy": 0.8138,
159
+ "eval_f1_macro": 0.6992465625213966,
160
+ "eval_f1_micro": 0.8138,
161
+ "eval_loss": 0.6951531171798706,
162
+ "eval_runtime": 25.6082,
163
+ "eval_samples_per_second": 390.5,
164
+ "eval_steps_per_second": 6.131,
165
+ "step": 400
166
+ },
167
+ {
168
+ "epoch": 0.45,
169
+ "grad_norm": 27.575519561767578,
170
+ "learning_rate": 4.244847192608387e-06,
171
+ "loss": 0.7162,
172
+ "step": 425
173
+ },
174
+ {
175
+ "epoch": 0.48,
176
+ "grad_norm": 35.084754943847656,
177
+ "learning_rate": 4.200426439232409e-06,
178
+ "loss": 0.7722,
179
+ "step": 450
180
+ },
181
+ {
182
+ "epoch": 0.51,
183
+ "grad_norm": 28.47511863708496,
184
+ "learning_rate": 4.156005685856432e-06,
185
+ "loss": 0.6866,
186
+ "step": 475
187
+ },
188
+ {
189
+ "epoch": 0.53,
190
+ "grad_norm": 32.34709548950195,
191
+ "learning_rate": 4.1115849324804554e-06,
192
+ "loss": 0.745,
193
+ "step": 500
194
+ },
195
+ {
196
+ "epoch": 0.53,
197
+ "eval_accuracy": 0.8121,
198
+ "eval_f1_macro": 0.7033560293953169,
199
+ "eval_f1_micro": 0.8121,
200
+ "eval_loss": 0.6718780994415283,
201
+ "eval_runtime": 25.9161,
202
+ "eval_samples_per_second": 385.86,
203
+ "eval_steps_per_second": 6.058,
204
+ "step": 500
205
+ },
206
+ {
207
+ "epoch": 0.56,
208
+ "grad_norm": 25.5845890045166,
209
+ "learning_rate": 4.067164179104478e-06,
210
+ "loss": 0.6535,
211
+ "step": 525
212
+ },
213
+ {
214
+ "epoch": 0.59,
215
+ "grad_norm": 22.466503143310547,
216
+ "learning_rate": 4.022743425728501e-06,
217
+ "loss": 0.5969,
218
+ "step": 550
219
+ },
220
+ {
221
+ "epoch": 0.61,
222
+ "grad_norm": 27.53134536743164,
223
+ "learning_rate": 3.978322672352524e-06,
224
+ "loss": 0.5926,
225
+ "step": 575
226
+ },
227
+ {
228
+ "epoch": 0.64,
229
+ "grad_norm": 31.356454849243164,
230
+ "learning_rate": 3.933901918976546e-06,
231
+ "loss": 0.6505,
232
+ "step": 600
233
+ },
234
+ {
235
+ "epoch": 0.64,
236
+ "eval_accuracy": 0.834,
237
+ "eval_f1_macro": 0.7469091035082649,
238
+ "eval_f1_micro": 0.834,
239
+ "eval_loss": 0.6219750046730042,
240
+ "eval_runtime": 25.9316,
241
+ "eval_samples_per_second": 385.63,
242
+ "eval_steps_per_second": 6.054,
243
+ "step": 600
244
+ },
245
+ {
246
+ "epoch": 0.67,
247
+ "grad_norm": 37.17654800415039,
248
+ "learning_rate": 3.889481165600569e-06,
249
+ "loss": 0.6171,
250
+ "step": 625
251
+ },
252
+ {
253
+ "epoch": 0.69,
254
+ "grad_norm": 26.71038055419922,
255
+ "learning_rate": 3.8450604122245914e-06,
256
+ "loss": 0.6218,
257
+ "step": 650
258
+ },
259
+ {
260
+ "epoch": 0.72,
261
+ "grad_norm": 27.787952423095703,
262
+ "learning_rate": 3.8006396588486145e-06,
263
+ "loss": 0.6124,
264
+ "step": 675
265
+ },
266
+ {
267
+ "epoch": 0.75,
268
+ "grad_norm": 30.405912399291992,
269
+ "learning_rate": 3.756218905472637e-06,
270
+ "loss": 0.5914,
271
+ "step": 700
272
+ },
273
+ {
274
+ "epoch": 0.75,
275
+ "eval_accuracy": 0.8362,
276
+ "eval_f1_macro": 0.7410957777496914,
277
+ "eval_f1_micro": 0.8362,
278
+ "eval_loss": 0.6109625101089478,
279
+ "eval_runtime": 25.6247,
280
+ "eval_samples_per_second": 390.248,
281
+ "eval_steps_per_second": 6.127,
282
+ "step": 700
283
+ },
284
+ {
285
+ "epoch": 0.77,
286
+ "grad_norm": 30.52012062072754,
287
+ "learning_rate": 3.71179815209666e-06,
288
+ "loss": 0.5711,
289
+ "step": 725
290
+ },
291
+ {
292
+ "epoch": 0.8,
293
+ "grad_norm": 30.88004493713379,
294
+ "learning_rate": 3.667377398720683e-06,
295
+ "loss": 0.6695,
296
+ "step": 750
297
+ },
298
+ {
299
+ "epoch": 0.83,
300
+ "grad_norm": 22.504459381103516,
301
+ "learning_rate": 3.622956645344705e-06,
302
+ "loss": 0.5731,
303
+ "step": 775
304
+ },
305
+ {
306
+ "epoch": 0.85,
307
+ "grad_norm": 21.515512466430664,
308
+ "learning_rate": 3.578535891968728e-06,
309
+ "loss": 0.5837,
310
+ "step": 800
311
+ },
312
+ {
313
+ "epoch": 0.85,
314
+ "eval_accuracy": 0.8385,
315
+ "eval_f1_macro": 0.7413235492734335,
316
+ "eval_f1_micro": 0.8385,
317
+ "eval_loss": 0.5766780972480774,
318
+ "eval_runtime": 25.6608,
319
+ "eval_samples_per_second": 389.7,
320
+ "eval_steps_per_second": 6.118,
321
+ "step": 800
322
+ },
323
+ {
324
+ "epoch": 0.88,
325
+ "grad_norm": 30.9660587310791,
326
+ "learning_rate": 3.534115138592751e-06,
327
+ "loss": 0.6085,
328
+ "step": 825
329
+ },
330
+ {
331
+ "epoch": 0.91,
332
+ "grad_norm": 18.883647918701172,
333
+ "learning_rate": 3.4896943852167736e-06,
334
+ "loss": 0.5121,
335
+ "step": 850
336
+ },
337
+ {
338
+ "epoch": 0.93,
339
+ "grad_norm": 24.548561096191406,
340
+ "learning_rate": 3.4452736318407963e-06,
341
+ "loss": 0.5621,
342
+ "step": 875
343
+ },
344
+ {
345
+ "epoch": 0.96,
346
+ "grad_norm": 29.833791732788086,
347
+ "learning_rate": 3.4008528784648194e-06,
348
+ "loss": 0.5218,
349
+ "step": 900
350
+ },
351
+ {
352
+ "epoch": 0.96,
353
+ "eval_accuracy": 0.849,
354
+ "eval_f1_macro": 0.7702797685808792,
355
+ "eval_f1_micro": 0.849,
356
+ "eval_loss": 0.5365203022956848,
357
+ "eval_runtime": 25.9091,
358
+ "eval_samples_per_second": 385.964,
359
+ "eval_steps_per_second": 6.06,
360
+ "step": 900
361
+ },
362
+ {
363
+ "epoch": 0.99,
364
+ "grad_norm": 27.948928833007812,
365
+ "learning_rate": 3.3564321250888416e-06,
366
+ "loss": 0.5681,
367
+ "step": 925
368
+ },
369
+ {
370
+ "epoch": 1.01,
371
+ "grad_norm": 19.800880432128906,
372
+ "learning_rate": 3.3120113717128643e-06,
373
+ "loss": 0.4014,
374
+ "step": 950
375
+ },
376
+ {
377
+ "epoch": 1.04,
378
+ "grad_norm": 19.333465576171875,
379
+ "learning_rate": 3.2675906183368874e-06,
380
+ "loss": 0.2795,
381
+ "step": 975
382
+ },
383
+ {
384
+ "epoch": 1.07,
385
+ "grad_norm": 22.315195083618164,
386
+ "learning_rate": 3.22316986496091e-06,
387
+ "loss": 0.2632,
388
+ "step": 1000
389
+ },
390
+ {
391
+ "epoch": 1.07,
392
+ "eval_accuracy": 0.8562,
393
+ "eval_f1_macro": 0.7683569808757446,
394
+ "eval_f1_micro": 0.8562,
395
+ "eval_loss": 0.5503664016723633,
396
+ "eval_runtime": 25.5198,
397
+ "eval_samples_per_second": 391.852,
398
+ "eval_steps_per_second": 6.152,
399
+ "step": 1000
400
+ },
401
+ {
402
+ "epoch": 1.09,
403
+ "grad_norm": 24.819501876831055,
404
+ "learning_rate": 3.1787491115849327e-06,
405
+ "loss": 0.2532,
406
+ "step": 1025
407
+ },
408
+ {
409
+ "epoch": 1.12,
410
+ "grad_norm": 21.534936904907227,
411
+ "learning_rate": 3.1343283582089558e-06,
412
+ "loss": 0.2311,
413
+ "step": 1050
414
+ },
415
+ {
416
+ "epoch": 1.15,
417
+ "grad_norm": 24.088809967041016,
418
+ "learning_rate": 3.0899076048329785e-06,
419
+ "loss": 0.3134,
420
+ "step": 1075
421
+ },
422
+ {
423
+ "epoch": 1.17,
424
+ "grad_norm": 27.605493545532227,
425
+ "learning_rate": 3.0454868514570007e-06,
426
+ "loss": 0.2607,
427
+ "step": 1100
428
+ },
429
+ {
430
+ "epoch": 1.17,
431
+ "eval_accuracy": 0.8525,
432
+ "eval_f1_macro": 0.7656891626030512,
433
+ "eval_f1_micro": 0.8525,
434
+ "eval_loss": 0.5496523380279541,
435
+ "eval_runtime": 25.7081,
436
+ "eval_samples_per_second": 388.982,
437
+ "eval_steps_per_second": 6.107,
438
+ "step": 1100
439
+ },
440
+ {
441
+ "epoch": 1.2,
442
+ "grad_norm": 22.955158233642578,
443
+ "learning_rate": 3.0010660980810234e-06,
444
+ "loss": 0.2674,
445
+ "step": 1125
446
+ },
447
+ {
448
+ "epoch": 1.23,
449
+ "grad_norm": 19.089893341064453,
450
+ "learning_rate": 2.9566453447050464e-06,
451
+ "loss": 0.2074,
452
+ "step": 1150
453
+ },
454
+ {
455
+ "epoch": 1.25,
456
+ "grad_norm": 19.285688400268555,
457
+ "learning_rate": 2.912224591329069e-06,
458
+ "loss": 0.2488,
459
+ "step": 1175
460
+ },
461
+ {
462
+ "epoch": 1.28,
463
+ "grad_norm": 23.45233726501465,
464
+ "learning_rate": 2.867803837953092e-06,
465
+ "loss": 0.274,
466
+ "step": 1200
467
+ },
468
+ {
469
+ "epoch": 1.28,
470
+ "eval_accuracy": 0.8584,
471
+ "eval_f1_macro": 0.7746299057445165,
472
+ "eval_f1_micro": 0.8584,
473
+ "eval_loss": 0.5439000129699707,
474
+ "eval_runtime": 25.9014,
475
+ "eval_samples_per_second": 386.079,
476
+ "eval_steps_per_second": 6.061,
477
+ "step": 1200
478
+ },
479
+ {
480
+ "epoch": 1.31,
481
+ "grad_norm": 31.231454849243164,
482
+ "learning_rate": 2.823383084577115e-06,
483
+ "loss": 0.2624,
484
+ "step": 1225
485
+ },
486
+ {
487
+ "epoch": 1.33,
488
+ "grad_norm": 28.1010799407959,
489
+ "learning_rate": 2.7789623312011375e-06,
490
+ "loss": 0.2992,
491
+ "step": 1250
492
+ },
493
+ {
494
+ "epoch": 1.36,
495
+ "grad_norm": 30.002384185791016,
496
+ "learning_rate": 2.7345415778251598e-06,
497
+ "loss": 0.2589,
498
+ "step": 1275
499
+ },
500
+ {
501
+ "epoch": 1.39,
502
+ "grad_norm": 23.61323356628418,
503
+ "learning_rate": 2.690120824449183e-06,
504
+ "loss": 0.2216,
505
+ "step": 1300
506
+ },
507
+ {
508
+ "epoch": 1.39,
509
+ "eval_accuracy": 0.8563,
510
+ "eval_f1_macro": 0.7753520513346309,
511
+ "eval_f1_micro": 0.8563,
512
+ "eval_loss": 0.5687375068664551,
513
+ "eval_runtime": 25.9424,
514
+ "eval_samples_per_second": 385.47,
515
+ "eval_steps_per_second": 6.052,
516
+ "step": 1300
517
+ },
518
+ {
519
+ "epoch": 1.41,
520
+ "grad_norm": 27.56183433532715,
521
+ "learning_rate": 2.6457000710732055e-06,
522
+ "loss": 0.2845,
523
+ "step": 1325
524
+ },
525
+ {
526
+ "epoch": 1.44,
527
+ "grad_norm": 18.88576316833496,
528
+ "learning_rate": 2.601279317697228e-06,
529
+ "loss": 0.2685,
530
+ "step": 1350
531
+ },
532
+ {
533
+ "epoch": 1.47,
534
+ "grad_norm": 19.662220001220703,
535
+ "learning_rate": 2.5568585643212513e-06,
536
+ "loss": 0.2489,
537
+ "step": 1375
538
+ },
539
+ {
540
+ "epoch": 1.49,
541
+ "grad_norm": 22.736656188964844,
542
+ "learning_rate": 2.512437810945274e-06,
543
+ "loss": 0.2044,
544
+ "step": 1400
545
+ },
546
+ {
547
+ "epoch": 1.49,
548
+ "eval_accuracy": 0.861,
549
+ "eval_f1_macro": 0.7820141563614671,
550
+ "eval_f1_micro": 0.861,
551
+ "eval_loss": 0.5385035276412964,
552
+ "eval_runtime": 25.6666,
553
+ "eval_samples_per_second": 389.612,
554
+ "eval_steps_per_second": 6.117,
555
+ "step": 1400
556
+ },
557
+ {
558
+ "epoch": 1.52,
559
+ "grad_norm": 24.569435119628906,
560
+ "learning_rate": 2.4680170575692966e-06,
561
+ "loss": 0.2388,
562
+ "step": 1425
563
+ },
564
+ {
565
+ "epoch": 1.55,
566
+ "grad_norm": 17.50179100036621,
567
+ "learning_rate": 2.4235963041933193e-06,
568
+ "loss": 0.2556,
569
+ "step": 1450
570
+ },
571
+ {
572
+ "epoch": 1.57,
573
+ "grad_norm": 15.387917518615723,
574
+ "learning_rate": 2.379175550817342e-06,
575
+ "loss": 0.2343,
576
+ "step": 1475
577
+ },
578
+ {
579
+ "epoch": 1.6,
580
+ "grad_norm": 29.757495880126953,
581
+ "learning_rate": 2.3347547974413646e-06,
582
+ "loss": 0.2508,
583
+ "step": 1500
584
+ },
585
+ {
586
+ "epoch": 1.6,
587
+ "eval_accuracy": 0.8577,
588
+ "eval_f1_macro": 0.7710712973870113,
589
+ "eval_f1_micro": 0.8577,
590
+ "eval_loss": 0.5657808780670166,
591
+ "eval_runtime": 25.9754,
592
+ "eval_samples_per_second": 384.98,
593
+ "eval_steps_per_second": 6.044,
594
+ "step": 1500
595
+ },
596
+ {
597
+ "epoch": 1.63,
598
+ "grad_norm": 24.104217529296875,
599
+ "learning_rate": 2.2903340440653877e-06,
600
+ "loss": 0.2647,
601
+ "step": 1525
602
+ },
603
+ {
604
+ "epoch": 1.65,
605
+ "grad_norm": 29.48048973083496,
606
+ "learning_rate": 2.24591329068941e-06,
607
+ "loss": 0.212,
608
+ "step": 1550
609
+ },
610
+ {
611
+ "epoch": 1.68,
612
+ "grad_norm": 11.834880828857422,
613
+ "learning_rate": 2.201492537313433e-06,
614
+ "loss": 0.1939,
615
+ "step": 1575
616
+ },
617
+ {
618
+ "epoch": 1.71,
619
+ "grad_norm": 24.24506378173828,
620
+ "learning_rate": 2.1570717839374557e-06,
621
+ "loss": 0.2513,
622
+ "step": 1600
623
+ },
624
+ {
625
+ "epoch": 1.71,
626
+ "eval_accuracy": 0.8589,
627
+ "eval_f1_macro": 0.7871987440671023,
628
+ "eval_f1_micro": 0.8589,
629
+ "eval_loss": 0.5366827845573425,
630
+ "eval_runtime": 25.9643,
631
+ "eval_samples_per_second": 385.144,
632
+ "eval_steps_per_second": 6.047,
633
+ "step": 1600
634
+ },
635
+ {
636
+ "epoch": 1.73,
637
+ "grad_norm": 23.33180046081543,
638
+ "learning_rate": 2.112651030561479e-06,
639
+ "loss": 0.2409,
640
+ "step": 1625
641
+ },
642
+ {
643
+ "epoch": 1.76,
644
+ "grad_norm": 18.71114730834961,
645
+ "learning_rate": 2.068230277185501e-06,
646
+ "loss": 0.224,
647
+ "step": 1650
648
+ },
649
+ {
650
+ "epoch": 1.79,
651
+ "grad_norm": 21.95819854736328,
652
+ "learning_rate": 2.023809523809524e-06,
653
+ "loss": 0.2223,
654
+ "step": 1675
655
+ },
656
+ {
657
+ "epoch": 1.81,
658
+ "grad_norm": 27.065677642822266,
659
+ "learning_rate": 1.979388770433547e-06,
660
+ "loss": 0.2787,
661
+ "step": 1700
662
+ },
663
+ {
664
+ "epoch": 1.81,
665
+ "eval_accuracy": 0.8653,
666
+ "eval_f1_macro": 0.790261134849528,
667
+ "eval_f1_micro": 0.8653,
668
+ "eval_loss": 0.5133171677589417,
669
+ "eval_runtime": 25.5701,
670
+ "eval_samples_per_second": 391.081,
671
+ "eval_steps_per_second": 6.14,
672
+ "step": 1700
673
+ },
674
+ {
675
+ "epoch": 1.84,
676
+ "grad_norm": 35.288761138916016,
677
+ "learning_rate": 1.9349680170575695e-06,
678
+ "loss": 0.2709,
679
+ "step": 1725
680
+ },
681
+ {
682
+ "epoch": 1.87,
683
+ "grad_norm": 21.077306747436523,
684
+ "learning_rate": 1.8905472636815921e-06,
685
+ "loss": 0.2002,
686
+ "step": 1750
687
+ },
688
+ {
689
+ "epoch": 1.89,
690
+ "grad_norm": 25.394838333129883,
691
+ "learning_rate": 1.846126510305615e-06,
692
+ "loss": 0.2461,
693
+ "step": 1775
694
+ },
695
+ {
696
+ "epoch": 1.92,
697
+ "grad_norm": 26.597759246826172,
698
+ "learning_rate": 1.8017057569296375e-06,
699
+ "loss": 0.2357,
700
+ "step": 1800
701
+ },
702
+ {
703
+ "epoch": 1.92,
704
+ "eval_accuracy": 0.8669,
705
+ "eval_f1_macro": 0.7902403947168268,
706
+ "eval_f1_micro": 0.8669,
707
+ "eval_loss": 0.5063937306404114,
708
+ "eval_runtime": 25.6031,
709
+ "eval_samples_per_second": 390.577,
710
+ "eval_steps_per_second": 6.132,
711
+ "step": 1800
712
+ },
713
+ {
714
+ "epoch": 1.95,
715
+ "grad_norm": 18.62090301513672,
716
+ "learning_rate": 1.7572850035536603e-06,
717
+ "loss": 0.2612,
718
+ "step": 1825
719
+ },
720
+ {
721
+ "epoch": 1.97,
722
+ "grad_norm": 25.897939682006836,
723
+ "learning_rate": 1.7128642501776832e-06,
724
+ "loss": 0.2243,
725
+ "step": 1850
726
+ },
727
+ {
728
+ "epoch": 2.0,
729
+ "grad_norm": 20.556882858276367,
730
+ "learning_rate": 1.668443496801706e-06,
731
+ "loss": 0.2078,
732
+ "step": 1875
733
+ },
734
+ {
735
+ "epoch": 2.03,
736
+ "grad_norm": 5.211686134338379,
737
+ "learning_rate": 1.6240227434257286e-06,
738
+ "loss": 0.049,
739
+ "step": 1900
740
+ },
741
+ {
742
+ "epoch": 2.03,
743
+ "eval_accuracy": 0.8719,
744
+ "eval_f1_macro": 0.797777536741942,
745
+ "eval_f1_micro": 0.8719,
746
+ "eval_loss": 0.5344421863555908,
747
+ "eval_runtime": 25.9399,
748
+ "eval_samples_per_second": 385.506,
749
+ "eval_steps_per_second": 6.052,
750
+ "step": 1900
751
+ },
752
+ {
753
+ "epoch": 2.05,
754
+ "grad_norm": 14.868837356567383,
755
+ "learning_rate": 1.5796019900497514e-06,
756
+ "loss": 0.0483,
757
+ "step": 1925
758
+ },
759
+ {
760
+ "epoch": 2.08,
761
+ "grad_norm": 3.739365577697754,
762
+ "learning_rate": 1.5351812366737743e-06,
763
+ "loss": 0.0426,
764
+ "step": 1950
765
+ },
766
+ {
767
+ "epoch": 2.11,
768
+ "grad_norm": 3.052903413772583,
769
+ "learning_rate": 1.4907604832977968e-06,
770
+ "loss": 0.0468,
771
+ "step": 1975
772
+ },
773
+ {
774
+ "epoch": 2.13,
775
+ "grad_norm": 11.233345985412598,
776
+ "learning_rate": 1.4463397299218196e-06,
777
+ "loss": 0.0298,
778
+ "step": 2000
779
+ },
780
+ {
781
+ "epoch": 2.13,
782
+ "eval_accuracy": 0.8737,
783
+ "eval_f1_macro": 0.7992354841882687,
784
+ "eval_f1_micro": 0.8737,
785
+ "eval_loss": 0.5761749744415283,
786
+ "eval_runtime": 25.6811,
787
+ "eval_samples_per_second": 389.392,
788
+ "eval_steps_per_second": 6.113,
789
+ "step": 2000
790
+ },
791
+ {
792
+ "epoch": 2.16,
793
+ "grad_norm": 9.836750030517578,
794
+ "learning_rate": 1.4019189765458423e-06,
795
+ "loss": 0.0306,
796
+ "step": 2025
797
+ },
798
+ {
799
+ "epoch": 2.19,
800
+ "grad_norm": 12.054607391357422,
801
+ "learning_rate": 1.357498223169865e-06,
802
+ "loss": 0.0408,
803
+ "step": 2050
804
+ },
805
+ {
806
+ "epoch": 2.21,
807
+ "grad_norm": 2.877735137939453,
808
+ "learning_rate": 1.3130774697938879e-06,
809
+ "loss": 0.032,
810
+ "step": 2075
811
+ },
812
+ {
813
+ "epoch": 2.24,
814
+ "grad_norm": 18.573556900024414,
815
+ "learning_rate": 1.2686567164179105e-06,
816
+ "loss": 0.0427,
817
+ "step": 2100
818
+ },
819
+ {
820
+ "epoch": 2.24,
821
+ "eval_accuracy": 0.8708,
822
+ "eval_f1_macro": 0.7976411680340069,
823
+ "eval_f1_micro": 0.8708,
824
+ "eval_loss": 0.5961406230926514,
825
+ "eval_runtime": 25.6941,
826
+ "eval_samples_per_second": 389.194,
827
+ "eval_steps_per_second": 6.11,
828
+ "step": 2100
829
+ },
830
+ {
831
+ "epoch": 2.27,
832
+ "grad_norm": 11.545409202575684,
833
+ "learning_rate": 1.2242359630419332e-06,
834
+ "loss": 0.0343,
835
+ "step": 2125
836
+ },
837
+ {
838
+ "epoch": 2.29,
839
+ "grad_norm": 3.3840279579162598,
840
+ "learning_rate": 1.179815209665956e-06,
841
+ "loss": 0.0237,
842
+ "step": 2150
843
+ },
844
+ {
845
+ "epoch": 2.32,
846
+ "grad_norm": 7.452319145202637,
847
+ "learning_rate": 1.1353944562899787e-06,
848
+ "loss": 0.042,
849
+ "step": 2175
850
+ },
851
+ {
852
+ "epoch": 2.35,
853
+ "grad_norm": 7.546860694885254,
854
+ "learning_rate": 1.0909737029140014e-06,
855
+ "loss": 0.036,
856
+ "step": 2200
857
+ },
858
+ {
859
+ "epoch": 2.35,
860
+ "eval_accuracy": 0.8728,
861
+ "eval_f1_macro": 0.7987820731312831,
862
+ "eval_f1_micro": 0.8728,
863
+ "eval_loss": 0.6128308773040771,
864
+ "eval_runtime": 25.9603,
865
+ "eval_samples_per_second": 385.204,
866
+ "eval_steps_per_second": 6.048,
867
+ "step": 2200
868
+ },
869
+ {
870
+ "epoch": 2.37,
871
+ "grad_norm": 0.8773216605186462,
872
+ "learning_rate": 1.0465529495380243e-06,
873
+ "loss": 0.0264,
874
+ "step": 2225
875
+ },
876
+ {
877
+ "epoch": 2.4,
878
+ "grad_norm": 1.4390593767166138,
879
+ "learning_rate": 1.002132196162047e-06,
880
+ "loss": 0.0326,
881
+ "step": 2250
882
+ },
883
+ {
884
+ "epoch": 2.43,
885
+ "grad_norm": 3.424440622329712,
886
+ "learning_rate": 9.577114427860696e-07,
887
+ "loss": 0.0265,
888
+ "step": 2275
889
+ },
890
+ {
891
+ "epoch": 2.45,
892
+ "grad_norm": 13.154258728027344,
893
+ "learning_rate": 9.132906894100925e-07,
894
+ "loss": 0.0551,
895
+ "step": 2300
896
+ },
897
+ {
898
+ "epoch": 2.45,
899
+ "eval_accuracy": 0.8708,
900
+ "eval_f1_macro": 0.7975921884184456,
901
+ "eval_f1_micro": 0.8708,
902
+ "eval_loss": 0.6165248155593872,
903
+ "eval_runtime": 25.655,
904
+ "eval_samples_per_second": 389.788,
905
+ "eval_steps_per_second": 6.12,
906
+ "step": 2300
907
+ },
908
+ {
909
+ "epoch": 2.48,
910
+ "grad_norm": 8.90126895904541,
911
+ "learning_rate": 8.688699360341152e-07,
912
+ "loss": 0.0359,
913
+ "step": 2325
914
+ },
915
+ {
916
+ "epoch": 2.51,
917
+ "grad_norm": 10.456062316894531,
918
+ "learning_rate": 8.24449182658138e-07,
919
+ "loss": 0.0454,
920
+ "step": 2350
921
+ },
922
+ {
923
+ "epoch": 2.53,
924
+ "grad_norm": 13.38987922668457,
925
+ "learning_rate": 7.800284292821607e-07,
926
+ "loss": 0.0329,
927
+ "step": 2375
928
+ },
929
+ {
930
+ "epoch": 2.56,
931
+ "grad_norm": 6.421198844909668,
932
+ "learning_rate": 7.356076759061834e-07,
933
+ "loss": 0.0392,
934
+ "step": 2400
935
+ },
936
+ {
937
+ "epoch": 2.56,
938
+ "eval_accuracy": 0.8749,
939
+ "eval_f1_macro": 0.8038155628364919,
940
+ "eval_f1_micro": 0.8749,
941
+ "eval_loss": 0.6023103594779968,
942
+ "eval_runtime": 25.6716,
943
+ "eval_samples_per_second": 389.535,
944
+ "eval_steps_per_second": 6.116,
945
+ "step": 2400
946
+ },
947
+ {
948
+ "epoch": 2.59,
949
+ "grad_norm": 16.32231330871582,
950
+ "learning_rate": 6.911869225302062e-07,
951
+ "loss": 0.0319,
952
+ "step": 2425
953
+ },
954
+ {
955
+ "epoch": 2.61,
956
+ "grad_norm": 5.884388446807861,
957
+ "learning_rate": 6.467661691542289e-07,
958
+ "loss": 0.041,
959
+ "step": 2450
960
+ },
961
+ {
962
+ "epoch": 2.64,
963
+ "grad_norm": 17.850648880004883,
964
+ "learning_rate": 6.023454157782517e-07,
965
+ "loss": 0.036,
966
+ "step": 2475
967
+ },
968
+ {
969
+ "epoch": 2.67,
970
+ "grad_norm": 16.628997802734375,
971
+ "learning_rate": 5.579246624022743e-07,
972
+ "loss": 0.0364,
973
+ "step": 2500
974
+ },
975
+ {
976
+ "epoch": 2.67,
977
+ "eval_accuracy": 0.8729,
978
+ "eval_f1_macro": 0.8001251167012569,
979
+ "eval_f1_micro": 0.8729,
980
+ "eval_loss": 0.6167578101158142,
981
+ "eval_runtime": 25.9524,
982
+ "eval_samples_per_second": 385.321,
983
+ "eval_steps_per_second": 6.05,
984
+ "step": 2500
985
+ },
986
+ {
987
+ "epoch": 2.69,
988
+ "grad_norm": 4.081849575042725,
989
+ "learning_rate": 5.135039090262971e-07,
990
+ "loss": 0.0418,
991
+ "step": 2525
992
+ },
993
+ {
994
+ "epoch": 2.72,
995
+ "grad_norm": 8.027618408203125,
996
+ "learning_rate": 4.690831556503199e-07,
997
+ "loss": 0.0324,
998
+ "step": 2550
999
+ },
1000
+ {
1001
+ "epoch": 2.75,
1002
+ "grad_norm": 9.084144592285156,
1003
+ "learning_rate": 4.2466240227434256e-07,
1004
+ "loss": 0.0286,
1005
+ "step": 2575
1006
+ },
1007
+ {
1008
+ "epoch": 2.77,
1009
+ "grad_norm": 5.414234161376953,
1010
+ "learning_rate": 3.8024164889836533e-07,
1011
+ "loss": 0.0416,
1012
+ "step": 2600
1013
+ },
1014
+ {
1015
+ "epoch": 2.77,
1016
+ "eval_accuracy": 0.8753,
1017
+ "eval_f1_macro": 0.8048163846871306,
1018
+ "eval_f1_micro": 0.8753,
1019
+ "eval_loss": 0.6102917790412903,
1020
+ "eval_runtime": 25.9892,
1021
+ "eval_samples_per_second": 384.775,
1022
+ "eval_steps_per_second": 6.041,
1023
+ "step": 2600
1024
+ },
1025
+ {
1026
+ "epoch": 2.8,
1027
+ "grad_norm": 7.557031154632568,
1028
+ "learning_rate": 3.358208955223881e-07,
1029
+ "loss": 0.0271,
1030
+ "step": 2625
1031
+ },
1032
+ {
1033
+ "epoch": 2.83,
1034
+ "grad_norm": 5.741875648498535,
1035
+ "learning_rate": 2.914001421464108e-07,
1036
+ "loss": 0.0367,
1037
+ "step": 2650
1038
+ },
1039
+ {
1040
+ "epoch": 2.85,
1041
+ "grad_norm": 12.493782997131348,
1042
+ "learning_rate": 2.4697938877043354e-07,
1043
+ "loss": 0.0274,
1044
+ "step": 2675
1045
+ },
1046
+ {
1047
+ "epoch": 2.88,
1048
+ "grad_norm": 2.7892916202545166,
1049
+ "learning_rate": 2.0255863539445632e-07,
1050
+ "loss": 0.0353,
1051
+ "step": 2700
1052
+ },
1053
+ {
1054
+ "epoch": 2.88,
1055
+ "eval_accuracy": 0.8749,
1056
+ "eval_f1_macro": 0.8053988442835892,
1057
+ "eval_f1_micro": 0.8749,
1058
+ "eval_loss": 0.6117515563964844,
1059
+ "eval_runtime": 25.6582,
1060
+ "eval_samples_per_second": 389.74,
1061
+ "eval_steps_per_second": 6.119,
1062
+ "step": 2700
1063
+ },
1064
+ {
1065
+ "epoch": 2.91,
1066
+ "grad_norm": 5.350805759429932,
1067
+ "learning_rate": 1.5813788201847903e-07,
1068
+ "loss": 0.0261,
1069
+ "step": 2725
1070
+ },
1071
+ {
1072
+ "epoch": 2.93,
1073
+ "grad_norm": 11.953265190124512,
1074
+ "learning_rate": 1.1371712864250178e-07,
1075
+ "loss": 0.0377,
1076
+ "step": 2750
1077
+ },
1078
+ {
1079
+ "epoch": 2.96,
1080
+ "grad_norm": 13.371731758117676,
1081
+ "learning_rate": 6.929637526652453e-08,
1082
+ "loss": 0.0255,
1083
+ "step": 2775
1084
+ },
1085
+ {
1086
+ "epoch": 2.99,
1087
+ "grad_norm": 15.417765617370605,
1088
+ "learning_rate": 2.4875621890547265e-08,
1089
+ "loss": 0.0308,
1090
+ "step": 2800
1091
+ },
1092
+ {
1093
+ "epoch": 2.99,
1094
+ "eval_accuracy": 0.875,
1095
+ "eval_f1_macro": 0.805663420581269,
1096
+ "eval_f1_micro": 0.875,
1097
+ "eval_loss": 0.611430287361145,
1098
+ "eval_runtime": 25.9862,
1099
+ "eval_samples_per_second": 384.819,
1100
+ "eval_steps_per_second": 6.042,
1101
+ "step": 2800
1102
+ },
1103
+ {
1104
+ "epoch": 3.0,
1105
+ "step": 2814,
1106
+ "total_flos": 1.6801018930213683e+17,
1107
+ "train_loss": 0.42635450247932005,
1108
+ "train_runtime": 3623.2348,
1109
+ "train_samples_per_second": 49.679,
1110
+ "train_steps_per_second": 0.777
1111
+ }
1112
+ ],
1113
+ "logging_steps": 25,
1114
+ "max_steps": 2814,
1115
+ "num_input_tokens_seen": 0,
1116
+ "num_train_epochs": 3,
1117
+ "save_steps": 100,
1118
+ "total_flos": 1.6801018930213683e+17,
1119
+ "train_batch_size": 32,
1120
+ "trial_name": null,
1121
+ "trial_params": null
1122
+ }
Qwen/Qwen1.5_1.8B_ledgar/training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f26a8af75d31668209ed94c987a4170cdf12fb1b08369f54b4ac17f6f18edc56
3
+ size 5944
Qwen/Qwen1.5_1.8B_ledgar/vocab.json ADDED
The diff for this file is too large to render. See raw diff