AlekseyKorshuk commited on
Commit
e0ee192
1 Parent(s): 07e331f

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/radiohead
5
+ tags:
6
+ - huggingartists
7
+ - lyrics
8
+ - lm-head
9
+ - causal-lm
10
+ widget:
11
+ - text: "I am"
12
+ ---
13
+
14
+ <div class="inline-flex flex-col" style="line-height: 1.5;">
15
+ <div class="flex">
16
+ <div
17
+ style="display:DISPLAY_1; margin-left: auto; margin-right: auto; width: 92px; height:92px; border-radius: 50%; background-size: cover; background-image: url(&#39;https://images.genius.com/593c69b2e4bb8eb47801ce1952c5d30b.600x600x184.gif&#39;)">
18
+ </div>
19
+ </div>
20
+ <div style="text-align: center; margin-top: 3px; font-size: 16px; font-weight: 800">🤖 HuggingArtists Model 🤖</div>
21
+ <div style="text-align: center; font-size: 16px; font-weight: 800">Radiohead</div>
22
+ <a href="https://genius.com/artists/radiohead">
23
+ <div style="text-align: center; font-size: 14px;">@radiohead</div>
24
+ </a>
25
+ </div>
26
+
27
+ I was made with [huggingartists](https://github.com/AlekseyKorshuk/huggingartists).
28
+
29
+ Create your own bot based on your favorite artist with [the demo](https://colab.research.google.com/github/AlekseyKorshuk/huggingartists/blob/master/huggingartists-demo.ipynb)!
30
+
31
+ ## How does it work?
32
+
33
+ To understand how the model was developed, check the [W&B report](https://wandb.ai/huggingartists/huggingartists/reportlist).
34
+
35
+ ## Training data
36
+
37
+ The model was trained on lyrics from Radiohead.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/radiohead).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/radiohead")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/35vxvq9n/artifacts), which is tracked with [W&B artifacts](https://docs.wandb.com/artifacts) at every step of the pipeline.
49
+
50
+ ## Training procedure
51
+
52
+ The model is based on a pre-trained [GPT-2](https://huggingface.co/gpt2) which is fine-tuned on Radiohead's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/2bulf32i) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/2bulf32i/artifacts) is logged and versioned.
57
+
58
+ ## How to use
59
+
60
+ You can use this model directly with a pipeline for text generation:
61
+
62
+ ```python
63
+ from transformers import pipeline
64
+ generator = pipeline('text-generation',
65
+ model='huggingartists/radiohead')
66
+ generator("I am", num_return_sequences=5)
67
+ ```
68
+
69
+ Or with Transformers library:
70
+
71
+ ```python
72
+ from transformers import AutoTokenizer, AutoModelWithLMHead
73
+
74
+ tokenizer = AutoTokenizer.from_pretrained("huggingartists/radiohead")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/radiohead")
77
+ ```
78
+
79
+ ## Limitations and bias
80
+
81
+ The model suffers from [the same limitations and bias as GPT-2](https://huggingface.co/gpt2#limitations-and-bias).
82
+
83
+ In addition, the data present in the user's tweets further affects the text generated by the model.
84
+
85
+ ## About
86
+
87
+ *Built by Aleksey Korshuk*
88
+
89
+ [![Follow](https://img.shields.io/github/followers/AlekseyKorshuk?style=social)](https://github.com/AlekseyKorshuk)
90
+
91
+ [![Follow](https://img.shields.io/twitter/follow/alekseykorshuk?style=social)](https://twitter.com/intent/follow?screen_name=alekseykorshuk)
92
+
93
+ [![Follow](https://img.shields.io/badge/dynamic/json?color=blue&label=Telegram%20Channel&query=%24.result&url=https%3A%2F%2Fapi.telegram.org%2Fbot1929545866%3AAAFGhV-KKnegEcLiyYJxsc4zV6C-bdPEBtQ%2FgetChatMemberCount%3Fchat_id%3D-1001253621662&style=social&logo=telegram)](https://t.me/joinchat/_CQ04KjcJ-4yZTky)
94
+
95
+ For more details, visit the project repository.
96
+
97
+ [![GitHub stars](https://img.shields.io/github/stars/AlekseyKorshuk/huggingartists?style=social)](https://github.com/AlekseyKorshuk/huggingartists)
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "radiohead",
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": 200,
33
+ "min_length": 100,
34
+ "temperature": 1.0,
35
+ "top_p": 0.95
36
+ }
37
+ },
38
+ "torch_dtype": "float32",
39
+ "transformers_version": "4.17.0",
40
+ "use_cache": true,
41
+ "vocab_size": 50257
42
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eval_loss": 2.588986396789551, "eval_runtime": 2.2503, "eval_samples_per_second": 20.886, "eval_steps_per_second": 2.666, "epoch": 10.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0cd239cc8addb71ee18a5f198cb109315f36fd08edfb5ec0fc239849bf7f4d12
3
+ size 497764120
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4d98cf3591d6c065ea13072f4ac3f498eb65a2cfce7305d069519c25f85ffce
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:28fbaae1bf45583e5cb67ad32c1d88c478e1557757fa838131a33632b71301c7
3
+ size 510404393
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:acf452d303eb4056fcb17fa527a28038577d972c97ad69222bf34a63d415312b
3
+ size 14503
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c35e4601ff589d570a695430c49d5028d31da3a18518f505c21842dd34307806
3
+ size 623
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"unk_token": "<|endoftext|>", "bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "add_prefix_space": false, "model_max_length": 1024, "special_tokens_map_file": null, "name_or_path": "gpt2", "tokenizer_class": "GPT2Tokenizer"}
trainer_state.json ADDED
@@ -0,0 +1,368 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 2.588986396789551,
3
+ "best_model_checkpoint": "output/radiohead/checkpoint-240",
4
+ "epoch": 8.0,
5
+ "global_step": 240,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.17,
12
+ "learning_rate": 0.0001280093426996125,
13
+ "loss": 3.2073,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.33,
18
+ "learning_rate": 0.00010290000000000001,
19
+ "loss": 2.9899,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.5,
24
+ "learning_rate": 6.86e-05,
25
+ "loss": 2.8292,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.67,
30
+ "learning_rate": 3.4300000000000014e-05,
31
+ "loss": 2.8291,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.83,
36
+ "learning_rate": 9.190657300387505e-06,
37
+ "loss": 2.8479,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 1.0,
42
+ "learning_rate": 0.0,
43
+ "loss": 2.9261,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 1.0,
48
+ "eval_loss": 2.8060529232025146,
49
+ "eval_runtime": 2.0848,
50
+ "eval_samples_per_second": 22.545,
51
+ "eval_steps_per_second": 2.878,
52
+ "step": 30
53
+ },
54
+ {
55
+ "epoch": 1.17,
56
+ "learning_rate": 9.190657300387513e-06,
57
+ "loss": 2.6517,
58
+ "step": 35
59
+ },
60
+ {
61
+ "epoch": 1.33,
62
+ "learning_rate": 3.429999999999997e-05,
63
+ "loss": 2.7329,
64
+ "step": 40
65
+ },
66
+ {
67
+ "epoch": 1.5,
68
+ "learning_rate": 6.859999999999999e-05,
69
+ "loss": 2.7524,
70
+ "step": 45
71
+ },
72
+ {
73
+ "epoch": 1.67,
74
+ "learning_rate": 0.00010290000000000001,
75
+ "loss": 2.5591,
76
+ "step": 50
77
+ },
78
+ {
79
+ "epoch": 1.83,
80
+ "learning_rate": 0.00012800934269961248,
81
+ "loss": 2.6201,
82
+ "step": 55
83
+ },
84
+ {
85
+ "epoch": 2.0,
86
+ "learning_rate": 0.0001372,
87
+ "loss": 2.5207,
88
+ "step": 60
89
+ },
90
+ {
91
+ "epoch": 2.0,
92
+ "eval_loss": 2.7088782787323,
93
+ "eval_runtime": 2.1182,
94
+ "eval_samples_per_second": 22.189,
95
+ "eval_steps_per_second": 2.833,
96
+ "step": 60
97
+ },
98
+ {
99
+ "epoch": 2.17,
100
+ "learning_rate": 0.00012800934269961253,
101
+ "loss": 2.3985,
102
+ "step": 65
103
+ },
104
+ {
105
+ "epoch": 2.33,
106
+ "learning_rate": 0.00010289999999999998,
107
+ "loss": 2.3027,
108
+ "step": 70
109
+ },
110
+ {
111
+ "epoch": 2.5,
112
+ "learning_rate": 6.860000000000001e-05,
113
+ "loss": 2.1903,
114
+ "step": 75
115
+ },
116
+ {
117
+ "epoch": 2.67,
118
+ "learning_rate": 3.4300000000000054e-05,
119
+ "loss": 2.2458,
120
+ "step": 80
121
+ },
122
+ {
123
+ "epoch": 2.83,
124
+ "learning_rate": 9.190657300387498e-06,
125
+ "loss": 2.2898,
126
+ "step": 85
127
+ },
128
+ {
129
+ "epoch": 3.0,
130
+ "learning_rate": 0.0,
131
+ "loss": 2.2945,
132
+ "step": 90
133
+ },
134
+ {
135
+ "epoch": 3.0,
136
+ "eval_loss": 2.6637511253356934,
137
+ "eval_runtime": 2.1338,
138
+ "eval_samples_per_second": 22.027,
139
+ "eval_steps_per_second": 2.812,
140
+ "step": 90
141
+ },
142
+ {
143
+ "epoch": 3.17,
144
+ "learning_rate": 9.190657300387474e-06,
145
+ "loss": 2.1611,
146
+ "step": 95
147
+ },
148
+ {
149
+ "epoch": 3.33,
150
+ "learning_rate": 3.4300000000000014e-05,
151
+ "loss": 2.0392,
152
+ "step": 100
153
+ },
154
+ {
155
+ "epoch": 3.5,
156
+ "learning_rate": 6.859999999999997e-05,
157
+ "loss": 2.3157,
158
+ "step": 105
159
+ },
160
+ {
161
+ "epoch": 3.67,
162
+ "learning_rate": 0.00010289999999999994,
163
+ "loss": 2.1789,
164
+ "step": 110
165
+ },
166
+ {
167
+ "epoch": 3.83,
168
+ "learning_rate": 0.0001280093426996125,
169
+ "loss": 2.1359,
170
+ "step": 115
171
+ },
172
+ {
173
+ "epoch": 4.0,
174
+ "learning_rate": 0.0001372,
175
+ "loss": 2.0964,
176
+ "step": 120
177
+ },
178
+ {
179
+ "epoch": 4.0,
180
+ "eval_loss": 2.617748737335205,
181
+ "eval_runtime": 2.1438,
182
+ "eval_samples_per_second": 21.924,
183
+ "eval_steps_per_second": 2.799,
184
+ "step": 120
185
+ },
186
+ {
187
+ "epoch": 4.17,
188
+ "learning_rate": 0.00012800934269961248,
189
+ "loss": 1.8717,
190
+ "step": 125
191
+ },
192
+ {
193
+ "epoch": 4.33,
194
+ "learning_rate": 0.00010290000000000009,
195
+ "loss": 1.9838,
196
+ "step": 130
197
+ },
198
+ {
199
+ "epoch": 4.5,
200
+ "learning_rate": 6.860000000000003e-05,
201
+ "loss": 2.0446,
202
+ "step": 135
203
+ },
204
+ {
205
+ "epoch": 4.67,
206
+ "learning_rate": 3.429999999999996e-05,
207
+ "loss": 1.8428,
208
+ "step": 140
209
+ },
210
+ {
211
+ "epoch": 4.83,
212
+ "learning_rate": 9.190657300387574e-06,
213
+ "loss": 1.9594,
214
+ "step": 145
215
+ },
216
+ {
217
+ "epoch": 5.0,
218
+ "learning_rate": 0.0,
219
+ "loss": 2.0192,
220
+ "step": 150
221
+ },
222
+ {
223
+ "epoch": 5.0,
224
+ "eval_loss": 2.6335015296936035,
225
+ "eval_runtime": 2.1534,
226
+ "eval_samples_per_second": 21.826,
227
+ "eval_steps_per_second": 2.786,
228
+ "step": 150
229
+ },
230
+ {
231
+ "epoch": 5.17,
232
+ "learning_rate": 9.190657300387467e-06,
233
+ "loss": 1.7401,
234
+ "step": 155
235
+ },
236
+ {
237
+ "epoch": 5.33,
238
+ "learning_rate": 3.429999999999989e-05,
239
+ "loss": 1.8589,
240
+ "step": 160
241
+ },
242
+ {
243
+ "epoch": 5.5,
244
+ "learning_rate": 6.859999999999984e-05,
245
+ "loss": 1.7454,
246
+ "step": 165
247
+ },
248
+ {
249
+ "epoch": 5.67,
250
+ "learning_rate": 0.00010290000000000003,
251
+ "loss": 1.8506,
252
+ "step": 170
253
+ },
254
+ {
255
+ "epoch": 5.83,
256
+ "learning_rate": 0.00012800934269961248,
257
+ "loss": 1.7711,
258
+ "step": 175
259
+ },
260
+ {
261
+ "epoch": 6.0,
262
+ "learning_rate": 0.0001372,
263
+ "loss": 1.6952,
264
+ "step": 180
265
+ },
266
+ {
267
+ "epoch": 6.0,
268
+ "eval_loss": 2.604886293411255,
269
+ "eval_runtime": 2.1277,
270
+ "eval_samples_per_second": 22.09,
271
+ "eval_steps_per_second": 2.82,
272
+ "step": 180
273
+ },
274
+ {
275
+ "epoch": 6.17,
276
+ "learning_rate": 0.00012800934269961253,
277
+ "loss": 1.7717,
278
+ "step": 185
279
+ },
280
+ {
281
+ "epoch": 6.33,
282
+ "learning_rate": 0.00010290000000000012,
283
+ "loss": 1.577,
284
+ "step": 190
285
+ },
286
+ {
287
+ "epoch": 6.5,
288
+ "learning_rate": 6.859999999999993e-05,
289
+ "loss": 1.5197,
290
+ "step": 195
291
+ },
292
+ {
293
+ "epoch": 6.67,
294
+ "learning_rate": 3.429999999999998e-05,
295
+ "loss": 1.6176,
296
+ "step": 200
297
+ },
298
+ {
299
+ "epoch": 6.83,
300
+ "learning_rate": 9.19065730038752e-06,
301
+ "loss": 1.562,
302
+ "step": 205
303
+ },
304
+ {
305
+ "epoch": 7.0,
306
+ "learning_rate": 0.0,
307
+ "loss": 1.6157,
308
+ "step": 210
309
+ },
310
+ {
311
+ "epoch": 7.0,
312
+ "eval_loss": 2.6068503856658936,
313
+ "eval_runtime": 2.1309,
314
+ "eval_samples_per_second": 22.056,
315
+ "eval_steps_per_second": 2.816,
316
+ "step": 210
317
+ },
318
+ {
319
+ "epoch": 7.17,
320
+ "learning_rate": 9.190657300387459e-06,
321
+ "loss": 1.5445,
322
+ "step": 215
323
+ },
324
+ {
325
+ "epoch": 7.33,
326
+ "learning_rate": 3.429999999999988e-05,
327
+ "loss": 1.5187,
328
+ "step": 220
329
+ },
330
+ {
331
+ "epoch": 7.5,
332
+ "learning_rate": 6.859999999999982e-05,
333
+ "loss": 1.4775,
334
+ "step": 225
335
+ },
336
+ {
337
+ "epoch": 7.67,
338
+ "learning_rate": 0.00010290000000000002,
339
+ "loss": 1.3245,
340
+ "step": 230
341
+ },
342
+ {
343
+ "epoch": 7.83,
344
+ "learning_rate": 0.00012800934269961248,
345
+ "loss": 1.6077,
346
+ "step": 235
347
+ },
348
+ {
349
+ "epoch": 8.0,
350
+ "learning_rate": 0.0001372,
351
+ "loss": 1.5085,
352
+ "step": 240
353
+ },
354
+ {
355
+ "epoch": 8.0,
356
+ "eval_loss": 2.588986396789551,
357
+ "eval_runtime": 2.1323,
358
+ "eval_samples_per_second": 22.042,
359
+ "eval_steps_per_second": 2.814,
360
+ "step": 240
361
+ }
362
+ ],
363
+ "max_steps": 300,
364
+ "num_train_epochs": 10,
365
+ "total_flos": 243524173824000.0,
366
+ "trial_name": null,
367
+ "trial_params": null
368
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1fbef6ebe47b44e8f7ce6b04240d2f0cdf8816562a86c75bf5961e0d35045126
3
+ size 3055
vocab.json ADDED
The diff for this file is too large to render. See raw diff