AlekseyKorshuk commited on
Commit
693831a
1 Parent(s): d7fe528

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/bob-dylan
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/22306423b6ad8777d1ed5b33ad8b0d0b.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">Bob Dylan</div>
22
+ <a href="https://genius.com/artists/bob-dylan">
23
+ <div style="text-align: center; font-size: 14px;">@bob-dylan</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 Bob Dylan.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/bob-dylan).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/bob-dylan")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/1um93nq1/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 Bob Dylan's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/2houqbly) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/2houqbly/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/bob-dylan')
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/bob-dylan")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/bob-dylan")
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": "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": 200,
33
+ "min_length": 100,
34
+ "temperature": 1.0,
35
+ "top_p": 0.95
36
+ }
37
+ },
38
+ "torch_dtype": "float32",
39
+ "transformers_version": "4.12.3",
40
+ "use_cache": true,
41
+ "vocab_size": 50257
42
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
1
+ {"eval_loss": 2.670438766479492, "eval_runtime": 18.7517, "eval_samples_per_second": 22.665, "eval_steps_per_second": 2.88, "epoch": 1.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7ab78a956832fea0e65d8e04d7f51135871ced4607d5d7b2674d7c0c12e70558
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:d791f4654e6ea4e0717077e3594974eb5b7059da8528fddd6f83eb69e9b560e4
3
+ size 995604017
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4aee67697cc2e4e18a857a1d535e3c39d413deafb0e0f528766a14c88acec422
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7d0cdbe9de079b14ddbb06d046ee4472dddf707eab85bfa6cf01a6fe2522634a
3
+ size 14567
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b53323acb2950ba4d2cebb5543fb4bef75fc782b28736088a1b9b0f0221e248
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,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 2.670438766479492,
3
+ "best_model_checkpoint": "output/bob-dylan/checkpoint-321",
4
+ "epoch": 1.0,
5
+ "global_step": 321,
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.00013711788223044424,
13
+ "loss": 3.6967,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.03,
18
+ "learning_rate": 0.0001368717255202631,
19
+ "loss": 3.7692,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.05,
24
+ "learning_rate": 0.00013646211919423798,
25
+ "loss": 3.4916,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.06,
30
+ "learning_rate": 0.00013589004389254062,
31
+ "loss": 3.6186,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.08,
36
+ "learning_rate": 0.00013515686922297834,
37
+ "loss": 3.5756,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.09,
42
+ "learning_rate": 0.00013426435048201062,
43
+ "loss": 3.236,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.11,
48
+ "learning_rate": 0.0001332146244523866,
49
+ "loss": 3.3956,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.12,
54
+ "learning_rate": 0.00013201020428746477,
55
+ "loss": 3.3277,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.14,
60
+ "learning_rate": 0.0001306539734944624,
61
+ "loss": 3.2617,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 0.16,
66
+ "learning_rate": 0.00012914917903103908,
67
+ "loss": 3.554,
68
+ "step": 50
69
+ },
70
+ {
71
+ "epoch": 0.17,
72
+ "learning_rate": 0.00012749942353174222,
73
+ "loss": 3.2625,
74
+ "step": 55
75
+ },
76
+ {
77
+ "epoch": 0.19,
78
+ "learning_rate": 0.00012570865668292503,
79
+ "loss": 3.2986,
80
+ "step": 60
81
+ },
82
+ {
83
+ "epoch": 0.2,
84
+ "learning_rate": 0.0001237811657667863,
85
+ "loss": 3.264,
86
+ "step": 65
87
+ },
88
+ {
89
+ "epoch": 0.22,
90
+ "learning_rate": 0.00012172156539717071,
91
+ "loss": 3.0437,
92
+ "step": 70
93
+ },
94
+ {
95
+ "epoch": 0.23,
96
+ "learning_rate": 0.00011953478647170303,
97
+ "loss": 3.0527,
98
+ "step": 75
99
+ },
100
+ {
101
+ "epoch": 0.25,
102
+ "learning_rate": 0.000117226064366706,
103
+ "loss": 3.3623,
104
+ "step": 80
105
+ },
106
+ {
107
+ "epoch": 0.26,
108
+ "learning_rate": 0.0001148009264031647,
109
+ "loss": 3.0801,
110
+ "step": 85
111
+ },
112
+ {
113
+ "epoch": 0.28,
114
+ "learning_rate": 0.0001122651786137447,
115
+ "loss": 3.0471,
116
+ "step": 90
117
+ },
118
+ {
119
+ "epoch": 0.3,
120
+ "learning_rate": 0.00010962489184254581,
121
+ "loss": 3.051,
122
+ "step": 95
123
+ },
124
+ {
125
+ "epoch": 0.31,
126
+ "learning_rate": 0.00010688638721086951,
127
+ "loss": 3.2191,
128
+ "step": 100
129
+ },
130
+ {
131
+ "epoch": 0.33,
132
+ "learning_rate": 0.0001040562209837965,
133
+ "loss": 2.9343,
134
+ "step": 105
135
+ },
136
+ {
137
+ "epoch": 0.34,
138
+ "learning_rate": 0.00010114116887380613,
139
+ "loss": 2.9893,
140
+ "step": 110
141
+ },
142
+ {
143
+ "epoch": 0.36,
144
+ "learning_rate": 9.814820981901533e-05,
145
+ "loss": 3.1068,
146
+ "step": 115
147
+ },
148
+ {
149
+ "epoch": 0.37,
150
+ "learning_rate": 9.508450927487455e-05,
151
+ "loss": 3.1636,
152
+ "step": 120
153
+ },
154
+ {
155
+ "epoch": 0.39,
156
+ "learning_rate": 9.195740205932179e-05,
157
+ "loss": 3.1864,
158
+ "step": 125
159
+ },
160
+ {
161
+ "epoch": 0.4,
162
+ "learning_rate": 8.877437479246497e-05,
163
+ "loss": 2.9116,
164
+ "step": 130
165
+ },
166
+ {
167
+ "epoch": 0.42,
168
+ "learning_rate": 8.554304797283438e-05,
169
+ "loss": 3.1795,
170
+ "step": 135
171
+ },
172
+ {
173
+ "epoch": 0.44,
174
+ "learning_rate": 8.227115773311617e-05,
175
+ "loss": 2.9074,
176
+ "step": 140
177
+ },
178
+ {
179
+ "epoch": 0.45,
180
+ "learning_rate": 7.896653731904552e-05,
181
+ "loss": 3.1763,
182
+ "step": 145
183
+ },
184
+ {
185
+ "epoch": 0.47,
186
+ "learning_rate": 7.56370983358012e-05,
187
+ "loss": 3.0588,
188
+ "step": 150
189
+ },
190
+ {
191
+ "epoch": 0.48,
192
+ "learning_rate": 7.229081180679942e-05,
193
+ "loss": 2.9373,
194
+ "step": 155
195
+ },
196
+ {
197
+ "epoch": 0.5,
198
+ "learning_rate": 6.893568909023427e-05,
199
+ "loss": 3.092,
200
+ "step": 160
201
+ },
202
+ {
203
+ "epoch": 0.51,
204
+ "learning_rate": 6.557976269905237e-05,
205
+ "loss": 3.0733,
206
+ "step": 165
207
+ },
208
+ {
209
+ "epoch": 0.53,
210
+ "learning_rate": 6.223106707028106e-05,
211
+ "loss": 2.9187,
212
+ "step": 170
213
+ },
214
+ {
215
+ "epoch": 0.55,
216
+ "learning_rate": 5.889761932974993e-05,
217
+ "loss": 2.9659,
218
+ "step": 175
219
+ },
220
+ {
221
+ "epoch": 0.56,
222
+ "learning_rate": 5.5587400098257335e-05,
223
+ "loss": 3.1799,
224
+ "step": 180
225
+ },
226
+ {
227
+ "epoch": 0.58,
228
+ "learning_rate": 5.230833438513365e-05,
229
+ "loss": 2.9959,
230
+ "step": 185
231
+ },
232
+ {
233
+ "epoch": 0.59,
234
+ "learning_rate": 4.9068272614944106e-05,
235
+ "loss": 2.8529,
236
+ "step": 190
237
+ },
238
+ {
239
+ "epoch": 0.61,
240
+ "learning_rate": 4.58749718327555e-05,
241
+ "loss": 3.0337,
242
+ "step": 195
243
+ },
244
+ {
245
+ "epoch": 0.62,
246
+ "learning_rate": 4.2736077132963006e-05,
247
+ "loss": 3.0827,
248
+ "step": 200
249
+ },
250
+ {
251
+ "epoch": 0.64,
252
+ "learning_rate": 3.9659103356138536e-05,
253
+ "loss": 2.8453,
254
+ "step": 205
255
+ },
256
+ {
257
+ "epoch": 0.65,
258
+ "learning_rate": 3.6651417097720435e-05,
259
+ "loss": 2.9619,
260
+ "step": 210
261
+ },
262
+ {
263
+ "epoch": 0.67,
264
+ "learning_rate": 3.372021907161731e-05,
265
+ "loss": 3.0061,
266
+ "step": 215
267
+ },
268
+ {
269
+ "epoch": 0.69,
270
+ "learning_rate": 3.0872526870949537e-05,
271
+ "loss": 2.8687,
272
+ "step": 220
273
+ },
274
+ {
275
+ "epoch": 0.7,
276
+ "learning_rate": 2.8115158167201102e-05,
277
+ "loss": 2.9913,
278
+ "step": 225
279
+ },
280
+ {
281
+ "epoch": 0.72,
282
+ "learning_rate": 2.5454714388004492e-05,
283
+ "loss": 2.9778,
284
+ "step": 230
285
+ },
286
+ {
287
+ "epoch": 0.73,
288
+ "learning_rate": 2.289756491263597e-05,
289
+ "loss": 3.0748,
290
+ "step": 235
291
+ },
292
+ {
293
+ "epoch": 0.75,
294
+ "learning_rate": 2.0449831823058788e-05,
295
+ "loss": 2.7658,
296
+ "step": 240
297
+ },
298
+ {
299
+ "epoch": 0.76,
300
+ "learning_rate": 1.8117375247021725e-05,
301
+ "loss": 2.9792,
302
+ "step": 245
303
+ },
304
+ {
305
+ "epoch": 0.78,
306
+ "learning_rate": 1.5905779328303487e-05,
307
+ "loss": 2.7718,
308
+ "step": 250
309
+ },
310
+ {
311
+ "epoch": 0.79,
312
+ "learning_rate": 1.3820338857691364e-05,
313
+ "loss": 2.9954,
314
+ "step": 255
315
+ },
316
+ {
317
+ "epoch": 0.81,
318
+ "learning_rate": 1.1866046596701035e-05,
319
+ "loss": 2.9246,
320
+ "step": 260
321
+ },
322
+ {
323
+ "epoch": 0.83,
324
+ "learning_rate": 1.0047581324385938e-05,
325
+ "loss": 2.9875,
326
+ "step": 265
327
+ },
328
+ {
329
+ "epoch": 0.84,
330
+ "learning_rate": 8.36929663585326e-06,
331
+ "loss": 2.673,
332
+ "step": 270
333
+ },
334
+ {
335
+ "epoch": 0.86,
336
+ "learning_rate": 6.835210519304257e-06,
337
+ "loss": 2.8515,
338
+ "step": 275
339
+ },
340
+ {
341
+ "epoch": 0.87,
342
+ "learning_rate": 5.448995736552248e-06,
343
+ "loss": 2.9416,
344
+ "step": 280
345
+ },
346
+ {
347
+ "epoch": 0.89,
348
+ "learning_rate": 4.213971030048682e-06,
349
+ "loss": 2.8573,
350
+ "step": 285
351
+ },
352
+ {
353
+ "epoch": 0.9,
354
+ "learning_rate": 3.133093177468323e-06,
355
+ "loss": 2.6045,
356
+ "step": 290
357
+ },
358
+ {
359
+ "epoch": 0.92,
360
+ "learning_rate": 2.208949912875789e-06,
361
+ "loss": 3.0414,
362
+ "step": 295
363
+ },
364
+ {
365
+ "epoch": 0.93,
366
+ "learning_rate": 1.4437537314208725e-06,
367
+ "loss": 2.7666,
368
+ "step": 300
369
+ },
370
+ {
371
+ "epoch": 0.95,
372
+ "learning_rate": 8.39336592394954e-07,
373
+ "loss": 2.7331,
374
+ "step": 305
375
+ },
376
+ {
377
+ "epoch": 0.97,
378
+ "learning_rate": 3.971455333297437e-07,
379
+ "loss": 2.847,
380
+ "step": 310
381
+ },
382
+ {
383
+ "epoch": 0.98,
384
+ "learning_rate": 1.1823920563887646e-07,
385
+ "loss": 2.7128,
386
+ "step": 315
387
+ },
388
+ {
389
+ "epoch": 1.0,
390
+ "learning_rate": 3.2853400962779e-09,
391
+ "loss": 2.6074,
392
+ "step": 320
393
+ },
394
+ {
395
+ "epoch": 1.0,
396
+ "eval_loss": 2.670438766479492,
397
+ "eval_runtime": 18.6137,
398
+ "eval_samples_per_second": 22.833,
399
+ "eval_steps_per_second": 2.901,
400
+ "step": 321
401
+ }
402
+ ],
403
+ "max_steps": 321,
404
+ "num_train_epochs": 1,
405
+ "total_flos": 334715092992000.0,
406
+ "trial_name": null,
407
+ "trial_params": null
408
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:db9354963730efbedcdb8b2504ec8c8be69bbb41ca7f3848c146dad268008e05
3
+ size 2863
vocab.json ADDED
The diff for this file is too large to render. See raw diff