AlekseyKorshuk commited on
Commit
7824977
1 Parent(s): d252bd3

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/aikko
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/a1a40316d1405fa83df2a21923d64168.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">⁣aikko</div>
22
+ <a href="https://genius.com/artists/aikko">
23
+ <div style="text-align: center; font-size: 14px;">@aikko</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 ⁣aikko.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/aikko).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/aikko")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/1cfdpsrg/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 ⁣aikko's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/oesyn53g) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/oesyn53g/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/aikko')
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/aikko")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/aikko")
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.687872052192688, "eval_runtime": 16.7285, "eval_samples_per_second": 22.297, "eval_steps_per_second": 2.81, "epoch": 1.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a47209651b1adb8cea0a4fb74c00b75611e373043bedb74b5c3f897e6b7090c0
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:c30a036f48794ac5004544adb864662dd8ae8599771f2c44349eb40d7ef0f041
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fb5116a6827d0c8c3819e5e22fae071b486425b8718d640b28cd5dd13a4c3b52
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4632c9c10561de59e0239d17b0881ca5e504632581f921dff4c99805104275f
3
+ size 14503
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:72e17db0b83915a1c7600671c5676fc6f09267cd2339fe71b231207353cca18f
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,324 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.687872052192688,
3
+ "best_model_checkpoint": "output/aikko/checkpoint-251",
4
+ "epoch": 1.0,
5
+ "global_step": 251,
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.0001370657096871596,
13
+ "loss": 2.6148,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.04,
18
+ "learning_rate": 0.00013666336451797142,
19
+ "loss": 2.2277,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.06,
24
+ "learning_rate": 0.0001359945397419585,
25
+ "loss": 2.1213,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.08,
30
+ "learning_rate": 0.00013506185392146502,
31
+ "loss": 2.0681,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.1,
36
+ "learning_rate": 0.00013386895867954104,
37
+ "loss": 2.0275,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.12,
42
+ "learning_rate": 0.0001324205244032193,
43
+ "loss": 1.9672,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.14,
48
+ "learning_rate": 0.00013072222195815859,
49
+ "loss": 1.9337,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.16,
54
+ "learning_rate": 0.00012878070048624358,
55
+ "loss": 1.9796,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.18,
60
+ "learning_rate": 0.00012660356137306759,
61
+ "loss": 1.8898,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 0.2,
66
+ "learning_rate": 0.00012419932848721968,
67
+ "loss": 1.914,
68
+ "step": 50
69
+ },
70
+ {
71
+ "epoch": 0.22,
72
+ "learning_rate": 0.00012157741480789465,
73
+ "loss": 1.795,
74
+ "step": 55
75
+ },
76
+ {
77
+ "epoch": 0.24,
78
+ "learning_rate": 0.00011874808557148426,
79
+ "loss": 1.8209,
80
+ "step": 60
81
+ },
82
+ {
83
+ "epoch": 0.26,
84
+ "learning_rate": 0.00011572241808143707,
85
+ "loss": 1.8927,
86
+ "step": 65
87
+ },
88
+ {
89
+ "epoch": 0.28,
90
+ "learning_rate": 0.00011251225833873822,
91
+ "loss": 1.7561,
92
+ "step": 70
93
+ },
94
+ {
95
+ "epoch": 0.3,
96
+ "learning_rate": 0.00010913017466280793,
97
+ "loss": 1.8688,
98
+ "step": 75
99
+ },
100
+ {
101
+ "epoch": 0.32,
102
+ "learning_rate": 0.00010558940848440114,
103
+ "loss": 1.8271,
104
+ "step": 80
105
+ },
106
+ {
107
+ "epoch": 0.34,
108
+ "learning_rate": 0.00010190382250316192,
109
+ "loss": 1.8149,
110
+ "step": 85
111
+ },
112
+ {
113
+ "epoch": 0.36,
114
+ "learning_rate": 9.808784641280521e-05,
115
+ "loss": 1.8287,
116
+ "step": 90
117
+ },
118
+ {
119
+ "epoch": 0.38,
120
+ "learning_rate": 9.415642040642034e-05,
121
+ "loss": 1.8284,
122
+ "step": 95
123
+ },
124
+ {
125
+ "epoch": 0.4,
126
+ "learning_rate": 9.01249366830833e-05,
127
+ "loss": 1.8122,
128
+ "step": 100
129
+ },
130
+ {
131
+ "epoch": 0.42,
132
+ "learning_rate": 8.600917918478882e-05,
133
+ "loss": 1.7182,
134
+ "step": 105
135
+ },
136
+ {
137
+ "epoch": 0.44,
138
+ "learning_rate": 8.182526179964243e-05,
139
+ "loss": 1.7897,
140
+ "step": 110
141
+ },
142
+ {
143
+ "epoch": 0.46,
144
+ "learning_rate": 7.758956527325783e-05,
145
+ "loss": 1.7654,
146
+ "step": 115
147
+ },
148
+ {
149
+ "epoch": 0.48,
150
+ "learning_rate": 7.331867307536173e-05,
151
+ "loss": 1.8424,
152
+ "step": 120
153
+ },
154
+ {
155
+ "epoch": 0.5,
156
+ "learning_rate": 6.902930647269938e-05,
157
+ "loss": 1.831,
158
+ "step": 125
159
+ },
160
+ {
161
+ "epoch": 0.52,
162
+ "learning_rate": 6.473825906244161e-05,
163
+ "loss": 1.7846,
164
+ "step": 130
165
+ },
166
+ {
167
+ "epoch": 0.54,
168
+ "learning_rate": 6.046233102240582e-05,
169
+ "loss": 1.7197,
170
+ "step": 135
171
+ },
172
+ {
173
+ "epoch": 0.56,
174
+ "learning_rate": 5.621826333551266e-05,
175
+ "loss": 1.6044,
176
+ "step": 140
177
+ },
178
+ {
179
+ "epoch": 0.58,
180
+ "learning_rate": 5.202267224600086e-05,
181
+ "loss": 1.6492,
182
+ "step": 145
183
+ },
184
+ {
185
+ "epoch": 0.6,
186
+ "learning_rate": 4.78919842040151e-05,
187
+ "loss": 1.761,
188
+ "step": 150
189
+ },
190
+ {
191
+ "epoch": 0.62,
192
+ "learning_rate": 4.3842371553269784e-05,
193
+ "loss": 1.8122,
194
+ "step": 155
195
+ },
196
+ {
197
+ "epoch": 0.64,
198
+ "learning_rate": 3.98896892135827e-05,
199
+ "loss": 1.7144,
200
+ "step": 160
201
+ },
202
+ {
203
+ "epoch": 0.66,
204
+ "learning_rate": 3.604941260617706e-05,
205
+ "loss": 1.6734,
206
+ "step": 165
207
+ },
208
+ {
209
+ "epoch": 0.68,
210
+ "learning_rate": 3.2336577064784687e-05,
211
+ "loss": 1.7209,
212
+ "step": 170
213
+ },
214
+ {
215
+ "epoch": 0.7,
216
+ "learning_rate": 2.876571896976647e-05,
217
+ "loss": 1.6936,
218
+ "step": 175
219
+ },
220
+ {
221
+ "epoch": 0.72,
222
+ "learning_rate": 2.535081883571979e-05,
223
+ "loss": 1.7183,
224
+ "step": 180
225
+ },
226
+ {
227
+ "epoch": 0.74,
228
+ "learning_rate": 2.2105246575394433e-05,
229
+ "loss": 1.6964,
230
+ "step": 185
231
+ },
232
+ {
233
+ "epoch": 0.76,
234
+ "learning_rate": 1.9041709154218593e-05,
235
+ "loss": 1.6846,
236
+ "step": 190
237
+ },
238
+ {
239
+ "epoch": 0.78,
240
+ "learning_rate": 1.6172200840375557e-05,
241
+ "loss": 1.7342,
242
+ "step": 195
243
+ },
244
+ {
245
+ "epoch": 0.8,
246
+ "learning_rate": 1.350795624521122e-05,
247
+ "loss": 1.6946,
248
+ "step": 200
249
+ },
250
+ {
251
+ "epoch": 0.82,
252
+ "learning_rate": 1.1059406337826712e-05,
253
+ "loss": 1.5966,
254
+ "step": 205
255
+ },
256
+ {
257
+ "epoch": 0.84,
258
+ "learning_rate": 8.836137606066586e-06,
259
+ "loss": 1.6202,
260
+ "step": 210
261
+ },
262
+ {
263
+ "epoch": 0.86,
264
+ "learning_rate": 6.846854523794257e-06,
265
+ "loss": 1.6442,
266
+ "step": 215
267
+ },
268
+ {
269
+ "epoch": 0.88,
270
+ "learning_rate": 5.099345471401779e-06,
271
+ "loss": 1.7818,
272
+ "step": 220
273
+ },
274
+ {
275
+ "epoch": 0.9,
276
+ "learning_rate": 3.6004522429806e-06,
277
+ "loss": 1.5978,
278
+ "step": 225
279
+ },
280
+ {
281
+ "epoch": 0.92,
282
+ "learning_rate": 2.3560432595382876e-06,
283
+ "loss": 1.7863,
284
+ "step": 230
285
+ },
286
+ {
287
+ "epoch": 0.94,
288
+ "learning_rate": 1.3709905931356957e-06,
289
+ "loss": 1.7466,
290
+ "step": 235
291
+ },
292
+ {
293
+ "epoch": 0.96,
294
+ "learning_rate": 6.491508918992284e-07,
295
+ "loss": 1.6058,
296
+ "step": 240
297
+ },
298
+ {
299
+ "epoch": 0.98,
300
+ "learning_rate": 1.9335028058981832e-07,
301
+ "loss": 1.6482,
302
+ "step": 245
303
+ },
304
+ {
305
+ "epoch": 1.0,
306
+ "learning_rate": 5.373295845529613e-09,
307
+ "loss": 1.7028,
308
+ "step": 250
309
+ },
310
+ {
311
+ "epoch": 1.0,
312
+ "eval_loss": 1.687872052192688,
313
+ "eval_runtime": 16.5648,
314
+ "eval_samples_per_second": 22.518,
315
+ "eval_steps_per_second": 2.837,
316
+ "step": 251
317
+ }
318
+ ],
319
+ "max_steps": 251,
320
+ "num_train_epochs": 1,
321
+ "total_flos": 262206554112000.0,
322
+ "trial_name": null,
323
+ "trial_params": null
324
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad91c946e1e35c045b116819fe5ff8ffd04dcd221219340e1c88f141a6b7de77
3
+ size 2671
vocab.json ADDED
The diff for this file is too large to render. See raw diff