AlekseyKorshuk commited on
Commit
3957926
1 Parent(s): 218ebcd

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/the-the-pigs
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/2f1fd1b951237ad3387096f392d41fa5.720x720x1.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">The ‘’Вепри’’ (The Pigs)</div>
22
+ <a href="https://genius.com/artists/the-the-pigs">
23
+ <div style="text-align: center; font-size: 14px;">@the-the-pigs</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 The ‘’Вепри’’ (The Pigs).
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/the-the-pigs).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/the-the-pigs")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/s5khturf/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 The ‘’Вепри’’ (The Pigs)'s lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/2wm2oonn) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/2wm2oonn/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/the-the-pigs')
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/the-the-pigs")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/the-the-pigs")
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.7347867488861084, "eval_runtime": 0.9361, "eval_samples_per_second": 20.297, "eval_steps_per_second": 3.205, "epoch": 20.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c02c32ea8cbf7c2e61290b1d72ca0369e968b66bb1edd7b4464b23c5092af01b
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:8d794e2cf1e854660cf8c67241054d968e9933fc96e0ac960005808d8e19da9a
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f13a43a42b8448df12dbb6b75830224c036b3bcb9c128c9833c197779081b8a6
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70c1257d23e86fa50a3c449eb97c44e917eeff6eada6271ca3edb44fa461f708
3
+ size 14567
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8eb138d3e74e4ee9a8cfdbf6948246533add92d0858995ee833af706c95c53c
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,226 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 1.7347867488861084,
3
+ "best_model_checkpoint": "output/the-the-pigs/checkpoint-117",
4
+ "epoch": 9.0,
5
+ "global_step": 117,
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.38,
12
+ "learning_rate": 9.292589525111794e-05,
13
+ "loss": 2.5049,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 0.77,
18
+ "learning_rate": 1.725216267546246e-05,
19
+ "loss": 2.2501,
20
+ "step": 10
21
+ },
22
+ {
23
+ "epoch": 1.0,
24
+ "eval_loss": 1.966219425201416,
25
+ "eval_runtime": 0.848,
26
+ "eval_samples_per_second": 22.405,
27
+ "eval_steps_per_second": 3.538,
28
+ "step": 13
29
+ },
30
+ {
31
+ "epoch": 1.15,
32
+ "learning_rate": 7.857716640189785e-06,
33
+ "loss": 2.2537,
34
+ "step": 15
35
+ },
36
+ {
37
+ "epoch": 1.54,
38
+ "learning_rate": 7.686881626551516e-05,
39
+ "loss": 2.1305,
40
+ "step": 20
41
+ },
42
+ {
43
+ "epoch": 1.92,
44
+ "learning_rate": 0.00013520660867542716,
45
+ "loss": 2.0792,
46
+ "step": 25
47
+ },
48
+ {
49
+ "epoch": 2.0,
50
+ "eval_loss": 1.9108868837356567,
51
+ "eval_runtime": 0.8428,
52
+ "eval_samples_per_second": 22.544,
53
+ "eval_steps_per_second": 3.56,
54
+ "step": 26
55
+ },
56
+ {
57
+ "epoch": 2.31,
58
+ "learning_rate": 0.00010756924162575734,
59
+ "loss": 2.1293,
60
+ "step": 30
61
+ },
62
+ {
63
+ "epoch": 2.69,
64
+ "learning_rate": 2.9630758374242683e-05,
65
+ "loss": 2.0062,
66
+ "step": 35
67
+ },
68
+ {
69
+ "epoch": 3.0,
70
+ "eval_loss": 1.830873966217041,
71
+ "eval_runtime": 0.8441,
72
+ "eval_samples_per_second": 22.51,
73
+ "eval_steps_per_second": 3.554,
74
+ "step": 39
75
+ },
76
+ {
77
+ "epoch": 3.08,
78
+ "learning_rate": 1.9933913245728396e-06,
79
+ "loss": 1.9324,
80
+ "step": 40
81
+ },
82
+ {
83
+ "epoch": 3.46,
84
+ "learning_rate": 6.033118373448485e-05,
85
+ "loss": 1.9227,
86
+ "step": 45
87
+ },
88
+ {
89
+ "epoch": 3.85,
90
+ "learning_rate": 0.00012934228335981018,
91
+ "loss": 1.9492,
92
+ "step": 50
93
+ },
94
+ {
95
+ "epoch": 4.0,
96
+ "eval_loss": 1.8247166872024536,
97
+ "eval_runtime": 0.8513,
98
+ "eval_samples_per_second": 22.319,
99
+ "eval_steps_per_second": 3.524,
100
+ "step": 52
101
+ },
102
+ {
103
+ "epoch": 4.23,
104
+ "learning_rate": 0.00011994783732453755,
105
+ "loss": 1.8601,
106
+ "step": 55
107
+ },
108
+ {
109
+ "epoch": 4.62,
110
+ "learning_rate": 4.42741047488822e-05,
111
+ "loss": 1.7486,
112
+ "step": 60
113
+ },
114
+ {
115
+ "epoch": 5.0,
116
+ "learning_rate": 0.0,
117
+ "loss": 1.8994,
118
+ "step": 65
119
+ },
120
+ {
121
+ "epoch": 5.0,
122
+ "eval_loss": 1.7911409139633179,
123
+ "eval_runtime": 0.8376,
124
+ "eval_samples_per_second": 22.685,
125
+ "eval_steps_per_second": 3.582,
126
+ "step": 65
127
+ },
128
+ {
129
+ "epoch": 5.38,
130
+ "learning_rate": 4.4274104748882125e-05,
131
+ "loss": 1.7558,
132
+ "step": 70
133
+ },
134
+ {
135
+ "epoch": 5.77,
136
+ "learning_rate": 0.00011994783732453749,
137
+ "loss": 1.8425,
138
+ "step": 75
139
+ },
140
+ {
141
+ "epoch": 6.0,
142
+ "eval_loss": 1.780040979385376,
143
+ "eval_runtime": 0.8465,
144
+ "eval_samples_per_second": 22.444,
145
+ "eval_steps_per_second": 3.544,
146
+ "step": 78
147
+ },
148
+ {
149
+ "epoch": 6.15,
150
+ "learning_rate": 0.00012934228335981018,
151
+ "loss": 1.72,
152
+ "step": 80
153
+ },
154
+ {
155
+ "epoch": 6.54,
156
+ "learning_rate": 6.033118373448493e-05,
157
+ "loss": 1.7991,
158
+ "step": 85
159
+ },
160
+ {
161
+ "epoch": 6.92,
162
+ "learning_rate": 1.9933913245728244e-06,
163
+ "loss": 1.7086,
164
+ "step": 90
165
+ },
166
+ {
167
+ "epoch": 7.0,
168
+ "eval_loss": 1.7639576196670532,
169
+ "eval_runtime": 0.8412,
170
+ "eval_samples_per_second": 22.587,
171
+ "eval_steps_per_second": 3.566,
172
+ "step": 91
173
+ },
174
+ {
175
+ "epoch": 7.31,
176
+ "learning_rate": 2.963075837424261e-05,
177
+ "loss": 1.6218,
178
+ "step": 95
179
+ },
180
+ {
181
+ "epoch": 7.69,
182
+ "learning_rate": 0.00010756924162575728,
183
+ "loss": 1.6723,
184
+ "step": 100
185
+ },
186
+ {
187
+ "epoch": 8.0,
188
+ "eval_loss": 1.7437282800674438,
189
+ "eval_runtime": 0.8437,
190
+ "eval_samples_per_second": 22.521,
191
+ "eval_steps_per_second": 3.556,
192
+ "step": 104
193
+ },
194
+ {
195
+ "epoch": 8.08,
196
+ "learning_rate": 0.0001352066086754272,
197
+ "loss": 1.7365,
198
+ "step": 105
199
+ },
200
+ {
201
+ "epoch": 8.46,
202
+ "learning_rate": 7.68688162655152e-05,
203
+ "loss": 1.6506,
204
+ "step": 110
205
+ },
206
+ {
207
+ "epoch": 8.85,
208
+ "learning_rate": 7.85771664018977e-06,
209
+ "loss": 1.5713,
210
+ "step": 115
211
+ },
212
+ {
213
+ "epoch": 9.0,
214
+ "eval_loss": 1.7347867488861084,
215
+ "eval_runtime": 0.851,
216
+ "eval_samples_per_second": 22.327,
217
+ "eval_steps_per_second": 3.525,
218
+ "step": 117
219
+ }
220
+ ],
221
+ "max_steps": 260,
222
+ "num_train_epochs": 20,
223
+ "total_flos": 115229786112000.0,
224
+ "trial_name": null,
225
+ "trial_params": null
226
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:115de7483970d263e0616e850a6e0d52e43c047dc3d58f7fce41ea06d8252d5f
3
+ size 2671
vocab.json ADDED
The diff for this file is too large to render. See raw diff