AlekseyKorshuk commited on
Commit
29b8eef
1 Parent(s): 3c8e22b

huggingartists

Browse files
README.md ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ datasets:
4
+ - huggingartists/shadowraze
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/e2576b95c2049862de20cbd0f1a4e0d7.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">​shadowraze</div>
22
+ <a href="https://genius.com/artists/shadowraze">
23
+ <div style="text-align: center; font-size: 14px;">@shadowraze</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 ​shadowraze.
38
+
39
+ Dataset is available [here](https://huggingface.co/datasets/huggingartists/shadowraze).
40
+ And can be used with:
41
+
42
+ ```python
43
+ from datasets import load_dataset
44
+
45
+ dataset = load_dataset("huggingartists/shadowraze")
46
+ ```
47
+
48
+ [Explore the data](https://wandb.ai/huggingartists/huggingartists/runs/pkbkflsq/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 ​shadowraze's lyrics.
53
+
54
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/huggingartists/huggingartists/runs/tiu2mjo1) for full transparency and reproducibility.
55
+
56
+ At the end of training, [the final model](https://wandb.ai/huggingartists/huggingartists/runs/tiu2mjo1/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/shadowraze')
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/shadowraze")
75
+
76
+ model = AutoModelWithLMHead.from_pretrained("huggingartists/shadowraze")
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": 2.2219202518463135, "eval_runtime": 0.6935, "eval_samples_per_second": 18.744, "eval_steps_per_second": 2.884, "epoch": 10.0}
flax_model.msgpack ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:985345b96daf6ac5f42dd94aaedd34dd6f0a77a2b85c4f233339ae8287c03fb5
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:ef5fd1b9a0cdae2e43f43e0cbcb53ab610e31a3d4bca0434e4e0caeffd5fb2eb
3
+ size 995603825
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68d8e3a52e0a87bb1a65df0ae0b8eb898568a2ad057a435df8a30fa6fdfb6d97
3
+ size 510403817
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94bebe9223011a5fd94a0e0a0580d503d91c5518f98ae43a4919a88208bb5f13
3
+ size 14503
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1dc883aaedd36c1d03f1e4f08563472017baf0c4981f1d76ce326143f1a24b33
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,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 2.2219202518463135,
3
+ "best_model_checkpoint": "output/shadowraze/checkpoint-81",
4
+ "epoch": 9.0,
5
+ "global_step": 81,
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.56,
12
+ "learning_rate": 5.668773501204858e-05,
13
+ "loss": 2.801,
14
+ "step": 5
15
+ },
16
+ {
17
+ "epoch": 1.0,
18
+ "eval_loss": 2.403702974319458,
19
+ "eval_runtime": 0.5725,
20
+ "eval_samples_per_second": 22.709,
21
+ "eval_steps_per_second": 3.494,
22
+ "step": 9
23
+ },
24
+ {
25
+ "epoch": 1.11,
26
+ "learning_rate": 4.137086214086682e-06,
27
+ "loss": 2.5593,
28
+ "step": 10
29
+ },
30
+ {
31
+ "epoch": 1.67,
32
+ "learning_rate": 0.00010290000000000001,
33
+ "loss": 2.5034,
34
+ "step": 15
35
+ },
36
+ {
37
+ "epoch": 2.0,
38
+ "eval_loss": 2.3624541759490967,
39
+ "eval_runtime": 0.5663,
40
+ "eval_samples_per_second": 22.957,
41
+ "eval_steps_per_second": 3.532,
42
+ "step": 18
43
+ },
44
+ {
45
+ "epoch": 2.22,
46
+ "learning_rate": 0.0001211506487979619,
47
+ "loss": 2.4263,
48
+ "step": 20
49
+ },
50
+ {
51
+ "epoch": 2.78,
52
+ "learning_rate": 1.6049351202038163e-05,
53
+ "loss": 2.3294,
54
+ "step": 25
55
+ },
56
+ {
57
+ "epoch": 3.0,
58
+ "eval_loss": 2.2799673080444336,
59
+ "eval_runtime": 0.5719,
60
+ "eval_samples_per_second": 22.73,
61
+ "eval_steps_per_second": 3.497,
62
+ "step": 27
63
+ },
64
+ {
65
+ "epoch": 3.33,
66
+ "learning_rate": 3.4300000000000014e-05,
67
+ "loss": 2.3824,
68
+ "step": 30
69
+ },
70
+ {
71
+ "epoch": 3.89,
72
+ "learning_rate": 0.00013306291378591332,
73
+ "loss": 2.2699,
74
+ "step": 35
75
+ },
76
+ {
77
+ "epoch": 4.0,
78
+ "eval_loss": 2.2671029567718506,
79
+ "eval_runtime": 0.5765,
80
+ "eval_samples_per_second": 22.55,
81
+ "eval_steps_per_second": 3.469,
82
+ "step": 36
83
+ },
84
+ {
85
+ "epoch": 4.44,
86
+ "learning_rate": 8.051226498795145e-05,
87
+ "loss": 2.1985,
88
+ "step": 40
89
+ },
90
+ {
91
+ "epoch": 5.0,
92
+ "learning_rate": 0.0,
93
+ "loss": 2.1072,
94
+ "step": 45
95
+ },
96
+ {
97
+ "epoch": 5.0,
98
+ "eval_loss": 2.232370615005493,
99
+ "eval_runtime": 0.5566,
100
+ "eval_samples_per_second": 23.356,
101
+ "eval_steps_per_second": 3.593,
102
+ "step": 45
103
+ },
104
+ {
105
+ "epoch": 5.56,
106
+ "learning_rate": 8.051226498795124e-05,
107
+ "loss": 2.1033,
108
+ "step": 50
109
+ },
110
+ {
111
+ "epoch": 6.0,
112
+ "eval_loss": 2.2706549167633057,
113
+ "eval_runtime": 0.5754,
114
+ "eval_samples_per_second": 22.595,
115
+ "eval_steps_per_second": 3.476,
116
+ "step": 54
117
+ },
118
+ {
119
+ "epoch": 6.11,
120
+ "learning_rate": 0.00013306291378591335,
121
+ "loss": 2.0514,
122
+ "step": 55
123
+ },
124
+ {
125
+ "epoch": 6.67,
126
+ "learning_rate": 3.429999999999998e-05,
127
+ "loss": 2.0029,
128
+ "step": 60
129
+ },
130
+ {
131
+ "epoch": 7.0,
132
+ "eval_loss": 2.2322123050689697,
133
+ "eval_runtime": 0.5836,
134
+ "eval_samples_per_second": 22.275,
135
+ "eval_steps_per_second": 3.427,
136
+ "step": 63
137
+ },
138
+ {
139
+ "epoch": 7.22,
140
+ "learning_rate": 1.604935120203803e-05,
141
+ "loss": 2.0429,
142
+ "step": 65
143
+ },
144
+ {
145
+ "epoch": 7.78,
146
+ "learning_rate": 0.00012115064879796188,
147
+ "loss": 1.9633,
148
+ "step": 70
149
+ },
150
+ {
151
+ "epoch": 8.0,
152
+ "eval_loss": 2.246337652206421,
153
+ "eval_runtime": 0.582,
154
+ "eval_samples_per_second": 22.338,
155
+ "eval_steps_per_second": 3.437,
156
+ "step": 72
157
+ },
158
+ {
159
+ "epoch": 8.33,
160
+ "learning_rate": 0.00010289999999999993,
161
+ "loss": 1.9794,
162
+ "step": 75
163
+ },
164
+ {
165
+ "epoch": 8.89,
166
+ "learning_rate": 4.137086214086705e-06,
167
+ "loss": 1.8826,
168
+ "step": 80
169
+ },
170
+ {
171
+ "epoch": 9.0,
172
+ "eval_loss": 2.2219202518463135,
173
+ "eval_runtime": 0.5809,
174
+ "eval_samples_per_second": 22.378,
175
+ "eval_steps_per_second": 3.443,
176
+ "step": 81
177
+ }
178
+ ],
179
+ "max_steps": 90,
180
+ "num_train_epochs": 10,
181
+ "total_flos": 82306990080000.0,
182
+ "trial_name": null,
183
+ "trial_params": null
184
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a769f82a3e9e8a8b83ee3ad7dadef691d3a3d6fa59a136ad19205cbeaf8694e
3
+ size 2863
vocab.json ADDED
The diff for this file is too large to render. See raw diff