kxnguyen commited on
Commit
ff8cf1c
·
verified ·
1 Parent(s): 5b21eb1

Model save

Browse files
Files changed (4) hide show
  1. README.md +57 -0
  2. all_results.json +9 -0
  3. train_results.json +9 -0
  4. trainer_state.json +273 -0
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Meta-Llama/Meta-Llama-3.1-8B
3
+ library_name: transformers
4
+ model_name: llama-3-1-8b-math-orca-qlora-10k-ep1-frac-50-seed-3
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for llama-3-1-8b-math-orca-qlora-10k-ep1-frac-50-seed-3
13
+
14
+ This model is a fine-tuned version of [Meta-Llama/Meta-Llama-3.1-8B](https://huggingface.co/Meta-Llama/Meta-Llama-3.1-8B).
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="kxnguyen/llama-3-1-8b-math-orca-qlora-10k-ep1-frac-50-seed-3", 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
+
31
+
32
+ This model was trained with SFT.
33
+
34
+ ### Framework versions
35
+
36
+ - TRL: 0.12.1
37
+ - Transformers: 4.49.0
38
+ - Pytorch: 2.5.1
39
+ - Datasets: 3.1.0
40
+ - Tokenizers: 0.21.1
41
+
42
+ ## Citations
43
+
44
+
45
+
46
+ Cite TRL as:
47
+
48
+ ```bibtex
49
+ @misc{vonwerra2022trl,
50
+ title = {{TRL: Transformer Reinforcement Learning}},
51
+ 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},
52
+ year = 2020,
53
+ journal = {GitHub repository},
54
+ publisher = {GitHub},
55
+ howpublished = {\url{https://github.com/huggingface/trl}}
56
+ }
57
+ ```
all_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 1.3380899124648346e+17,
4
+ "train_loss": 0.34797883668594815,
5
+ "train_runtime": 1712.5179,
6
+ "train_samples": 5000,
7
+ "train_samples_per_second": 1.575,
8
+ "train_steps_per_second": 0.099
9
+ }
train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 1.3380899124648346e+17,
4
+ "train_loss": 0.34797883668594815,
5
+ "train_runtime": 1712.5179,
6
+ "train_samples": 5000,
7
+ "train_samples_per_second": 1.575,
8
+ "train_steps_per_second": 0.099
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,273 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 500,
6
+ "global_step": 169,
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.029585798816568046,
13
+ "grad_norm": 2.943749189376831,
14
+ "learning_rate": 0.0002,
15
+ "loss": 0.9772,
16
+ "step": 5
17
+ },
18
+ {
19
+ "epoch": 0.05917159763313609,
20
+ "grad_norm": 0.8338298797607422,
21
+ "learning_rate": 0.0002,
22
+ "loss": 0.4778,
23
+ "step": 10
24
+ },
25
+ {
26
+ "epoch": 0.08875739644970414,
27
+ "grad_norm": 2.0171148777008057,
28
+ "learning_rate": 0.0002,
29
+ "loss": 0.4373,
30
+ "step": 15
31
+ },
32
+ {
33
+ "epoch": 0.11834319526627218,
34
+ "grad_norm": 0.5850780010223389,
35
+ "learning_rate": 0.0002,
36
+ "loss": 0.3965,
37
+ "step": 20
38
+ },
39
+ {
40
+ "epoch": 0.14792899408284024,
41
+ "grad_norm": 0.5566039681434631,
42
+ "learning_rate": 0.0002,
43
+ "loss": 0.3451,
44
+ "step": 25
45
+ },
46
+ {
47
+ "epoch": 0.17751479289940827,
48
+ "grad_norm": 0.5998756289482117,
49
+ "learning_rate": 0.0002,
50
+ "loss": 0.3684,
51
+ "step": 30
52
+ },
53
+ {
54
+ "epoch": 0.20710059171597633,
55
+ "grad_norm": 0.8541339039802551,
56
+ "learning_rate": 0.0002,
57
+ "loss": 0.3338,
58
+ "step": 35
59
+ },
60
+ {
61
+ "epoch": 0.23668639053254437,
62
+ "grad_norm": 0.5334424376487732,
63
+ "learning_rate": 0.0002,
64
+ "loss": 0.3632,
65
+ "step": 40
66
+ },
67
+ {
68
+ "epoch": 0.26627218934911245,
69
+ "grad_norm": 1.0356687307357788,
70
+ "learning_rate": 0.0002,
71
+ "loss": 0.3562,
72
+ "step": 45
73
+ },
74
+ {
75
+ "epoch": 0.2958579881656805,
76
+ "grad_norm": 1.7772154808044434,
77
+ "learning_rate": 0.0002,
78
+ "loss": 0.3509,
79
+ "step": 50
80
+ },
81
+ {
82
+ "epoch": 0.3254437869822485,
83
+ "grad_norm": 0.49876442551612854,
84
+ "learning_rate": 0.0002,
85
+ "loss": 0.3402,
86
+ "step": 55
87
+ },
88
+ {
89
+ "epoch": 0.35502958579881655,
90
+ "grad_norm": 0.5085716247558594,
91
+ "learning_rate": 0.0002,
92
+ "loss": 0.3174,
93
+ "step": 60
94
+ },
95
+ {
96
+ "epoch": 0.38461538461538464,
97
+ "grad_norm": 0.49447423219680786,
98
+ "learning_rate": 0.0002,
99
+ "loss": 0.3389,
100
+ "step": 65
101
+ },
102
+ {
103
+ "epoch": 0.41420118343195267,
104
+ "grad_norm": 14.360894203186035,
105
+ "learning_rate": 0.0002,
106
+ "loss": 0.3302,
107
+ "step": 70
108
+ },
109
+ {
110
+ "epoch": 0.4437869822485207,
111
+ "grad_norm": 0.4983256161212921,
112
+ "learning_rate": 0.0002,
113
+ "loss": 0.3126,
114
+ "step": 75
115
+ },
116
+ {
117
+ "epoch": 0.47337278106508873,
118
+ "grad_norm": 0.43373844027519226,
119
+ "learning_rate": 0.0002,
120
+ "loss": 0.3228,
121
+ "step": 80
122
+ },
123
+ {
124
+ "epoch": 0.5029585798816568,
125
+ "grad_norm": 0.4059043228626251,
126
+ "learning_rate": 0.0002,
127
+ "loss": 0.3026,
128
+ "step": 85
129
+ },
130
+ {
131
+ "epoch": 0.5325443786982249,
132
+ "grad_norm": 0.4355526268482208,
133
+ "learning_rate": 0.0002,
134
+ "loss": 0.3253,
135
+ "step": 90
136
+ },
137
+ {
138
+ "epoch": 0.5621301775147929,
139
+ "grad_norm": 0.38534995913505554,
140
+ "learning_rate": 0.0002,
141
+ "loss": 0.32,
142
+ "step": 95
143
+ },
144
+ {
145
+ "epoch": 0.591715976331361,
146
+ "grad_norm": 0.392378032207489,
147
+ "learning_rate": 0.0002,
148
+ "loss": 0.3199,
149
+ "step": 100
150
+ },
151
+ {
152
+ "epoch": 0.621301775147929,
153
+ "grad_norm": 0.7453891038894653,
154
+ "learning_rate": 0.0002,
155
+ "loss": 0.3227,
156
+ "step": 105
157
+ },
158
+ {
159
+ "epoch": 0.650887573964497,
160
+ "grad_norm": 0.5021527409553528,
161
+ "learning_rate": 0.0002,
162
+ "loss": 0.3283,
163
+ "step": 110
164
+ },
165
+ {
166
+ "epoch": 0.6804733727810651,
167
+ "grad_norm": 0.35293397307395935,
168
+ "learning_rate": 0.0002,
169
+ "loss": 0.292,
170
+ "step": 115
171
+ },
172
+ {
173
+ "epoch": 0.7100591715976331,
174
+ "grad_norm": 0.9166481494903564,
175
+ "learning_rate": 0.0002,
176
+ "loss": 0.2956,
177
+ "step": 120
178
+ },
179
+ {
180
+ "epoch": 0.7396449704142012,
181
+ "grad_norm": 0.38071614503860474,
182
+ "learning_rate": 0.0002,
183
+ "loss": 0.3193,
184
+ "step": 125
185
+ },
186
+ {
187
+ "epoch": 0.7692307692307693,
188
+ "grad_norm": 0.4610137939453125,
189
+ "learning_rate": 0.0002,
190
+ "loss": 0.3024,
191
+ "step": 130
192
+ },
193
+ {
194
+ "epoch": 0.7988165680473372,
195
+ "grad_norm": 0.5271707773208618,
196
+ "learning_rate": 0.0002,
197
+ "loss": 0.3137,
198
+ "step": 135
199
+ },
200
+ {
201
+ "epoch": 0.8284023668639053,
202
+ "grad_norm": 0.3226008117198944,
203
+ "learning_rate": 0.0002,
204
+ "loss": 0.2887,
205
+ "step": 140
206
+ },
207
+ {
208
+ "epoch": 0.8579881656804734,
209
+ "grad_norm": 0.4498213827610016,
210
+ "learning_rate": 0.0002,
211
+ "loss": 0.2873,
212
+ "step": 145
213
+ },
214
+ {
215
+ "epoch": 0.8875739644970414,
216
+ "grad_norm": 0.3456571102142334,
217
+ "learning_rate": 0.0002,
218
+ "loss": 0.2863,
219
+ "step": 150
220
+ },
221
+ {
222
+ "epoch": 0.9171597633136095,
223
+ "grad_norm": 0.35808348655700684,
224
+ "learning_rate": 0.0002,
225
+ "loss": 0.2804,
226
+ "step": 155
227
+ },
228
+ {
229
+ "epoch": 0.9467455621301775,
230
+ "grad_norm": 0.35377588868141174,
231
+ "learning_rate": 0.0002,
232
+ "loss": 0.2883,
233
+ "step": 160
234
+ },
235
+ {
236
+ "epoch": 0.9763313609467456,
237
+ "grad_norm": 0.36346396803855896,
238
+ "learning_rate": 0.0002,
239
+ "loss": 0.2964,
240
+ "step": 165
241
+ },
242
+ {
243
+ "epoch": 1.0,
244
+ "step": 169,
245
+ "total_flos": 1.3380899124648346e+17,
246
+ "train_loss": 0.34797883668594815,
247
+ "train_runtime": 1712.5179,
248
+ "train_samples_per_second": 1.575,
249
+ "train_steps_per_second": 0.099
250
+ }
251
+ ],
252
+ "logging_steps": 5,
253
+ "max_steps": 169,
254
+ "num_input_tokens_seen": 0,
255
+ "num_train_epochs": 1,
256
+ "save_steps": 500,
257
+ "stateful_callbacks": {
258
+ "TrainerControl": {
259
+ "args": {
260
+ "should_epoch_stop": false,
261
+ "should_evaluate": false,
262
+ "should_log": false,
263
+ "should_save": true,
264
+ "should_training_stop": true
265
+ },
266
+ "attributes": {}
267
+ }
268
+ },
269
+ "total_flos": 1.3380899124648346e+17,
270
+ "train_batch_size": 8,
271
+ "trial_name": null,
272
+ "trial_params": null
273
+ }