AlekseyKorshuk commited on
Commit
cbff13d
1 Parent(s): 2da42d0

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/kasta
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/4fb42a447843eee46b0b77439ecd8fd2.800x800x1.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">Каста (Kasta)</div>
22
+ <a href="https://genius.com/artists/kasta">
23
+ <div style="text-align: center; font-size: 14px;">@kasta</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 Каста (Kasta).
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/kasta).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/kasta")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/3k79xvbx/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 Каста (Kasta)'s lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/1rphmch0) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/1rphmch0/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/kasta')
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/kasta")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/kasta")
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.798671007156372, "eval_runtime": 14.7803, "eval_samples_per_second": 20.974, "eval_steps_per_second": 2.639, "epoch": 1.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3ceb793009ae679222e47bfdf19881b0cc81e692f752afa140730c7a769885f3
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:e9e32a544f9f2aeecb3ecb2b4340d16cad5293bc68beaa1af22f7c3012329c1e
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce22b96aae02342a72d32fa6b896875d50aadd63db23f34a8b4db927bc20d1a3
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9aca1f70765d22678b6811d3c02285661e257eaf875fa97d081e3cbf73b51318
3
+ size 14567
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98ff732203d181d58cdfc4e2fc4604923740c775fe8b58ca023ef5a380de4639
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,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.798671007156372,
3
+ "best_model_checkpoint": "output/kasta/checkpoint-246",
4
+ "epoch": 1.0,
5
+ "global_step": 246,
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.00013706019712792517,
13
+ "loss": 2.7165,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.04,
18
+ "learning_rate": 0.00013664135833219747,
19
+ "loss": 2.3564,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.06,
24
+ "learning_rate": 0.00013594519075178427,
25
+ "loss": 2.2801,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.08,
30
+ "learning_rate": 0.00013497453188602036,
31
+ "loss": 2.095,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.1,
36
+ "learning_rate": 0.00013373333802928601,
37
+ "loss": 2.1713,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.12,
42
+ "learning_rate": 0.0001322266681456037,
43
+ "loss": 2.0746,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.14,
48
+ "learning_rate": 0.00013046066324888032,
49
+ "loss": 2.1268,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.16,
54
+ "learning_rate": 0.00012844252137283782,
55
+ "loss": 2.1756,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.18,
60
+ "learning_rate": 0.00012618046823265178,
61
+ "loss": 2.0614,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 0.2,
66
+ "learning_rate": 0.00012368372369787862,
67
+ "loss": 1.9928,
68
+ "step": 50
69
+ },
70
+ {
71
+ "epoch": 0.22,
72
+ "learning_rate": 0.00012096246421332296,
73
+ "loss": 2.0832,
74
+ "step": 55
75
+ },
76
+ {
77
+ "epoch": 0.24,
78
+ "learning_rate": 0.00011802778132101399,
79
+ "loss": 1.9764,
80
+ "step": 60
81
+ },
82
+ {
83
+ "epoch": 0.26,
84
+ "learning_rate": 0.00011489163645235038,
85
+ "loss": 2.0674,
86
+ "step": 65
87
+ },
88
+ {
89
+ "epoch": 0.28,
90
+ "learning_rate": 0.00011156681217467561,
91
+ "loss": 2.0935,
92
+ "step": 70
93
+ },
94
+ {
95
+ "epoch": 0.3,
96
+ "learning_rate": 0.00010806686009099738,
97
+ "loss": 1.9101,
98
+ "step": 75
99
+ },
100
+ {
101
+ "epoch": 0.33,
102
+ "learning_rate": 0.00010440604560520553,
103
+ "loss": 1.9785,
104
+ "step": 80
105
+ },
106
+ {
107
+ "epoch": 0.35,
108
+ "learning_rate": 0.00010059928977791948,
109
+ "loss": 1.9156,
110
+ "step": 85
111
+ },
112
+ {
113
+ "epoch": 0.37,
114
+ "learning_rate": 9.666210850995393e-05,
115
+ "loss": 2.0267,
116
+ "step": 90
117
+ },
118
+ {
119
+ "epoch": 0.39,
120
+ "learning_rate": 9.261054930128376e-05,
121
+ "loss": 1.8933,
122
+ "step": 95
123
+ },
124
+ {
125
+ "epoch": 0.41,
126
+ "learning_rate": 8.846112584327212e-05,
127
+ "loss": 1.9379,
128
+ "step": 100
129
+ },
130
+ {
131
+ "epoch": 0.43,
132
+ "learning_rate": 8.423075071075525e-05,
133
+ "loss": 2.0375,
134
+ "step": 105
135
+ },
136
+ {
137
+ "epoch": 0.45,
138
+ "learning_rate": 7.993666642832438e-05,
139
+ "loss": 2.014,
140
+ "step": 110
141
+ },
142
+ {
143
+ "epoch": 0.47,
144
+ "learning_rate": 7.55963751917701e-05,
145
+ "loss": 1.9119,
146
+ "step": 115
147
+ },
148
+ {
149
+ "epoch": 0.49,
150
+ "learning_rate": 7.122756753113643e-05,
151
+ "loss": 1.9155,
152
+ "step": 120
153
+ },
154
+ {
155
+ "epoch": 0.51,
156
+ "learning_rate": 6.684805020614639e-05,
157
+ "loss": 1.9652,
158
+ "step": 125
159
+ },
160
+ {
161
+ "epoch": 0.53,
162
+ "learning_rate": 6.247567362788848e-05,
163
+ "loss": 1.8941,
164
+ "step": 130
165
+ },
166
+ {
167
+ "epoch": 0.55,
168
+ "learning_rate": 5.81282591025852e-05,
169
+ "loss": 1.8734,
170
+ "step": 135
171
+ },
172
+ {
173
+ "epoch": 0.57,
174
+ "learning_rate": 5.382352619398988e-05,
175
+ "loss": 1.866,
176
+ "step": 140
177
+ },
178
+ {
179
+ "epoch": 0.59,
180
+ "learning_rate": 4.957902050047381e-05,
181
+ "loss": 1.9107,
182
+ "step": 145
183
+ },
184
+ {
185
+ "epoch": 0.61,
186
+ "learning_rate": 4.541204214117672e-05,
187
+ "loss": 1.8795,
188
+ "step": 150
189
+ },
190
+ {
191
+ "epoch": 0.63,
192
+ "learning_rate": 4.1339575242702164e-05,
193
+ "loss": 1.9314,
194
+ "step": 155
195
+ },
196
+ {
197
+ "epoch": 0.65,
198
+ "learning_rate": 3.7378218713762616e-05,
199
+ "loss": 1.8708,
200
+ "step": 160
201
+ },
202
+ {
203
+ "epoch": 0.67,
204
+ "learning_rate": 3.354411858992822e-05,
205
+ "loss": 1.9518,
206
+ "step": 165
207
+ },
208
+ {
209
+ "epoch": 0.69,
210
+ "learning_rate": 2.985290222423505e-05,
211
+ "loss": 1.9226,
212
+ "step": 170
213
+ },
214
+ {
215
+ "epoch": 0.71,
216
+ "learning_rate": 2.6319614591883445e-05,
217
+ "loss": 1.9602,
218
+ "step": 175
219
+ },
220
+ {
221
+ "epoch": 0.73,
222
+ "learning_rate": 2.2958656968642224e-05,
223
+ "loss": 1.8641,
224
+ "step": 180
225
+ },
226
+ {
227
+ "epoch": 0.75,
228
+ "learning_rate": 1.9783728232897674e-05,
229
+ "loss": 1.8891,
230
+ "step": 185
231
+ },
232
+ {
233
+ "epoch": 0.77,
234
+ "learning_rate": 1.6807769030594122e-05,
235
+ "loss": 1.7877,
236
+ "step": 190
237
+ },
238
+ {
239
+ "epoch": 0.79,
240
+ "learning_rate": 1.4042909030642942e-05,
241
+ "loss": 1.8873,
242
+ "step": 195
243
+ },
244
+ {
245
+ "epoch": 0.81,
246
+ "learning_rate": 1.1500417485781092e-05,
247
+ "loss": 1.9452,
248
+ "step": 200
249
+ },
250
+ {
251
+ "epoch": 0.83,
252
+ "learning_rate": 9.190657300387505e-06,
253
+ "loss": 1.8256,
254
+ "step": 205
255
+ },
256
+ {
257
+ "epoch": 0.85,
258
+ "learning_rate": 7.123042792471594e-06,
259
+ "loss": 1.817,
260
+ "step": 210
261
+ },
262
+ {
263
+ "epoch": 0.87,
264
+ "learning_rate": 5.306001321991061e-06,
265
+ "loss": 1.9063,
266
+ "step": 215
267
+ },
268
+ {
269
+ "epoch": 0.89,
270
+ "learning_rate": 3.7469389418978793e-06,
271
+ "loss": 1.9345,
272
+ "step": 220
273
+ },
274
+ {
275
+ "epoch": 0.91,
276
+ "learning_rate": 2.4522102119145282e-06,
277
+ "loss": 1.8102,
278
+ "step": 225
279
+ },
280
+ {
281
+ "epoch": 0.93,
282
+ "learning_rate": 1.42709229807627e-06,
283
+ "loss": 1.8263,
284
+ "step": 230
285
+ },
286
+ {
287
+ "epoch": 0.96,
288
+ "learning_rate": 6.757634636067098e-07,
289
+ "loss": 1.9225,
290
+ "step": 235
291
+ },
292
+ {
293
+ "epoch": 0.98,
294
+ "learning_rate": 2.0128603879540573e-07,
295
+ "loss": 1.8347,
296
+ "step": 240
297
+ },
298
+ {
299
+ "epoch": 1.0,
300
+ "learning_rate": 5.593939290255423e-09,
301
+ "loss": 1.8634,
302
+ "step": 245
303
+ },
304
+ {
305
+ "epoch": 1.0,
306
+ "eval_loss": 1.798671007156372,
307
+ "eval_runtime": 14.7214,
308
+ "eval_samples_per_second": 21.058,
309
+ "eval_steps_per_second": 2.649,
310
+ "step": 246
311
+ }
312
+ ],
313
+ "max_steps": 246,
314
+ "num_train_epochs": 1,
315
+ "total_flos": 256588775424000.0,
316
+ "trial_name": null,
317
+ "trial_params": null
318
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e047fecf95a94d1f9df8385bfee3cd947a122d95ad40757299ed3f7c842d878
3
+ size 2671
vocab.json ADDED
The diff for this file is too large to render. See raw diff