chloeli commited on
Commit
b14c6d4
·
verified ·
1 Parent(s): 0293557

Model save

Browse files
Files changed (4) hide show
  1. README.md +58 -0
  2. all_results.json +8 -0
  3. train_results.json +8 -0
  4. trainer_state.json +259 -0
README.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-0.5B-Instruct
3
+ library_name: transformers
4
+ model_name: qwen-2.5-0.5B-instruct-sft-lora-countdown-optimal-1k
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for qwen-2.5-0.5B-instruct-sft-lora-countdown-optimal-1k
13
+
14
+ This model is a fine-tuned version of [Qwen/Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct).
15
+ It has been trained using [TRL](https://github.com/huggingface/trl).
16
+
17
+ ## Quick start
18
+
19
+ ```python
20
+ from transformers import pipeline
21
+
22
+ question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
+ generator = pipeline("text-generation", model="chloeli/qwen-2.5-0.5B-instruct-sft-lora-countdown-optimal-1k", device="cuda")
24
+ output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
+ print(output["generated_text"])
26
+ ```
27
+
28
+ ## Training procedure
29
+
30
+ [<img src="https://raw.githubusercontent.com/wandb/assets/main/wandb-github-badge-28.svg" alt="Visualize in Weights & Biases" width="150" height="24"/>](https://wandb.ai/chloeli/huggingface/runs/26px5dou)
31
+
32
+
33
+ This model was trained with SFT.
34
+
35
+ ### Framework versions
36
+
37
+ - TRL: 0.15.2
38
+ - Transformers: 4.49.0
39
+ - Pytorch: 2.6.0
40
+ - Datasets: 3.3.2
41
+ - Tokenizers: 0.21.0
42
+
43
+ ## Citations
44
+
45
+
46
+
47
+ Cite TRL as:
48
+
49
+ ```bibtex
50
+ @misc{vonwerra2022trl,
51
+ title = {{TRL: Transformer Reinforcement Learning}},
52
+ author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
53
+ year = 2020,
54
+ journal = {GitHub repository},
55
+ publisher = {GitHub},
56
+ howpublished = {\url{https://github.com/huggingface/trl}}
57
+ }
58
+ ```
all_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 948716719046656.0,
3
+ "train_loss": 0.24438688468933106,
4
+ "train_runtime": 137.7503,
5
+ "train_samples": 1000,
6
+ "train_samples_per_second": 7.26,
7
+ "train_steps_per_second": 0.907
8
+ }
train_results.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "total_flos": 948716719046656.0,
3
+ "train_loss": 0.24438688468933106,
4
+ "train_runtime": 137.7503,
5
+ "train_samples": 1000,
6
+ "train_samples_per_second": 7.26,
7
+ "train_steps_per_second": 0.907
8
+ }
trainer_state.json ADDED
@@ -0,0 +1,259 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 500,
6
+ "global_step": 125,
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.008,
13
+ "grad_norm": 4.959076881408691,
14
+ "learning_rate": 1.5384615384615387e-05,
15
+ "loss": 1.8894,
16
+ "mean_token_accuracy": 0.6759726703166962,
17
+ "step": 1
18
+ },
19
+ {
20
+ "epoch": 0.04,
21
+ "grad_norm": 3.325948715209961,
22
+ "learning_rate": 7.692307692307693e-05,
23
+ "loss": 1.8457,
24
+ "mean_token_accuracy": 0.6744399294257164,
25
+ "step": 5
26
+ },
27
+ {
28
+ "epoch": 0.08,
29
+ "grad_norm": 1.0953567028045654,
30
+ "learning_rate": 0.00015384615384615385,
31
+ "loss": 1.3863,
32
+ "mean_token_accuracy": 0.7154875338077545,
33
+ "step": 10
34
+ },
35
+ {
36
+ "epoch": 0.12,
37
+ "grad_norm": 0.8824595212936401,
38
+ "learning_rate": 0.00019984268150178167,
39
+ "loss": 0.8812,
40
+ "mean_token_accuracy": 0.802780419588089,
41
+ "step": 15
42
+ },
43
+ {
44
+ "epoch": 0.16,
45
+ "grad_norm": 0.7127411365509033,
46
+ "learning_rate": 0.00019807852804032305,
47
+ "loss": 0.3838,
48
+ "mean_token_accuracy": 0.9001224040985107,
49
+ "step": 20
50
+ },
51
+ {
52
+ "epoch": 0.2,
53
+ "grad_norm": 0.5814230442047119,
54
+ "learning_rate": 0.00019438833303083678,
55
+ "loss": 0.1288,
56
+ "mean_token_accuracy": 0.9640743255615234,
57
+ "step": 25
58
+ },
59
+ {
60
+ "epoch": 0.24,
61
+ "grad_norm": 0.3094175457954407,
62
+ "learning_rate": 0.00018884456359788724,
63
+ "loss": 0.091,
64
+ "mean_token_accuracy": 0.9696201145648956,
65
+ "step": 30
66
+ },
67
+ {
68
+ "epoch": 0.28,
69
+ "grad_norm": 0.28704366087913513,
70
+ "learning_rate": 0.00018155608689592604,
71
+ "loss": 0.0822,
72
+ "mean_token_accuracy": 0.9697297215461731,
73
+ "step": 35
74
+ },
75
+ {
76
+ "epoch": 0.32,
77
+ "grad_norm": 0.10918337106704712,
78
+ "learning_rate": 0.0001726660322034027,
79
+ "loss": 0.0786,
80
+ "mean_token_accuracy": 0.9703457236289978,
81
+ "step": 40
82
+ },
83
+ {
84
+ "epoch": 0.36,
85
+ "grad_norm": 0.10930587351322174,
86
+ "learning_rate": 0.00016234898018587337,
87
+ "loss": 0.0757,
88
+ "mean_token_accuracy": 0.9704258263111114,
89
+ "step": 45
90
+ },
91
+ {
92
+ "epoch": 0.4,
93
+ "grad_norm": 0.08647102862596512,
94
+ "learning_rate": 0.00015080753452465296,
95
+ "loss": 0.0725,
96
+ "mean_token_accuracy": 0.9722082138061523,
97
+ "step": 50
98
+ },
99
+ {
100
+ "epoch": 0.44,
101
+ "grad_norm": 0.11223802715539932,
102
+ "learning_rate": 0.000138268343236509,
103
+ "loss": 0.0766,
104
+ "mean_token_accuracy": 0.9705742001533508,
105
+ "step": 55
106
+ },
107
+ {
108
+ "epoch": 0.48,
109
+ "grad_norm": 0.10774961858987808,
110
+ "learning_rate": 0.0001249776478167227,
111
+ "loss": 0.0715,
112
+ "mean_token_accuracy": 0.9713926434516906,
113
+ "step": 60
114
+ },
115
+ {
116
+ "epoch": 0.52,
117
+ "grad_norm": 0.18533609807491302,
118
+ "learning_rate": 0.00011119644761033078,
119
+ "loss": 0.0742,
120
+ "mean_token_accuracy": 0.9715357601642609,
121
+ "step": 65
122
+ },
123
+ {
124
+ "epoch": 0.56,
125
+ "grad_norm": 0.1414521187543869,
126
+ "learning_rate": 9.719537437241312e-05,
127
+ "loss": 0.0726,
128
+ "mean_token_accuracy": 0.9722862243652344,
129
+ "step": 70
130
+ },
131
+ {
132
+ "epoch": 0.6,
133
+ "grad_norm": 0.11008978635072708,
134
+ "learning_rate": 8.324937766952638e-05,
135
+ "loss": 0.0726,
136
+ "mean_token_accuracy": 0.9715758740901947,
137
+ "step": 75
138
+ },
139
+ {
140
+ "epoch": 0.64,
141
+ "grad_norm": 0.0934567004442215,
142
+ "learning_rate": 6.963232548903853e-05,
143
+ "loss": 0.0698,
144
+ "mean_token_accuracy": 0.9724796772003174,
145
+ "step": 80
146
+ },
147
+ {
148
+ "epoch": 0.68,
149
+ "grad_norm": 0.09209822118282318,
150
+ "learning_rate": 5.6611626088244194e-05,
151
+ "loss": 0.0714,
152
+ "mean_token_accuracy": 0.9721440374851227,
153
+ "step": 85
154
+ },
155
+ {
156
+ "epoch": 0.72,
157
+ "grad_norm": 0.09165395051240921,
158
+ "learning_rate": 4.444297669803981e-05,
159
+ "loss": 0.0699,
160
+ "mean_token_accuracy": 0.9724449038505554,
161
+ "step": 90
162
+ },
163
+ {
164
+ "epoch": 0.76,
165
+ "grad_norm": 0.09419706463813782,
166
+ "learning_rate": 3.336534220479961e-05,
167
+ "loss": 0.0729,
168
+ "mean_token_accuracy": 0.9713936984539032,
169
+ "step": 95
170
+ },
171
+ {
172
+ "epoch": 0.8,
173
+ "grad_norm": 0.08532276749610901,
174
+ "learning_rate": 2.3596262417839255e-05,
175
+ "loss": 0.0713,
176
+ "mean_token_accuracy": 0.971445506811142,
177
+ "step": 100
178
+ },
179
+ {
180
+ "epoch": 0.84,
181
+ "grad_norm": 0.11239537596702576,
182
+ "learning_rate": 1.5327580077171587e-05,
183
+ "loss": 0.0705,
184
+ "mean_token_accuracy": 0.9732583463191986,
185
+ "step": 105
186
+ },
187
+ {
188
+ "epoch": 0.88,
189
+ "grad_norm": 0.06490039080381393,
190
+ "learning_rate": 8.72167349386811e-06,
191
+ "loss": 0.0712,
192
+ "mean_token_accuracy": 0.9731930553913116,
193
+ "step": 110
194
+ },
195
+ {
196
+ "epoch": 0.92,
197
+ "grad_norm": 0.07825157046318054,
198
+ "learning_rate": 3.908267805490051e-06,
199
+ "loss": 0.0705,
200
+ "mean_token_accuracy": 0.9729720294475556,
201
+ "step": 115
202
+ },
203
+ {
204
+ "epoch": 0.96,
205
+ "grad_norm": 0.10481598228216171,
206
+ "learning_rate": 9.818874663554357e-07,
207
+ "loss": 0.0697,
208
+ "mean_token_accuracy": 0.9719029128551483,
209
+ "step": 120
210
+ },
211
+ {
212
+ "epoch": 1.0,
213
+ "grad_norm": 0.12130062282085419,
214
+ "learning_rate": 0.0,
215
+ "loss": 0.0704,
216
+ "mean_token_accuracy": 0.9729031443595886,
217
+ "step": 125
218
+ },
219
+ {
220
+ "epoch": 1.0,
221
+ "eval_loss": 0.07161793857812881,
222
+ "eval_mean_token_accuracy": 0.9721314153671264,
223
+ "eval_runtime": 39.9967,
224
+ "eval_samples_per_second": 50.004,
225
+ "eval_steps_per_second": 6.251,
226
+ "step": 125
227
+ },
228
+ {
229
+ "epoch": 1.0,
230
+ "step": 125,
231
+ "total_flos": 948716719046656.0,
232
+ "train_loss": 0.24438688468933106,
233
+ "train_runtime": 137.7503,
234
+ "train_samples_per_second": 7.26,
235
+ "train_steps_per_second": 0.907
236
+ }
237
+ ],
238
+ "logging_steps": 5,
239
+ "max_steps": 125,
240
+ "num_input_tokens_seen": 0,
241
+ "num_train_epochs": 1,
242
+ "save_steps": 100,
243
+ "stateful_callbacks": {
244
+ "TrainerControl": {
245
+ "args": {
246
+ "should_epoch_stop": false,
247
+ "should_evaluate": false,
248
+ "should_log": false,
249
+ "should_save": true,
250
+ "should_training_stop": true
251
+ },
252
+ "attributes": {}
253
+ }
254
+ },
255
+ "total_flos": 948716719046656.0,
256
+ "train_batch_size": 4,
257
+ "trial_name": null,
258
+ "trial_params": null
259
+ }