Alqayed2024 commited on
Commit
a024a07
·
verified ·
1 Parent(s): ef9be38

Model save

Browse files
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: gpt2
3
+ library_name: transformers
4
+ model_name: gpt2-cpt-dutch
5
+ tags:
6
+ - generated_from_trainer
7
+ - trl
8
+ - sft
9
+ licence: license
10
+ ---
11
+
12
+ # Model Card for gpt2-cpt-dutch
13
+
14
+ This model is a fine-tuned version of [gpt2](https://huggingface.co/gpt2).
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="Alqayed2024/gpt2-cpt-dutch", 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/ahmed-alhammadi-technology-innovation-institute/huggingface/runs/ktrmzdcf)
31
+
32
+ This model was trained with SFT.
33
+
34
+ ### Framework versions
35
+
36
+ - TRL: 0.12.0
37
+ - Transformers: 4.46.1
38
+ - Pytorch: 2.5.1
39
+ - Datasets: 3.1.0
40
+ - Tokenizers: 0.20.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": 2783887138750464.0,
4
+ "train_loss": 0.0,
5
+ "train_runtime": 2.3096,
6
+ "train_samples": 12593,
7
+ "train_samples_per_second": 4599.857,
8
+ "train_steps_per_second": 71.873
9
+ }
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "gpt2",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPT2LMHeadModel"
6
+ ],
7
+ "attn_pdrop": 0.1,
8
+ "bos_token_id": 50256,
9
+ "embd_pdrop": 0.1,
10
+ "eos_token_id": 50256,
11
+ "initializer_range": 0.02,
12
+ "layer_norm_epsilon": 1e-05,
13
+ "model_type": "gpt2",
14
+ "n_ctx": 1024,
15
+ "n_embd": 768,
16
+ "n_head": 12,
17
+ "n_inner": null,
18
+ "n_layer": 12,
19
+ "n_positions": 1024,
20
+ "reorder_and_upcast_attn": false,
21
+ "resid_pdrop": 0.1,
22
+ "scale_attn_by_inverse_layer_idx": false,
23
+ "scale_attn_weights": true,
24
+ "summary_activation": null,
25
+ "summary_first_dropout": 0.1,
26
+ "summary_proj_to_labels": true,
27
+ "summary_type": "cls_index",
28
+ "summary_use_proj": true,
29
+ "task_specific_params": {
30
+ "text-generation": {
31
+ "do_sample": true,
32
+ "max_length": 50
33
+ }
34
+ },
35
+ "torch_dtype": "bfloat16",
36
+ "transformers_version": "4.46.1",
37
+ "use_cache": false,
38
+ "vocab_size": 50257
39
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": 50256,
5
+ "transformers_version": "4.46.1"
6
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5e56ad414e88a43f621e6e58d714e9fa67975af8ef1c5bcfebe07217baca59f
3
+ size 248894656
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|endoftext|>",
3
+ "eos_token": "<|endoftext|>",
4
+ "pad_token": "<|endoftext|>",
5
+ "unk_token": "<|endoftext|>"
6
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "50256": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ }
12
+ },
13
+ "bos_token": "<|endoftext|>",
14
+ "clean_up_tokenization_spaces": false,
15
+ "eos_token": "<|endoftext|>",
16
+ "model_max_length": 1024,
17
+ "pad_token": "<|endoftext|>",
18
+ "tokenizer_class": "GPT2Tokenizer",
19
+ "unk_token": "<|endoftext|>"
20
+ }
train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 2783887138750464.0,
4
+ "train_loss": 0.0,
5
+ "train_runtime": 2.3096,
6
+ "train_samples": 12593,
7
+ "train_samples_per_second": 4599.857,
8
+ "train_steps_per_second": 71.873
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,280 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 500,
6
+ "global_step": 166,
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.012048192771084338,
13
+ "grad_norm": 5.144875488861497,
14
+ "learning_rate": 2.2222222222222223e-05,
15
+ "loss": 5.2383,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 0.060240963855421686,
20
+ "grad_norm": 4.400640807642775,
21
+ "learning_rate": 0.00011111111111111112,
22
+ "loss": 5.1426,
23
+ "step": 5
24
+ },
25
+ {
26
+ "epoch": 0.12048192771084337,
27
+ "grad_norm": 2.8424185774279995,
28
+ "learning_rate": 0.00019990989662046818,
29
+ "loss": 4.9195,
30
+ "step": 10
31
+ },
32
+ {
33
+ "epoch": 0.18072289156626506,
34
+ "grad_norm": 2.1742733252180533,
35
+ "learning_rate": 0.0001967732946933499,
36
+ "loss": 4.5773,
37
+ "step": 15
38
+ },
39
+ {
40
+ "epoch": 0.24096385542168675,
41
+ "grad_norm": 2.0811257888315406,
42
+ "learning_rate": 0.00018929258581495685,
43
+ "loss": 4.3453,
44
+ "step": 20
45
+ },
46
+ {
47
+ "epoch": 0.30120481927710846,
48
+ "grad_norm": 1.3196766642254727,
49
+ "learning_rate": 0.00017780357543184397,
50
+ "loss": 4.1766,
51
+ "step": 25
52
+ },
53
+ {
54
+ "epoch": 0.3614457831325301,
55
+ "grad_norm": 1.7074769394742433,
56
+ "learning_rate": 0.00016282199972956425,
57
+ "loss": 4.0355,
58
+ "step": 30
59
+ },
60
+ {
61
+ "epoch": 0.42168674698795183,
62
+ "grad_norm": 1.786794986516103,
63
+ "learning_rate": 0.00014502037448176734,
64
+ "loss": 3.9418,
65
+ "step": 35
66
+ },
67
+ {
68
+ "epoch": 0.4819277108433735,
69
+ "grad_norm": 1.712555578478064,
70
+ "learning_rate": 0.00012519780613851254,
71
+ "loss": 3.8637,
72
+ "step": 40
73
+ },
74
+ {
75
+ "epoch": 0.5421686746987951,
76
+ "grad_norm": 1.1317257705596584,
77
+ "learning_rate": 0.00010424412031961484,
78
+ "loss": 3.8164,
79
+ "step": 45
80
+ },
81
+ {
82
+ "epoch": 0.6024096385542169,
83
+ "grad_norm": 0.8808395413039651,
84
+ "learning_rate": 8.309991796781511e-05,
85
+ "loss": 3.7855,
86
+ "step": 50
87
+ },
88
+ {
89
+ "epoch": 0.6626506024096386,
90
+ "grad_norm": 0.9070705182297121,
91
+ "learning_rate": 6.271435222196916e-05,
92
+ "loss": 3.7594,
93
+ "step": 55
94
+ },
95
+ {
96
+ "epoch": 0.7228915662650602,
97
+ "grad_norm": 0.800430133148163,
98
+ "learning_rate": 4.4002521386240466e-05,
99
+ "loss": 3.723,
100
+ "step": 60
101
+ },
102
+ {
103
+ "epoch": 0.7831325301204819,
104
+ "grad_norm": 0.9084524552496485,
105
+ "learning_rate": 2.7804390604547557e-05,
106
+ "loss": 3.7258,
107
+ "step": 65
108
+ },
109
+ {
110
+ "epoch": 0.8433734939759037,
111
+ "grad_norm": 0.7470706061804011,
112
+ "learning_rate": 1.4847086226668872e-05,
113
+ "loss": 3.6902,
114
+ "step": 70
115
+ },
116
+ {
117
+ "epoch": 0.9036144578313253,
118
+ "grad_norm": 0.697773024233771,
119
+ "learning_rate": 5.71225545389158e-06,
120
+ "loss": 3.691,
121
+ "step": 75
122
+ },
123
+ {
124
+ "epoch": 0.963855421686747,
125
+ "grad_norm": 0.70777044124217,
126
+ "learning_rate": 8.099564741123166e-07,
127
+ "loss": 3.6707,
128
+ "step": 80
129
+ },
130
+ {
131
+ "epoch": 0.5120481927710844,
132
+ "grad_norm": 1.03125,
133
+ "learning_rate": 2.3529411764705884e-05,
134
+ "loss": 3.6468,
135
+ "step": 85
136
+ },
137
+ {
138
+ "epoch": 0.5421686746987951,
139
+ "grad_norm": 0.89453125,
140
+ "learning_rate": 8.23529411764706e-05,
141
+ "loss": 3.6491,
142
+ "step": 90
143
+ },
144
+ {
145
+ "epoch": 0.572289156626506,
146
+ "grad_norm": 1.0703125,
147
+ "learning_rate": 0.0001411764705882353,
148
+ "loss": 3.6893,
149
+ "step": 95
150
+ },
151
+ {
152
+ "epoch": 0.6024096385542169,
153
+ "grad_norm": 1.0625,
154
+ "learning_rate": 0.0002,
155
+ "loss": 3.6404,
156
+ "step": 100
157
+ },
158
+ {
159
+ "epoch": 0.6325301204819277,
160
+ "grad_norm": 0.92578125,
161
+ "learning_rate": 0.00019944481853548335,
162
+ "loss": 3.6761,
163
+ "step": 105
164
+ },
165
+ {
166
+ "epoch": 0.6626506024096386,
167
+ "grad_norm": 0.94140625,
168
+ "learning_rate": 0.00019778543867110426,
169
+ "loss": 3.6328,
170
+ "step": 110
171
+ },
172
+ {
173
+ "epoch": 0.6927710843373494,
174
+ "grad_norm": 0.91796875,
175
+ "learning_rate": 0.00019504028554572864,
176
+ "loss": 3.6478,
177
+ "step": 115
178
+ },
179
+ {
180
+ "epoch": 0.7228915662650602,
181
+ "grad_norm": 1.0703125,
182
+ "learning_rate": 0.00019123984032200586,
183
+ "loss": 3.6035,
184
+ "step": 120
185
+ },
186
+ {
187
+ "epoch": 0.7530120481927711,
188
+ "grad_norm": 0.87890625,
189
+ "learning_rate": 0.00018642630173483832,
190
+ "loss": 3.6189,
191
+ "step": 125
192
+ },
193
+ {
194
+ "epoch": 0.7831325301204819,
195
+ "grad_norm": 0.88671875,
196
+ "learning_rate": 0.00018065311753227273,
197
+ "loss": 3.6364,
198
+ "step": 130
199
+ },
200
+ {
201
+ "epoch": 0.8132530120481928,
202
+ "grad_norm": 0.96484375,
203
+ "learning_rate": 0.00017398439101151905,
204
+ "loss": 3.6213,
205
+ "step": 135
206
+ },
207
+ {
208
+ "epoch": 0.8433734939759037,
209
+ "grad_norm": 0.90625,
210
+ "learning_rate": 0.0001664941692397025,
211
+ "loss": 3.558,
212
+ "step": 140
213
+ },
214
+ {
215
+ "epoch": 0.8734939759036144,
216
+ "grad_norm": 0.91796875,
217
+ "learning_rate": 0.00015826562086267956,
218
+ "loss": 3.5992,
219
+ "step": 145
220
+ },
221
+ {
222
+ "epoch": 0.9036144578313253,
223
+ "grad_norm": 0.84765625,
224
+ "learning_rate": 0.00014939011263122634,
225
+ "loss": 3.5675,
226
+ "step": 150
227
+ },
228
+ {
229
+ "epoch": 0.9337349397590361,
230
+ "grad_norm": 0.78515625,
231
+ "learning_rate": 0.00013996619489850822,
232
+ "loss": 3.5625,
233
+ "step": 155
234
+ },
235
+ {
236
+ "epoch": 0.963855421686747,
237
+ "grad_norm": 0.84765625,
238
+ "learning_rate": 0.0001300985073534919,
239
+ "loss": 3.5525,
240
+ "step": 160
241
+ },
242
+ {
243
+ "epoch": 0.9939759036144579,
244
+ "grad_norm": 0.890625,
245
+ "learning_rate": 0.00011989661714062999,
246
+ "loss": 3.5954,
247
+ "step": 165
248
+ },
249
+ {
250
+ "epoch": 1.0,
251
+ "step": 166,
252
+ "total_flos": 2783887138750464.0,
253
+ "train_loss": 0.0,
254
+ "train_runtime": 2.3096,
255
+ "train_samples_per_second": 4599.857,
256
+ "train_steps_per_second": 71.873
257
+ }
258
+ ],
259
+ "logging_steps": 5,
260
+ "max_steps": 166,
261
+ "num_input_tokens_seen": 0,
262
+ "num_train_epochs": 1,
263
+ "save_steps": 100,
264
+ "stateful_callbacks": {
265
+ "TrainerControl": {
266
+ "args": {
267
+ "should_epoch_stop": false,
268
+ "should_evaluate": false,
269
+ "should_log": false,
270
+ "should_save": true,
271
+ "should_training_stop": true
272
+ },
273
+ "attributes": {}
274
+ }
275
+ },
276
+ "total_flos": 2783887138750464.0,
277
+ "train_batch_size": 16,
278
+ "trial_name": null,
279
+ "trial_params": null
280
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:254c3e3d20e04fa0c4beda434fb7b4b9427a6569237f0da874cfa5e1e5f6a50e
3
+ size 5752
vocab.json ADDED
The diff for this file is too large to render. See raw diff