AlekseyKorshuk commited on
Commit
642b122
1 Parent(s): 78c5f90

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/the-grateful-dead
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/18f21c424e2f02f0c9a59c15bac56406.736x736x1.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">The Grateful Dead</div>
22
+ <a href="https://genius.com/artists/the-grateful-dead">
23
+ <div style="text-align: center; font-size: 14px;">@the-grateful-dead</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 The Grateful Dead.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/the-grateful-dead).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/the-grateful-dead")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/2agvlyoo/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 The Grateful Dead's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/1ex4c8kc) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/1ex4c8kc/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/the-grateful-dead')
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/the-grateful-dead")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/the-grateful-dead")
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.2",
40
+ "use_cache": true,
41
+ "vocab_size": 50257
42
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
1
+ {"eval_loss": 1.695717692375183, "eval_runtime": 5.449, "eval_samples_per_second": 76.895, "eval_steps_per_second": 9.727, "epoch": 1.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7c51c7b0998de3488ef59172df098e4dee7bdb5047fbf5b52dddd5bdd3d0d1b
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:2c8aaaf20503dc3e4a605725e45a26a45eda89c3d465dbe13702be26c1695c70
3
+ size 995604017
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eff837a67b1d8769a8ca1b354c433a92c24d9ee7817db63eb9da5d8c86e9f37f
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e53a4bfd18055d42bb99396523684966df3f261e2bed8b01df911c4c411a4fe
3
+ size 14567
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8755e43df6aaa6973a6586675487231a2a59f6ae71d4d280dda1065861031fe4
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,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.695717692375183,
3
+ "best_model_checkpoint": "output/the-grateful-dead/checkpoint-289",
4
+ "epoch": 1.0,
5
+ "global_step": 289,
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.00013709869490949843,
13
+ "loss": 3.4767,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.03,
18
+ "learning_rate": 0.00013679507884269807,
19
+ "loss": 3.3233,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.05,
24
+ "learning_rate": 0.00013629004853001075,
25
+ "loss": 3.034,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.07,
30
+ "learning_rate": 0.00013558509557906132,
31
+ "loss": 3.0326,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.09,
36
+ "learning_rate": 0.00013468230206922286,
37
+ "loss": 3.0633,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.1,
42
+ "learning_rate": 0.00013358433440219266,
43
+ "loss": 2.6577,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.12,
48
+ "learning_rate": 0.00013229443542677182,
49
+ "loss": 2.9416,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.14,
54
+ "learning_rate": 0.00013081641486110732,
55
+ "loss": 2.8888,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.16,
60
+ "learning_rate": 0.00012915463804068515,
61
+ "loss": 2.6352,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 0.17,
66
+ "learning_rate": 0.00012731401302530662,
67
+ "loss": 2.9574,
68
+ "step": 50
69
+ },
70
+ {
71
+ "epoch": 0.19,
72
+ "learning_rate": 0.00012529997610312806,
73
+ "loss": 2.7793,
74
+ "step": 55
75
+ },
76
+ {
77
+ "epoch": 0.21,
78
+ "learning_rate": 0.00012311847573457732,
79
+ "loss": 2.5208,
80
+ "step": 60
81
+ },
82
+ {
83
+ "epoch": 0.22,
84
+ "learning_rate": 0.00012077595498356889,
85
+ "loss": 2.5793,
86
+ "step": 65
87
+ },
88
+ {
89
+ "epoch": 0.24,
90
+ "learning_rate": 0.00011827933248790689,
91
+ "loss": 2.5326,
92
+ "step": 70
93
+ },
94
+ {
95
+ "epoch": 0.26,
96
+ "learning_rate": 0.00011563598202508025,
97
+ "loss": 2.5729,
98
+ "step": 75
99
+ },
100
+ {
101
+ "epoch": 0.28,
102
+ "learning_rate": 0.00011285371073380224,
103
+ "loss": 2.6515,
104
+ "step": 80
105
+ },
106
+ {
107
+ "epoch": 0.29,
108
+ "learning_rate": 0.000109940736055617,
109
+ "loss": 2.59,
110
+ "step": 85
111
+ },
112
+ {
113
+ "epoch": 0.31,
114
+ "learning_rate": 0.00010690566146467614,
115
+ "loss": 2.62,
116
+ "step": 90
117
+ },
118
+ {
119
+ "epoch": 0.33,
120
+ "learning_rate": 0.00010375745105736788,
121
+ "loss": 2.5348,
122
+ "step": 95
123
+ },
124
+ {
125
+ "epoch": 0.35,
126
+ "learning_rate": 0.00010050540307684762,
127
+ "loss": 2.3504,
128
+ "step": 100
129
+ },
130
+ {
131
+ "epoch": 0.36,
132
+ "learning_rate": 9.715912245066583e-05,
133
+ "loss": 2.4245,
134
+ "step": 105
135
+ },
136
+ {
137
+ "epoch": 0.38,
138
+ "learning_rate": 9.372849242260327e-05,
139
+ "loss": 2.3522,
140
+ "step": 110
141
+ },
142
+ {
143
+ "epoch": 0.4,
144
+ "learning_rate": 9.022364536249872e-05,
145
+ "loss": 2.2091,
146
+ "step": 115
147
+ },
148
+ {
149
+ "epoch": 0.42,
150
+ "learning_rate": 8.665493284028274e-05,
151
+ "loss": 2.2353,
152
+ "step": 120
153
+ },
154
+ {
155
+ "epoch": 0.43,
156
+ "learning_rate": 8.303289505260362e-05,
157
+ "loss": 2.2043,
158
+ "step": 125
159
+ },
160
+ {
161
+ "epoch": 0.45,
162
+ "learning_rate": 7.936822969234422e-05,
163
+ "loss": 2.25,
164
+ "step": 130
165
+ },
166
+ {
167
+ "epoch": 0.47,
168
+ "learning_rate": 7.56717603529733e-05,
169
+ "loss": 2.2438,
170
+ "step": 135
171
+ },
172
+ {
173
+ "epoch": 0.48,
174
+ "learning_rate": 7.195440456104955e-05,
175
+ "loss": 2.2188,
176
+ "step": 140
177
+ },
178
+ {
179
+ "epoch": 0.5,
180
+ "learning_rate": 6.822714153129379e-05,
181
+ "loss": 2.1493,
182
+ "step": 145
183
+ },
184
+ {
185
+ "epoch": 0.52,
186
+ "learning_rate": 6.450097973946566e-05,
187
+ "loss": 2.3241,
188
+ "step": 150
189
+ },
190
+ {
191
+ "epoch": 0.54,
192
+ "learning_rate": 6.0786924408817136e-05,
193
+ "loss": 2.1267,
194
+ "step": 155
195
+ },
196
+ {
197
+ "epoch": 0.55,
198
+ "learning_rate": 5.709594500615288e-05,
199
+ "loss": 2.0304,
200
+ "step": 160
201
+ },
202
+ {
203
+ "epoch": 0.57,
204
+ "learning_rate": 5.343894284349703e-05,
205
+ "loss": 1.9702,
206
+ "step": 165
207
+ },
208
+ {
209
+ "epoch": 0.59,
210
+ "learning_rate": 4.982671888105512e-05,
211
+ "loss": 2.0854,
212
+ "step": 170
213
+ },
214
+ {
215
+ "epoch": 0.61,
216
+ "learning_rate": 4.62699418265656e-05,
217
+ "loss": 2.0528,
218
+ "step": 175
219
+ },
220
+ {
221
+ "epoch": 0.62,
222
+ "learning_rate": 4.277911662525875e-05,
223
+ "loss": 1.9738,
224
+ "step": 180
225
+ },
226
+ {
227
+ "epoch": 0.64,
228
+ "learning_rate": 3.936455343348859e-05,
229
+ "loss": 2.1449,
230
+ "step": 185
231
+ },
232
+ {
233
+ "epoch": 0.66,
234
+ "learning_rate": 3.6036337167674e-05,
235
+ "loss": 1.9034,
236
+ "step": 190
237
+ },
238
+ {
239
+ "epoch": 0.67,
240
+ "learning_rate": 3.280429771848598e-05,
241
+ "loss": 1.9098,
242
+ "step": 195
243
+ },
244
+ {
245
+ "epoch": 0.69,
246
+ "learning_rate": 2.9677980918254152e-05,
247
+ "loss": 1.9427,
248
+ "step": 200
249
+ },
250
+ {
251
+ "epoch": 0.71,
252
+ "learning_rate": 2.6666620347339532e-05,
253
+ "loss": 2.243,
254
+ "step": 205
255
+ },
256
+ {
257
+ "epoch": 0.73,
258
+ "learning_rate": 2.377911006274416e-05,
259
+ "loss": 1.9729,
260
+ "step": 210
261
+ },
262
+ {
263
+ "epoch": 0.74,
264
+ "learning_rate": 2.1023978329503206e-05,
265
+ "loss": 2.0628,
266
+ "step": 215
267
+ },
268
+ {
269
+ "epoch": 0.76,
270
+ "learning_rate": 1.8409362432444018e-05,
271
+ "loss": 1.8724,
272
+ "step": 220
273
+ },
274
+ {
275
+ "epoch": 0.78,
276
+ "learning_rate": 1.594298464270594e-05,
277
+ "loss": 2.0964,
278
+ "step": 225
279
+ },
280
+ {
281
+ "epoch": 0.8,
282
+ "learning_rate": 1.3632129410003275e-05,
283
+ "loss": 1.9228,
284
+ "step": 230
285
+ },
286
+ {
287
+ "epoch": 0.81,
288
+ "learning_rate": 1.1483621847994469e-05,
289
+ "loss": 1.797,
290
+ "step": 235
291
+ },
292
+ {
293
+ "epoch": 0.83,
294
+ "learning_rate": 9.503807576300871e-06,
295
+ "loss": 2.0553,
296
+ "step": 240
297
+ },
298
+ {
299
+ "epoch": 0.85,
300
+ "learning_rate": 7.698533978711721e-06,
301
+ "loss": 1.8949,
302
+ "step": 245
303
+ },
304
+ {
305
+ "epoch": 0.87,
306
+ "learning_rate": 6.073132932929161e-06,
307
+ "loss": 1.8748,
308
+ "step": 250
309
+ },
310
+ {
311
+ "epoch": 0.88,
312
+ "learning_rate": 4.6324050628611986e-06,
313
+ "loss": 1.9711,
314
+ "step": 255
315
+ },
316
+ {
317
+ "epoch": 0.9,
318
+ "learning_rate": 3.3806055599732885e-06,
319
+ "loss": 1.9954,
320
+ "step": 260
321
+ },
322
+ {
323
+ "epoch": 0.92,
324
+ "learning_rate": 2.3214316155753564e-06,
325
+ "loss": 1.8547,
326
+ "step": 265
327
+ },
328
+ {
329
+ "epoch": 0.93,
330
+ "learning_rate": 1.4580115011628363e-06,
331
+ "loss": 1.8839,
332
+ "step": 270
333
+ },
334
+ {
335
+ "epoch": 0.95,
336
+ "learning_rate": 7.928953290631928e-07,
337
+ "loss": 1.9188,
338
+ "step": 275
339
+ },
340
+ {
341
+ "epoch": 0.97,
342
+ "learning_rate": 3.280475206760945e-07,
343
+ "loss": 1.8588,
344
+ "step": 280
345
+ },
346
+ {
347
+ "epoch": 0.99,
348
+ "learning_rate": 6.484100455249007e-08,
349
+ "loss": 1.8212,
350
+ "step": 285
351
+ },
352
+ {
353
+ "epoch": 1.0,
354
+ "eval_loss": 1.695717692375183,
355
+ "eval_runtime": 5.4445,
356
+ "eval_samples_per_second": 76.959,
357
+ "eval_steps_per_second": 9.735,
358
+ "step": 289
359
+ }
360
+ ],
361
+ "max_steps": 289,
362
+ "num_train_epochs": 1,
363
+ "total_flos": 302053588992000.0,
364
+ "trial_name": null,
365
+ "trial_params": null
366
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69490ea38f39619c8645e1a276185a48973402f8526cf4899af60b9526d73950
3
+ size 2863
vocab.json ADDED
The diff for this file is too large to render. See raw diff