boris commited on
Commit
8238b8a
1 Parent(s): 3c263f2

New model from https://wandb.ai/wandb/huggingtweets/runs/d81ftpqp

Browse files

README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ thumbnail: https://github.com/borisdayma/huggingtweets/blob/master/img/logo.png?raw=true
4
+ tags:
5
+ - huggingtweets
6
+ widget:
7
+ - text: "My dream is"
8
+ ---
9
+
10
+ <link rel="stylesheet" href="https://unpkg.com/@tailwindcss/typography@0.2.x/dist/typography.min.css">
11
+
12
+ <style>
13
+ @media (prefers-color-scheme: dark) {
14
+ .prose { color: #E2E8F0 !important; }
15
+ .prose h2, .prose h3, .prose a, .prose thead { color: #F7FAFC !important; }
16
+ }
17
+ </style>
18
+
19
+ <section class='prose'>
20
+
21
+ <div>
22
+ <div style="width: 132px; height:132px; border-radius: 50%; background-size: cover; background-image: url('https://pbs.twimg.com/profile_images/1010627358879932416/0xVVQg3X_400x400.jpg')">
23
+ </div>
24
+ <div style="margin-top: 8px; font-size: 19px; font-weight: 800">the needle-felted head of joyce carol oates 🤖 AI Bot </div>
25
+ <div style="font-size: 15px; color: #657786">@queenofbithynia bot</div>
26
+ </div>
27
+
28
+ I was made with [huggingtweets](https://github.com/borisdayma/huggingtweets).
29
+
30
+ Create your own bot based on your favorite user with [the demo](https://colab.research.google.com/github/borisdayma/huggingtweets/blob/master/huggingtweets-demo.ipynb)!
31
+
32
+ ## How does it work?
33
+
34
+ The model uses the following pipeline.
35
+
36
+ ![pipeline](https://github.com/borisdayma/huggingtweets/blob/master/img/pipeline.png?raw=true)
37
+
38
+ To understand how the model was developed, check the [W&B report](https://app.wandb.ai/wandb/huggingtweets/reports/HuggingTweets-Train-a-model-to-generate-tweets--VmlldzoxMTY5MjI).
39
+
40
+ ## Training data
41
+
42
+ The model was trained on [@queenofbithynia's tweets](https://twitter.com/queenofbithynia).
43
+
44
+ <table style='border-width:0'>
45
+ <thead style='border-width:0'>
46
+ <tr style='border-width:0 0 1px 0; border-color: #CBD5E0'>
47
+ <th style='border-width:0'>Data</th>
48
+ <th style='border-width:0'>Quantity</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody style='border-width:0'>
52
+ <tr style='border-width:0 0 1px 0; border-color: #E2E8F0'>
53
+ <td style='border-width:0'>Tweets downloaded</td>
54
+ <td style='border-width:0'>3233</td>
55
+ </tr>
56
+ <tr style='border-width:0 0 1px 0; border-color: #E2E8F0'>
57
+ <td style='border-width:0'>Retweets</td>
58
+ <td style='border-width:0'>17</td>
59
+ </tr>
60
+ <tr style='border-width:0 0 1px 0; border-color: #E2E8F0'>
61
+ <td style='border-width:0'>Short tweets</td>
62
+ <td style='border-width:0'>29</td>
63
+ </tr>
64
+ <tr style='border-width:0'>
65
+ <td style='border-width:0'>Tweets kept</td>
66
+ <td style='border-width:0'>3187</td>
67
+ </tr>
68
+ </tbody>
69
+ </table>
70
+
71
+ [Explore the data](https://wandb.ai/wandb/huggingtweets/runs/27to9wpf/artifacts), which is tracked with [W&B artifacts](https://docs.wandb.com/artifacts) at every step of the pipeline.
72
+
73
+ ## Training procedure
74
+
75
+ The model is based on a pre-trained [GPT-2](https://huggingface.co/gpt2) which is fine-tuned on @queenofbithynia's tweets.
76
+
77
+ Hyperparameters and metrics are recorded in the [W&B training run](https://wandb.ai/wandb/huggingtweets/runs/d81ftpqp) for full transparency and reproducibility.
78
+
79
+ At the end of training, [the final model](https://wandb.ai/wandb/huggingtweets/runs/d81ftpqp/artifacts) is logged and versioned.
80
+
81
+ ## Intended uses & limitations
82
+
83
+ ### How to use
84
+
85
+ You can use this model directly with a pipeline for text generation:
86
+
87
+ <pre><code><span style="color:#03A9F4">from</span> transformers <span style="color:#03A9F4">import</span> pipeline
88
+ generator = pipeline(<span style="color:#FF9800">'text-generation'</span>,
89
+ model=<span style="color:#FF9800">'huggingtweets/queenofbithynia'</span>)
90
+ generator(<span style="color:#FF9800">"My dream is"</span>, num_return_sequences=<span style="color:#8BC34A">5</span>)</code></pre>
91
+
92
+
93
+ ### Limitations and bias
94
+
95
+ The model suffers from [the same limitations and bias as GPT-2](https://huggingface.co/gpt2#limitations-and-bias).
96
+
97
+ In addition, the data present in the user's tweets further affects the text generated by the model.
98
+
99
+ ## About
100
+
101
+ *Built by Boris Dayma*
102
+
103
+ </section>
104
+
105
+ [![Follow](https://img.shields.io/twitter/follow/borisdayma?style=social)](https://twitter.com/intent/follow?screen_name=borisdayma)
106
+
107
+ <section class='prose'>
108
+ For more details, visit the project repository.
109
+ </section>
110
+
111
+ [![GitHub stars](https://img.shields.io/github/stars/borisdayma/huggingtweets?style=social)](https://github.com/borisdayma/huggingtweets)
config.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "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": 160,
31
+ "min_length": 10,
32
+ "prefix": "<|endoftext|>",
33
+ "temperature": 1.0,
34
+ "top_p": 0.95
35
+ }
36
+ },
37
+ "use_cache": true,
38
+ "vocab_size": 50257
39
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:256c21e16884013ad278e767223c75e0613dd40998f18b9a84f5ba85adaf04e4
3
+ size 510406560
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}
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, "name_or_path": "gpt2"}
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d4949e4467633e734a96b27c9ee121cd3ff10a43a5df522628a42b449b33eeb
3
+ size 1775
vocab.json ADDED
The diff for this file is too large to render. See raw diff