ahmedalhammadi commited on
Commit
37fdd6e
·
verified ·
1 Parent(s): 32ef1ac

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="ahmedalhammadi/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/ql9uo9vq)
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": 7920590782464.0,
4
+ "train_loss": 4.042498117469879,
5
+ "train_runtime": 34.3031,
6
+ "train_samples": 12593,
7
+ "train_samples_per_second": 309.71,
8
+ "train_steps_per_second": 2.42
9
+ }
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
+ }
train_results.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "epoch": 1.0,
3
+ "total_flos": 7920590782464.0,
4
+ "train_loss": 4.042498117469879,
5
+ "train_runtime": 34.3031,
6
+ "train_samples": 12593,
7
+ "train_samples_per_second": 309.71,
8
+ "train_steps_per_second": 2.42
9
+ }
trainer_state.json ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 1.0,
5
+ "eval_steps": 500,
6
+ "global_step": 83,
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": 1.0,
132
+ "step": 83,
133
+ "total_flos": 7920590782464.0,
134
+ "train_loss": 4.042498117469879,
135
+ "train_runtime": 34.3031,
136
+ "train_samples_per_second": 309.71,
137
+ "train_steps_per_second": 2.42
138
+ }
139
+ ],
140
+ "logging_steps": 5,
141
+ "max_steps": 83,
142
+ "num_input_tokens_seen": 0,
143
+ "num_train_epochs": 1,
144
+ "save_steps": 100,
145
+ "stateful_callbacks": {
146
+ "TrainerControl": {
147
+ "args": {
148
+ "should_epoch_stop": false,
149
+ "should_evaluate": false,
150
+ "should_log": false,
151
+ "should_save": true,
152
+ "should_training_stop": true
153
+ },
154
+ "attributes": {}
155
+ }
156
+ },
157
+ "total_flos": 7920590782464.0,
158
+ "train_batch_size": 16,
159
+ "trial_name": null,
160
+ "trial_params": null
161
+ }