AlekseyKorshuk commited on
Commit
d9cb9cb
1 Parent(s): 4b62797

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/scriptonite
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/411d50392aef867fe0e9dd55a074ecfb.1000x1000x1.jpg&#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">Скриптонит (Scriptonite)</div>
22
+ <a href="https://genius.com/artists/scriptonite">
23
+ <div style="text-align: center; font-size: 14px;">@scriptonite</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 Скриптонит (Scriptonite).
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/scriptonite).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/scriptonite")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/3iyoxg0v/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 Скриптонит (Scriptonite)'s lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/di1clo79) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/di1clo79/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/scriptonite')
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/scriptonite")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/scriptonite")
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,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "gradient_checkpointing": false,
12
+ "initializer_range": 0.02,
13
+ "layer_norm_epsilon": 1e-05,
14
+ "model_type": "gpt2",
15
+ "n_ctx": 1024,
16
+ "n_embd": 768,
17
+ "n_head": 12,
18
+ "n_inner": null,
19
+ "n_layer": 12,
20
+ "n_positions": 1024,
21
+ "resid_pdrop": 0.1,
22
+ "scale_attn_weights": true,
23
+ "summary_activation": null,
24
+ "summary_first_dropout": 0.1,
25
+ "summary_proj_to_labels": true,
26
+ "summary_type": "cls_index",
27
+ "summary_use_proj": true,
28
+ "task_specific_params": {
29
+ "text-generation": {
30
+ "do_sample": true,
31
+ "max_length": 200,
32
+ "min_length": 100,
33
+ "temperature": 1.0,
34
+ "top_p": 0.95
35
+ }
36
+ },
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.10.0",
39
+ "use_cache": true,
40
+ "vocab_size": 50257
41
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
1
+ {"eval_loss": 1.727362871170044, "eval_runtime": 20.7773, "eval_samples_per_second": 21.369, "eval_steps_per_second": 2.695, "epoch": 1.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0b5c46ac5fd3298d2a01f9b7915560bc450f3997bc18b7dada5a182b6fbdeffa
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:a8246c465fe86028eab455a564decb982d3c8b4cc33c5a236fa65250065f2dfa
3
+ size 995604017
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4642ea9beb4bc34749ebce90968edfe32be19e17efd0ba3eb969a39d1b3c9fd3
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:361696374a33a1ba4cfa105bbdd0232fc91f20b020d2290b0ed59f96e83efc13
3
+ size 14439
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5643af0d2d309ea9f8d4e15ffbc8ebd3faca59b9cbbd8bf85f08e202e280408b
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,390 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.727362871170044,
3
+ "best_model_checkpoint": "output/scriptonite/checkpoint-306",
4
+ "epoch": 1.0,
5
+ "global_step": 306,
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.02,
12
+ "learning_rate": 0.00013710963595739938,
13
+ "loss": 2.6067,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.03,
18
+ "learning_rate": 0.0001368387818954924,
19
+ "loss": 2.3107,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.05,
24
+ "learning_rate": 0.00013638815138477438,
25
+ "loss": 2.1302,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.07,
30
+ "learning_rate": 0.00013575893162042516,
31
+ "loss": 2.1562,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.08,
36
+ "learning_rate": 0.00013495278029461931,
37
+ "loss": 2.0081,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.1,
42
+ "learning_rate": 0.00013397182122930294,
43
+ "loss": 1.9735,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.11,
48
+ "learning_rate": 0.0001328186387809415,
49
+ "loss": 2.0752,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.13,
54
+ "learning_rate": 0.0001314962710319808,
55
+ "loss": 2.0235,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.15,
60
+ "learning_rate": 0.0001300082017869573,
61
+ "loss": 2.0059,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 0.16,
66
+ "learning_rate": 0.0001283583513943447,
67
+ "loss": 1.8462,
68
+ "step": 50
69
+ },
70
+ {
71
+ "epoch": 0.18,
72
+ "learning_rate": 0.00012655106641831695,
73
+ "loss": 1.8365,
74
+ "step": 55
75
+ },
76
+ {
77
+ "epoch": 0.2,
78
+ "learning_rate": 0.00012459110818763681,
79
+ "loss": 2.0625,
80
+ "step": 60
81
+ },
82
+ {
83
+ "epoch": 0.21,
84
+ "learning_rate": 0.00012248364025183937,
85
+ "loss": 1.9252,
86
+ "step": 65
87
+ },
88
+ {
89
+ "epoch": 0.23,
90
+ "learning_rate": 0.00012023421477775639,
91
+ "loss": 1.9528,
92
+ "step": 70
93
+ },
94
+ {
95
+ "epoch": 0.25,
96
+ "learning_rate": 0.00011784875792222071,
97
+ "loss": 1.7558,
98
+ "step": 75
99
+ },
100
+ {
101
+ "epoch": 0.26,
102
+ "learning_rate": 0.00011533355421948647,
103
+ "loss": 1.8522,
104
+ "step": 80
105
+ },
106
+ {
107
+ "epoch": 0.28,
108
+ "learning_rate": 0.00011269523002449659,
109
+ "loss": 1.7714,
110
+ "step": 85
111
+ },
112
+ {
113
+ "epoch": 0.29,
114
+ "learning_rate": 0.000109940736055617,
115
+ "loss": 1.8545,
116
+ "step": 90
117
+ },
118
+ {
119
+ "epoch": 0.31,
120
+ "learning_rate": 0.0001070773290828286,
121
+ "loss": 1.856,
122
+ "step": 95
123
+ },
124
+ {
125
+ "epoch": 0.33,
126
+ "learning_rate": 0.00010411255280962044,
127
+ "loss": 1.7938,
128
+ "step": 100
129
+ },
130
+ {
131
+ "epoch": 0.34,
132
+ "learning_rate": 0.0001010542179989503,
133
+ "loss": 1.8907,
134
+ "step": 105
135
+ },
136
+ {
137
+ "epoch": 0.36,
138
+ "learning_rate": 9.791038189563213e-05,
139
+ "loss": 1.8999,
140
+ "step": 110
141
+ },
142
+ {
143
+ "epoch": 0.38,
144
+ "learning_rate": 9.468932699936187e-05,
145
+ "loss": 1.8537,
146
+ "step": 115
147
+ },
148
+ {
149
+ "epoch": 0.39,
150
+ "learning_rate": 9.139953924430466e-05,
151
+ "loss": 1.8283,
152
+ "step": 120
153
+ },
154
+ {
155
+ "epoch": 0.41,
156
+ "learning_rate": 8.804968564273005e-05,
157
+ "loss": 1.6966,
158
+ "step": 125
159
+ },
160
+ {
161
+ "epoch": 0.42,
162
+ "learning_rate": 8.46485914515931e-05,
163
+ "loss": 1.8649,
164
+ "step": 130
165
+ },
166
+ {
167
+ "epoch": 0.44,
168
+ "learning_rate": 8.120521692221673e-05,
169
+ "loss": 1.8703,
170
+ "step": 135
171
+ },
172
+ {
173
+ "epoch": 0.46,
174
+ "learning_rate": 7.772863369432873e-05,
175
+ "loss": 1.7685,
176
+ "step": 140
177
+ },
178
+ {
179
+ "epoch": 0.47,
180
+ "learning_rate": 7.422800089664365e-05,
181
+ "loss": 1.8474,
182
+ "step": 145
183
+ },
184
+ {
185
+ "epoch": 0.49,
186
+ "learning_rate": 7.071254101695329e-05,
187
+ "loss": 1.7611,
188
+ "step": 150
189
+ },
190
+ {
191
+ "epoch": 0.51,
192
+ "learning_rate": 6.719151560529643e-05,
193
+ "loss": 1.7199,
194
+ "step": 155
195
+ },
196
+ {
197
+ "epoch": 0.52,
198
+ "learning_rate": 6.367420087421813e-05,
199
+ "loss": 1.7935,
200
+ "step": 160
201
+ },
202
+ {
203
+ "epoch": 0.54,
204
+ "learning_rate": 6.016986326040062e-05,
205
+ "loss": 1.7749,
206
+ "step": 165
207
+ },
208
+ {
209
+ "epoch": 0.56,
210
+ "learning_rate": 5.668773501204858e-05,
211
+ "loss": 1.8416,
212
+ "step": 170
213
+ },
214
+ {
215
+ "epoch": 0.57,
216
+ "learning_rate": 5.323698986634498e-05,
217
+ "loss": 1.7939,
218
+ "step": 175
219
+ },
220
+ {
221
+ "epoch": 0.59,
222
+ "learning_rate": 4.982671888105512e-05,
223
+ "loss": 1.6949,
224
+ "step": 180
225
+ },
226
+ {
227
+ "epoch": 0.6,
228
+ "learning_rate": 4.646590648395145e-05,
229
+ "loss": 1.7562,
230
+ "step": 185
231
+ },
232
+ {
233
+ "epoch": 0.62,
234
+ "learning_rate": 4.316340680315709e-05,
235
+ "loss": 1.6271,
236
+ "step": 190
237
+ },
238
+ {
239
+ "epoch": 0.64,
240
+ "learning_rate": 3.992792034076668e-05,
241
+ "loss": 1.713,
242
+ "step": 195
243
+ },
244
+ {
245
+ "epoch": 0.65,
246
+ "learning_rate": 3.6767971051197685e-05,
247
+ "loss": 1.7105,
248
+ "step": 200
249
+ },
250
+ {
251
+ "epoch": 0.67,
252
+ "learning_rate": 3.369188388466058e-05,
253
+ "loss": 1.7335,
254
+ "step": 205
255
+ },
256
+ {
257
+ "epoch": 0.69,
258
+ "learning_rate": 3.0707762854909304e-05,
259
+ "loss": 1.6748,
260
+ "step": 210
261
+ },
262
+ {
263
+ "epoch": 0.7,
264
+ "learning_rate": 2.7823469689053436e-05,
265
+ "loss": 1.7346,
266
+ "step": 215
267
+ },
268
+ {
269
+ "epoch": 0.72,
270
+ "learning_rate": 2.50466031156793e-05,
271
+ "loss": 1.8197,
272
+ "step": 220
273
+ },
274
+ {
275
+ "epoch": 0.74,
276
+ "learning_rate": 2.2384478845846175e-05,
277
+ "loss": 1.6761,
278
+ "step": 225
279
+ },
280
+ {
281
+ "epoch": 0.75,
282
+ "learning_rate": 1.9844110299697732e-05,
283
+ "loss": 1.7013,
284
+ "step": 230
285
+ },
286
+ {
287
+ "epoch": 0.77,
288
+ "learning_rate": 1.7432190129464996e-05,
289
+ "loss": 1.7646,
290
+ "step": 235
291
+ },
292
+ {
293
+ "epoch": 0.78,
294
+ "learning_rate": 1.5155072587539005e-05,
295
+ "loss": 1.5319,
296
+ "step": 240
297
+ },
298
+ {
299
+ "epoch": 0.8,
300
+ "learning_rate": 1.3018756786064535e-05,
301
+ "loss": 1.79,
302
+ "step": 245
303
+ },
304
+ {
305
+ "epoch": 0.82,
306
+ "learning_rate": 1.1028870892157994e-05,
307
+ "loss": 1.6705,
308
+ "step": 250
309
+ },
310
+ {
311
+ "epoch": 0.83,
312
+ "learning_rate": 9.190657300387505e-06,
313
+ "loss": 1.6285,
314
+ "step": 255
315
+ },
316
+ {
317
+ "epoch": 0.85,
318
+ "learning_rate": 7.508958821578629e-06,
319
+ "loss": 1.706,
320
+ "step": 260
321
+ },
322
+ {
323
+ "epoch": 0.87,
324
+ "learning_rate": 5.988205924331354e-06,
325
+ "loss": 1.6291,
326
+ "step": 265
327
+ },
328
+ {
329
+ "epoch": 0.88,
330
+ "learning_rate": 4.6324050628611986e-06,
331
+ "loss": 1.7411,
332
+ "step": 270
333
+ },
334
+ {
335
+ "epoch": 0.9,
336
+ "learning_rate": 3.445128121914628e-06,
337
+ "loss": 1.7647,
338
+ "step": 275
339
+ },
340
+ {
341
+ "epoch": 0.92,
342
+ "learning_rate": 2.4295030065665785e-06,
343
+ "loss": 1.7888,
344
+ "step": 280
345
+ },
346
+ {
347
+ "epoch": 0.93,
348
+ "learning_rate": 1.5882054016913933e-06,
349
+ "loss": 1.6871,
350
+ "step": 285
351
+ },
352
+ {
353
+ "epoch": 0.95,
354
+ "learning_rate": 9.234517228169584e-07,
355
+ "loss": 1.7539,
356
+ "step": 290
357
+ },
358
+ {
359
+ "epoch": 0.96,
360
+ "learning_rate": 4.3699327693326474e-07,
361
+ "loss": 1.6844,
362
+ "step": 295
363
+ },
364
+ {
365
+ "epoch": 0.98,
366
+ "learning_rate": 1.3011164863877445e-07,
367
+ "loss": 1.6774,
368
+ "step": 300
369
+ },
370
+ {
371
+ "epoch": 1.0,
372
+ "learning_rate": 3.6153237799239955e-09,
373
+ "loss": 1.7028,
374
+ "step": 305
375
+ },
376
+ {
377
+ "epoch": 1.0,
378
+ "eval_loss": 1.727362871170044,
379
+ "eval_runtime": 20.8096,
380
+ "eval_samples_per_second": 21.336,
381
+ "eval_steps_per_second": 2.691,
382
+ "step": 306
383
+ }
384
+ ],
385
+ "max_steps": 306,
386
+ "num_train_epochs": 1,
387
+ "total_flos": 319560155136000.0,
388
+ "trial_name": null,
389
+ "trial_params": null
390
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aaaf6708f9300a70cac38b2d9556974db0fe2981edabe48909dbaf43501c3dca
3
+ size 2671
vocab.json ADDED
The diff for this file is too large to render. See raw diff