AlekseyKorshuk commited on
Commit
f2c46c4
1 Parent(s): 0a022af

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/yung-lean
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/8c898f8c39dbd271b3ccfd5303d423c7.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">Yung Lean</div>
22
+ <a href="https://genius.com/artists/yung-lean">
23
+ <div style="text-align: center; font-size: 14px;">@yung-lean</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 Yung Lean.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/yung-lean).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/yung-lean")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/3mtv3swy/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 Yung Lean's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/1qh8r5pu) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/1qh8r5pu/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/yung-lean')
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/yung-lean")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/yung-lean")
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,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "resid_pdrop": 0.1,
21
+ "scale_attn_weights": true,
22
+ "summary_activation": null,
23
+ "summary_first_dropout": 0.1,
24
+ "summary_proj_to_labels": true,
25
+ "summary_type": "cls_index",
26
+ "summary_use_proj": true,
27
+ "task_specific_params": {
28
+ "text-generation": {
29
+ "do_sample": true,
30
+ "max_length": 200,
31
+ "min_length": 100,
32
+ "temperature": 1.0,
33
+ "top_p": 0.95
34
+ }
35
+ },
36
+ "torch_dtype": "float32",
37
+ "transformers_version": "4.11.3",
38
+ "use_cache": true,
39
+ "vocab_size": 50257
40
+ }
evaluation.txt ADDED
@@ -0,0 +1 @@
 
1
+ {"eval_loss": 3.4337549209594727, "eval_runtime": 0.926, "eval_samples_per_second": 75.597, "eval_steps_per_second": 9.72, "epoch": 60.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ea2bd687dcdbd5eea9e94c4e450dcc4fb341850b8a500cbf94b00059a55fe64c
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:597fb30f61ce33299ff7a984293f74986e7776f1e949b45d8f474aa24980fc58
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07d722be0b4138a98cec34cdc0088c9508369427121eb35174889cd967f3346d
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:055e64f836f6108839b4cfede0711df0727829df6e7a209dc5cae46b41b9cd33
3
+ size 14567
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:12ce1132cbb6aa5c18263e33796f9990b4148f45c42e80bbd2185f1d18ecd3d7
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,208 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 3.4337549209594727,
3
+ "best_model_checkpoint": "output/yung-lean/checkpoint-144",
4
+ "epoch": 3.0,
5
+ "global_step": 144,
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.1,
12
+ "learning_rate": 0.00013355940688336427,
13
+ "loss": 3.9118,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.21,
18
+ "learning_rate": 0.00012302403914397873,
19
+ "loss": 3.761,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 0.31,
24
+ "learning_rate": 0.00010671211798514472,
25
+ "loss": 3.6532,
26
+ "step": 15
27
+ },
28
+ {
29
+ "epoch": 0.42,
30
+ "learning_rate": 8.635498649403293e-05,
31
+ "loss": 3.4509,
32
+ "step": 20
33
+ },
34
+ {
35
+ "epoch": 0.52,
36
+ "learning_rate": 6.411334533481218e-05,
37
+ "loss": 3.5511,
38
+ "step": 25
39
+ },
40
+ {
41
+ "epoch": 0.62,
42
+ "learning_rate": 4.2347916539754844e-05,
43
+ "loss": 3.6085,
44
+ "step": 30
45
+ },
46
+ {
47
+ "epoch": 0.73,
48
+ "learning_rate": 2.3368877084135277e-05,
49
+ "loss": 3.2754,
50
+ "step": 35
51
+ },
52
+ {
53
+ "epoch": 0.83,
54
+ "learning_rate": 9.190657300387505e-06,
55
+ "loss": 3.5324,
56
+ "step": 40
57
+ },
58
+ {
59
+ "epoch": 0.94,
60
+ "learning_rate": 1.3181297643383925e-06,
61
+ "loss": 3.2119,
62
+ "step": 45
63
+ },
64
+ {
65
+ "epoch": 1.0,
66
+ "eval_loss": 3.5056326389312744,
67
+ "eval_runtime": 0.9143,
68
+ "eval_samples_per_second": 76.563,
69
+ "eval_steps_per_second": 9.844,
70
+ "step": 48
71
+ },
72
+ {
73
+ "epoch": 1.04,
74
+ "learning_rate": 5.868825097566078e-07,
75
+ "loss": 3.5151,
76
+ "step": 50
77
+ },
78
+ {
79
+ "epoch": 1.15,
80
+ "learning_rate": 7.074529930857578e-06,
81
+ "loss": 3.3697,
82
+ "step": 55
83
+ },
84
+ {
85
+ "epoch": 1.25,
86
+ "learning_rate": 2.009247481060283e-05,
87
+ "loss": 3.4438,
88
+ "step": 60
89
+ },
90
+ {
91
+ "epoch": 1.35,
92
+ "learning_rate": 3.825899585097651e-05,
93
+ "loss": 3.1986,
94
+ "step": 65
95
+ },
96
+ {
97
+ "epoch": 1.46,
98
+ "learning_rate": 5.964590321370446e-05,
99
+ "loss": 3.0037,
100
+ "step": 70
101
+ },
102
+ {
103
+ "epoch": 1.56,
104
+ "learning_rate": 8.19831960903064e-05,
105
+ "loss": 3.336,
106
+ "step": 75
107
+ },
108
+ {
109
+ "epoch": 1.67,
110
+ "learning_rate": 0.00010290000000000001,
111
+ "loss": 3.4818,
112
+ "step": 80
113
+ },
114
+ {
115
+ "epoch": 1.77,
116
+ "learning_rate": 0.00012017621079305782,
117
+ "loss": 3.2708,
118
+ "step": 85
119
+ },
120
+ {
121
+ "epoch": 1.88,
122
+ "learning_rate": 0.00013197813593027427,
123
+ "loss": 3.0245,
124
+ "step": 90
125
+ },
126
+ {
127
+ "epoch": 1.98,
128
+ "learning_rate": 0.0001370531221341682,
129
+ "loss": 3.1731,
130
+ "step": 95
131
+ },
132
+ {
133
+ "epoch": 2.0,
134
+ "eval_loss": 3.4461593627929688,
135
+ "eval_runtime": 0.9154,
136
+ "eval_samples_per_second": 76.473,
137
+ "eval_steps_per_second": 9.832,
138
+ "step": 96
139
+ },
140
+ {
141
+ "epoch": 2.08,
142
+ "learning_rate": 0.00013486251168343008,
143
+ "loss": 3.1258,
144
+ "step": 100
145
+ },
146
+ {
147
+ "epoch": 2.19,
148
+ "learning_rate": 0.0001256388154039546,
149
+ "loss": 3.0698,
150
+ "step": 105
151
+ },
152
+ {
153
+ "epoch": 2.29,
154
+ "learning_rate": 0.00011036103402999826,
155
+ "loss": 2.9638,
156
+ "step": 110
157
+ },
158
+ {
159
+ "epoch": 2.4,
160
+ "learning_rate": 9.065074731979686e-05,
161
+ "loss": 2.9622,
162
+ "step": 115
163
+ },
164
+ {
165
+ "epoch": 2.5,
166
+ "learning_rate": 6.860000000000001e-05,
167
+ "loss": 2.9506,
168
+ "step": 120
169
+ },
170
+ {
171
+ "epoch": 2.6,
172
+ "learning_rate": 4.6549252680203134e-05,
173
+ "loss": 2.9087,
174
+ "step": 125
175
+ },
176
+ {
177
+ "epoch": 2.71,
178
+ "learning_rate": 2.683896597000177e-05,
179
+ "loss": 2.9057,
180
+ "step": 130
181
+ },
182
+ {
183
+ "epoch": 2.81,
184
+ "learning_rate": 1.1561184596045404e-05,
185
+ "loss": 2.9869,
186
+ "step": 135
187
+ },
188
+ {
189
+ "epoch": 2.92,
190
+ "learning_rate": 2.337488316569914e-06,
191
+ "loss": 2.9926,
192
+ "step": 140
193
+ },
194
+ {
195
+ "epoch": 3.0,
196
+ "eval_loss": 3.4337549209594727,
197
+ "eval_runtime": 0.9131,
198
+ "eval_samples_per_second": 76.662,
199
+ "eval_steps_per_second": 9.857,
200
+ "step": 144
201
+ }
202
+ ],
203
+ "max_steps": 2880,
204
+ "num_train_epochs": 60,
205
+ "total_flos": 149328396288000.0,
206
+ "trial_name": null,
207
+ "trial_params": null
208
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ac7169a2bc4c30c8665b103238bd6f0a6372cdb36e9413b0afaa978684ac9fb
3
+ size 2863
vocab.json ADDED
The diff for this file is too large to render. See raw diff