AlekseyKorshuk commited on
Commit
b3c48cd
1 Parent(s): 2887721

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/face
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/1dcb4e1dc4242207c27fe5cd0d4090e8.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">FACE</div>
22
+ <a href="https://genius.com/artists/face">
23
+ <div style="text-align: center; font-size: 14px;">@face</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 FACE.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/face).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/face")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/1dmct9sw/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 FACE's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/3otnah8o) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/3otnah8o/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/face')
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/face")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/face")
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.2",
39
+ "use_cache": true,
40
+ "vocab_size": 50257
41
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
1
+ {"eval_loss": 1.7059965133666992, "eval_runtime": 8.746, "eval_samples_per_second": 22.296, "eval_steps_per_second": 2.858, "epoch": 2.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f694909ce939b2187156705b4fd647b0b2a00ad2041941dfde0b0712d3f44637
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:0da00690b0b7fc97b4a072f81e5b4b37ad550b9ade55e57f69b85532cd94a81b
3
+ size 995604017
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59bad929cfa9ab4b603c5eafc65f453980979aef78d90b079446a704b2fa1c96
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5a2448bee8c48598a482e8f0244dbeea82e24f9583900c96093b61edc578387
3
+ size 14503
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d4c9151b782acfc3e2cb37cc47d07656048381fd905bdb28d282ab7d8f1a8a1
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,350 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.7059965133666992,
3
+ "best_model_checkpoint": "output/face/checkpoint-268",
4
+ "epoch": 2.0,
5
+ "global_step": 268,
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.04,
12
+ "learning_rate": 0.00013672921035335123,
13
+ "loss": 2.5516,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.07,
18
+ "learning_rate": 0.00013532330330528217,
19
+ "loss": 2.1537,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.11,
24
+ "learning_rate": 0.00013300157583778652,
25
+ "loss": 2.0468,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.15,
30
+ "learning_rate": 0.00012979589515943672,
31
+ "loss": 2.0981,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.19,
36
+ "learning_rate": 0.00012575026130737067,
37
+ "loss": 1.9179,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.22,
42
+ "learning_rate": 0.0001209202032183722,
43
+ "loss": 2.1116,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.26,
48
+ "learning_rate": 0.00011537201655836005,
49
+ "loss": 1.9485,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.3,
54
+ "learning_rate": 0.00010918185377156764,
55
+ "loss": 1.8987,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.34,
60
+ "learning_rate": 0.00010243467883907644,
61
+ "loss": 1.9255,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 0.37,
66
+ "learning_rate": 9.522310109331633e-05,
67
+ "loss": 1.9168,
68
+ "step": 50
69
+ },
70
+ {
71
+ "epoch": 0.41,
72
+ "learning_rate": 8.764610409518253e-05,
73
+ "loss": 1.8695,
74
+ "step": 55
75
+ },
76
+ {
77
+ "epoch": 0.45,
78
+ "learning_rate": 7.980768702075116e-05,
79
+ "loss": 1.8724,
80
+ "step": 60
81
+ },
82
+ {
83
+ "epoch": 0.49,
84
+ "learning_rate": 7.181543720543789e-05,
85
+ "loss": 1.854,
86
+ "step": 65
87
+ },
88
+ {
89
+ "epoch": 0.52,
90
+ "learning_rate": 6.377905343835293e-05,
91
+ "loss": 1.833,
92
+ "step": 70
93
+ },
94
+ {
95
+ "epoch": 0.56,
96
+ "learning_rate": 5.580884027559068e-05,
97
+ "loss": 1.8861,
98
+ "step": 75
99
+ },
100
+ {
101
+ "epoch": 0.6,
102
+ "learning_rate": 4.8014194038976637e-05,
103
+ "loss": 1.9461,
104
+ "step": 80
105
+ },
106
+ {
107
+ "epoch": 0.63,
108
+ "learning_rate": 4.0502101280915654e-05,
109
+ "loss": 1.8331,
110
+ "step": 85
111
+ },
112
+ {
113
+ "epoch": 0.67,
114
+ "learning_rate": 3.337567032488183e-05,
115
+ "loss": 1.8838,
116
+ "step": 90
117
+ },
118
+ {
119
+ "epoch": 0.71,
120
+ "learning_rate": 2.673271603710427e-05,
121
+ "loss": 1.8553,
122
+ "step": 95
123
+ },
124
+ {
125
+ "epoch": 0.75,
126
+ "learning_rate": 2.0664417254371463e-05,
127
+ "loss": 1.7774,
128
+ "step": 100
129
+ },
130
+ {
131
+ "epoch": 0.78,
132
+ "learning_rate": 1.5254065295624607e-05,
133
+ "loss": 1.7757,
134
+ "step": 105
135
+ },
136
+ {
137
+ "epoch": 0.82,
138
+ "learning_rate": 1.0575920734825916e-05,
139
+ "loss": 1.7125,
140
+ "step": 110
141
+ },
142
+ {
143
+ "epoch": 0.86,
144
+ "learning_rate": 6.6941941266328415e-06,
145
+ "loss": 1.848,
146
+ "step": 115
147
+ },
148
+ {
149
+ "epoch": 0.9,
150
+ "learning_rate": 3.66216467507622e-06,
151
+ "loss": 1.8553,
152
+ "step": 120
153
+ },
154
+ {
155
+ "epoch": 0.93,
156
+ "learning_rate": 1.5214489420839643e-06,
157
+ "loss": 1.9048,
158
+ "step": 125
159
+ },
160
+ {
161
+ "epoch": 0.97,
162
+ "learning_rate": 3.014296332977907e-07,
163
+ "loss": 1.587,
164
+ "step": 130
165
+ },
166
+ {
167
+ "epoch": 1.0,
168
+ "eval_loss": 1.7584949731826782,
169
+ "eval_runtime": 8.5759,
170
+ "eval_samples_per_second": 22.738,
171
+ "eval_steps_per_second": 2.915,
172
+ "step": 134
173
+ },
174
+ {
175
+ "epoch": 1.01,
176
+ "learning_rate": 1.885230146662962e-08,
177
+ "loss": 1.6643,
178
+ "step": 135
179
+ },
180
+ {
181
+ "epoch": 1.04,
182
+ "learning_rate": 6.775955029229377e-07,
183
+ "loss": 1.839,
184
+ "step": 140
185
+ },
186
+ {
187
+ "epoch": 1.08,
188
+ "learning_rate": 2.268617561892799e-06,
189
+ "loss": 1.7973,
190
+ "step": 145
191
+ },
192
+ {
193
+ "epoch": 1.12,
194
+ "learning_rate": 4.7700806733338495e-06,
195
+ "loss": 1.6847,
196
+ "step": 150
197
+ },
198
+ {
199
+ "epoch": 1.16,
200
+ "learning_rate": 8.147650640909638e-06,
201
+ "loss": 1.9368,
202
+ "step": 155
203
+ },
204
+ {
205
+ "epoch": 1.19,
206
+ "learning_rate": 1.235496813600306e-05,
207
+ "loss": 1.7733,
208
+ "step": 160
209
+ },
210
+ {
211
+ "epoch": 1.23,
212
+ "learning_rate": 1.7334285009434683e-05,
213
+ "loss": 1.7367,
214
+ "step": 165
215
+ },
216
+ {
217
+ "epoch": 1.27,
218
+ "learning_rate": 2.3017256922096845e-05,
219
+ "loss": 1.856,
220
+ "step": 170
221
+ },
222
+ {
223
+ "epoch": 1.31,
224
+ "learning_rate": 2.932588141513589e-05,
225
+ "loss": 1.8208,
226
+ "step": 175
227
+ },
228
+ {
229
+ "epoch": 1.34,
230
+ "learning_rate": 3.6173568544064456e-05,
231
+ "loss": 1.6543,
232
+ "step": 180
233
+ },
234
+ {
235
+ "epoch": 1.38,
236
+ "learning_rate": 4.3466329381658294e-05,
237
+ "loss": 1.7295,
238
+ "step": 185
239
+ },
240
+ {
241
+ "epoch": 1.42,
242
+ "learning_rate": 5.110406607666898e-05,
243
+ "loss": 1.7178,
244
+ "step": 190
245
+ },
246
+ {
247
+ "epoch": 1.46,
248
+ "learning_rate": 5.898194576146263e-05,
249
+ "loss": 1.7418,
250
+ "step": 195
251
+ },
252
+ {
253
+ "epoch": 1.49,
254
+ "learning_rate": 6.699183945081632e-05,
255
+ "loss": 1.6734,
256
+ "step": 200
257
+ },
258
+ {
259
+ "epoch": 1.53,
260
+ "learning_rate": 7.502380618205647e-05,
261
+ "loss": 1.7512,
262
+ "step": 205
263
+ },
264
+ {
265
+ "epoch": 1.57,
266
+ "learning_rate": 8.296760202575751e-05,
267
+ "loss": 1.7607,
268
+ "step": 210
269
+ },
270
+ {
271
+ "epoch": 1.6,
272
+ "learning_rate": 9.071419325485517e-05,
273
+ "loss": 1.6486,
274
+ "step": 215
275
+ },
276
+ {
277
+ "epoch": 1.64,
278
+ "learning_rate": 9.815725290295059e-05,
279
+ "loss": 1.7547,
280
+ "step": 220
281
+ },
282
+ {
283
+ "epoch": 1.68,
284
+ "learning_rate": 0.00010519462017057694,
285
+ "loss": 1.773,
286
+ "step": 225
287
+ },
288
+ {
289
+ "epoch": 1.72,
290
+ "learning_rate": 0.00011172970264813468,
291
+ "loss": 1.7159,
292
+ "step": 230
293
+ },
294
+ {
295
+ "epoch": 1.75,
296
+ "learning_rate": 0.00011767280210908074,
297
+ "loss": 1.6116,
298
+ "step": 235
299
+ },
300
+ {
301
+ "epoch": 1.79,
302
+ "learning_rate": 0.00012294234567600346,
303
+ "loss": 1.6329,
304
+ "step": 240
305
+ },
306
+ {
307
+ "epoch": 1.83,
308
+ "learning_rate": 0.0001274660054610349,
309
+ "loss": 1.6289,
310
+ "step": 245
311
+ },
312
+ {
313
+ "epoch": 1.87,
314
+ "learning_rate": 0.00013118169131281192,
315
+ "loss": 1.7835,
316
+ "step": 250
317
+ },
318
+ {
319
+ "epoch": 1.9,
320
+ "learning_rate": 0.00013403840304389384,
321
+ "loss": 1.7385,
322
+ "step": 255
323
+ },
324
+ {
325
+ "epoch": 1.94,
326
+ "learning_rate": 0.00013599693044126453,
327
+ "loss": 1.6406,
328
+ "step": 260
329
+ },
330
+ {
331
+ "epoch": 1.98,
332
+ "learning_rate": 0.0001370303914518231,
333
+ "loss": 1.7128,
334
+ "step": 265
335
+ },
336
+ {
337
+ "epoch": 2.0,
338
+ "eval_loss": 1.7059965133666992,
339
+ "eval_runtime": 8.588,
340
+ "eval_samples_per_second": 22.706,
341
+ "eval_steps_per_second": 2.911,
342
+ "step": 268
343
+ }
344
+ ],
345
+ "max_steps": 268,
346
+ "num_train_epochs": 2,
347
+ "total_flos": 278798598144000.0,
348
+ "trial_name": null,
349
+ "trial_params": null
350
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ff20da1bf81cef2f82cade2d05f960ab574b870297377eb2bc6103395307a13
3
+ size 2671
vocab.json ADDED
The diff for this file is too large to render. See raw diff