AlekseyKorshuk commited on
Commit
bc4aa5d
1 Parent(s): 5cb5875

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/muse
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/26f575585ec649d88d09a1e402bb936b.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">Muse</div>
22
+ <a href="https://genius.com/artists/muse">
23
+ <div style="text-align: center; font-size: 14px;">@muse</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 Muse.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/muse).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/muse")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/3w58rwod/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 Muse's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/3j03atcr) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/3j03atcr/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/muse')
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/muse")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/muse")
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.3",
39
+ "use_cache": true,
40
+ "vocab_size": 50257
41
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
1
+ {"eval_loss": 2.3269803524017334, "eval_runtime": 2.0389, "eval_samples_per_second": 20.6, "eval_steps_per_second": 2.943, "epoch": 100.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b056be70daa0c9b157c0e26ac48b2f06c4e5212c52b9f67a36a83f017417f67d
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:e13d67d67e40251ee94e84a5741483ffc44566e986b76e3c0e77d65319fd10b3
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5f36b4aa1dea8901090d21c164984bd0ab489dc6a881344c90af543c12dcfee
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:82f87ce21bae77d6d5460bfce067ada28ee1585e023f4af7e6e79850f7cfa5b9
3
+ size 14567
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94ddf4d086675f377d675c419847ad97dc0ca3884a3889ded4e2611e2e9cf05c
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,320 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 2.3269803524017334,
3
+ "best_model_checkpoint": "output/muse/checkpoint-200",
4
+ "epoch": 8.0,
5
+ "global_step": 200,
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.2,
12
+ "learning_rate": 0.0001240985658141214,
13
+ "loss": 3.1279,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.4,
18
+ "learning_rate": 8.97985658141214e-05,
19
+ "loss": 2.8709,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.6,
24
+ "learning_rate": 4.740143418587861e-05,
25
+ "loss": 2.8349,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.8,
30
+ "learning_rate": 1.3101434185878613e-05,
31
+ "loss": 2.5989,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 1.0,
36
+ "learning_rate": 0.0,
37
+ "loss": 2.849,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 1.0,
42
+ "eval_loss": 2.7842092514038086,
43
+ "eval_runtime": 1.8206,
44
+ "eval_samples_per_second": 23.069,
45
+ "eval_steps_per_second": 3.296,
46
+ "step": 25
47
+ },
48
+ {
49
+ "epoch": 1.2,
50
+ "learning_rate": 1.3101434185878598e-05,
51
+ "loss": 2.4736,
52
+ "step": 30
53
+ },
54
+ {
55
+ "epoch": 1.4,
56
+ "learning_rate": 4.74014341858786e-05,
57
+ "loss": 2.628,
58
+ "step": 35
59
+ },
60
+ {
61
+ "epoch": 1.6,
62
+ "learning_rate": 8.979856581412138e-05,
63
+ "loss": 2.6224,
64
+ "step": 40
65
+ },
66
+ {
67
+ "epoch": 1.8,
68
+ "learning_rate": 0.0001240985658141214,
69
+ "loss": 2.6052,
70
+ "step": 45
71
+ },
72
+ {
73
+ "epoch": 2.0,
74
+ "learning_rate": 0.0001372,
75
+ "loss": 2.4193,
76
+ "step": 50
77
+ },
78
+ {
79
+ "epoch": 2.0,
80
+ "eval_loss": 2.6401476860046387,
81
+ "eval_runtime": 1.8685,
82
+ "eval_samples_per_second": 22.478,
83
+ "eval_steps_per_second": 3.211,
84
+ "step": 50
85
+ },
86
+ {
87
+ "epoch": 2.2,
88
+ "learning_rate": 0.00012409856581412136,
89
+ "loss": 2.1791,
90
+ "step": 55
91
+ },
92
+ {
93
+ "epoch": 2.4,
94
+ "learning_rate": 8.979856581412141e-05,
95
+ "loss": 2.2449,
96
+ "step": 60
97
+ },
98
+ {
99
+ "epoch": 2.6,
100
+ "learning_rate": 4.7401434185878625e-05,
101
+ "loss": 2.1171,
102
+ "step": 65
103
+ },
104
+ {
105
+ "epoch": 2.8,
106
+ "learning_rate": 1.310143418587862e-05,
107
+ "loss": 2.1624,
108
+ "step": 70
109
+ },
110
+ {
111
+ "epoch": 3.0,
112
+ "learning_rate": 0.0,
113
+ "loss": 2.2355,
114
+ "step": 75
115
+ },
116
+ {
117
+ "epoch": 3.0,
118
+ "eval_loss": 2.5702805519104004,
119
+ "eval_runtime": 1.8707,
120
+ "eval_samples_per_second": 22.451,
121
+ "eval_steps_per_second": 3.207,
122
+ "step": 75
123
+ },
124
+ {
125
+ "epoch": 3.2,
126
+ "learning_rate": 1.310143418587859e-05,
127
+ "loss": 2.1067,
128
+ "step": 80
129
+ },
130
+ {
131
+ "epoch": 3.4,
132
+ "learning_rate": 4.740143418587858e-05,
133
+ "loss": 2.1021,
134
+ "step": 85
135
+ },
136
+ {
137
+ "epoch": 3.6,
138
+ "learning_rate": 8.979856581412137e-05,
139
+ "loss": 2.0876,
140
+ "step": 90
141
+ },
142
+ {
143
+ "epoch": 3.8,
144
+ "learning_rate": 0.00012409856581412136,
145
+ "loss": 2.0067,
146
+ "step": 95
147
+ },
148
+ {
149
+ "epoch": 4.0,
150
+ "learning_rate": 0.0001372,
151
+ "loss": 1.8774,
152
+ "step": 100
153
+ },
154
+ {
155
+ "epoch": 4.0,
156
+ "eval_loss": 2.4998016357421875,
157
+ "eval_runtime": 1.8837,
158
+ "eval_samples_per_second": 22.296,
159
+ "eval_steps_per_second": 3.185,
160
+ "step": 100
161
+ },
162
+ {
163
+ "epoch": 4.2,
164
+ "learning_rate": 0.00012409856581412142,
165
+ "loss": 1.8595,
166
+ "step": 105
167
+ },
168
+ {
169
+ "epoch": 4.4,
170
+ "learning_rate": 8.97985658141213e-05,
171
+ "loss": 1.8355,
172
+ "step": 110
173
+ },
174
+ {
175
+ "epoch": 4.6,
176
+ "learning_rate": 4.740143418587876e-05,
177
+ "loss": 1.8151,
178
+ "step": 115
179
+ },
180
+ {
181
+ "epoch": 4.8,
182
+ "learning_rate": 1.3101434185878628e-05,
183
+ "loss": 1.6825,
184
+ "step": 120
185
+ },
186
+ {
187
+ "epoch": 5.0,
188
+ "learning_rate": 0.0,
189
+ "loss": 1.828,
190
+ "step": 125
191
+ },
192
+ {
193
+ "epoch": 5.0,
194
+ "eval_loss": 2.455634355545044,
195
+ "eval_runtime": 1.8736,
196
+ "eval_samples_per_second": 22.417,
197
+ "eval_steps_per_second": 3.202,
198
+ "step": 125
199
+ },
200
+ {
201
+ "epoch": 5.2,
202
+ "learning_rate": 1.3101434185878583e-05,
203
+ "loss": 1.7296,
204
+ "step": 130
205
+ },
206
+ {
207
+ "epoch": 5.4,
208
+ "learning_rate": 4.740143418587856e-05,
209
+ "loss": 1.5323,
210
+ "step": 135
211
+ },
212
+ {
213
+ "epoch": 5.6,
214
+ "learning_rate": 8.979856581412136e-05,
215
+ "loss": 1.7239,
216
+ "step": 140
217
+ },
218
+ {
219
+ "epoch": 5.8,
220
+ "learning_rate": 0.00012409856581412136,
221
+ "loss": 1.7961,
222
+ "step": 145
223
+ },
224
+ {
225
+ "epoch": 6.0,
226
+ "learning_rate": 0.0001372,
227
+ "loss": 1.5753,
228
+ "step": 150
229
+ },
230
+ {
231
+ "epoch": 6.0,
232
+ "eval_loss": 2.415633201599121,
233
+ "eval_runtime": 1.8716,
234
+ "eval_samples_per_second": 22.44,
235
+ "eval_steps_per_second": 3.206,
236
+ "step": 150
237
+ },
238
+ {
239
+ "epoch": 6.2,
240
+ "learning_rate": 0.00012409856581412142,
241
+ "loss": 1.5374,
242
+ "step": 155
243
+ },
244
+ {
245
+ "epoch": 6.4,
246
+ "learning_rate": 8.979856581412144e-05,
247
+ "loss": 1.5005,
248
+ "step": 160
249
+ },
250
+ {
251
+ "epoch": 6.6,
252
+ "learning_rate": 4.740143418587866e-05,
253
+ "loss": 1.3827,
254
+ "step": 165
255
+ },
256
+ {
257
+ "epoch": 6.8,
258
+ "learning_rate": 1.3101434185878644e-05,
259
+ "loss": 1.5368,
260
+ "step": 170
261
+ },
262
+ {
263
+ "epoch": 7.0,
264
+ "learning_rate": 0.0,
265
+ "loss": 1.4028,
266
+ "step": 175
267
+ },
268
+ {
269
+ "epoch": 7.0,
270
+ "eval_loss": 2.395447254180908,
271
+ "eval_runtime": 1.8726,
272
+ "eval_samples_per_second": 22.429,
273
+ "eval_steps_per_second": 3.204,
274
+ "step": 175
275
+ },
276
+ {
277
+ "epoch": 7.2,
278
+ "learning_rate": 1.3101434185878574e-05,
279
+ "loss": 1.4826,
280
+ "step": 180
281
+ },
282
+ {
283
+ "epoch": 7.4,
284
+ "learning_rate": 4.7401434185878544e-05,
285
+ "loss": 1.3107,
286
+ "step": 185
287
+ },
288
+ {
289
+ "epoch": 7.6,
290
+ "learning_rate": 8.979856581412133e-05,
291
+ "loss": 1.3342,
292
+ "step": 190
293
+ },
294
+ {
295
+ "epoch": 7.8,
296
+ "learning_rate": 0.00012409856581412136,
297
+ "loss": 1.3195,
298
+ "step": 195
299
+ },
300
+ {
301
+ "epoch": 8.0,
302
+ "learning_rate": 0.0001372,
303
+ "loss": 1.2922,
304
+ "step": 200
305
+ },
306
+ {
307
+ "epoch": 8.0,
308
+ "eval_loss": 2.3269803524017334,
309
+ "eval_runtime": 1.8745,
310
+ "eval_samples_per_second": 22.406,
311
+ "eval_steps_per_second": 3.201,
312
+ "step": 200
313
+ }
314
+ ],
315
+ "max_steps": 2500,
316
+ "num_train_epochs": 100,
317
+ "total_flos": 209033625600000.0,
318
+ "trial_name": null,
319
+ "trial_params": null
320
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6271ac7a629656367a6532235ac16fadc9c75e5013ae73d36e2e159560675238
3
+ size 2671
vocab.json ADDED
The diff for this file is too large to render. See raw diff