mav23 commited on
Commit
5ede214
1 Parent(s): 22edf8d

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitattributes +1 -0
  2. README.md +172 -0
  3. distilgpt2-emailgen.Q4_0.gguf +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ distilgpt2-emailgen.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - generated_from_trainer
5
+ - distilgpt2
6
+ - email generation
7
+ - email
8
+ datasets:
9
+ - aeslc
10
+ - postbot/multi_emails
11
+ widget:
12
+ - text: 'Good Morning Professor Beans,
13
+
14
+ Hope you are doing well. I just wanted to reach out and ask if differential calculus
15
+ will be on the exam'
16
+ example_title: email to prof
17
+ - text: 'Hey <NAME>,
18
+
19
+
20
+ Thank you for signing up for my weekly newsletter. Before we get started, you''ll
21
+ have to confirm your email address.'
22
+ example_title: newsletter
23
+ - text: 'Hi <NAME>,
24
+
25
+
26
+ I hope this email finds you well. I wanted to reach out and ask about office hours'
27
+ example_title: office hours
28
+ - text: 'Greetings <NAME>,
29
+
30
+
31
+ I hope you had a splendid evening at the Company sausage eating festival. I am
32
+ reaching out because'
33
+ example_title: festival
34
+ - text: 'Good Morning Harold,
35
+
36
+
37
+ I was wondering when the next'
38
+ example_title: event
39
+ - text: URGENT - I need the TPS reports
40
+ example_title: URGENT
41
+ - text: 'Hi Archibald,
42
+
43
+
44
+ I hope this email finds you extremely well.'
45
+ example_title: emails that find you
46
+ - text: 'Hello there.
47
+
48
+
49
+ I just wanted to reach out and check in to'
50
+ example_title: checking in
51
+ - text: 'Hello <NAME>,
52
+
53
+
54
+ I hope this email finds you well. I wanted to reach out and see if you''ve enjoyed
55
+ your time with us'
56
+ example_title: work well
57
+ - text: 'Hi <NAME>,
58
+
59
+
60
+ I hope this email finds you well. I wanted to reach out and see if we could catch
61
+ up'
62
+ example_title: catch up
63
+ - text: I'm <NAME> and I just moved into the area and wanted to reach out and get
64
+ some details on where I could get groceries and
65
+ example_title: grocery
66
+ parameters:
67
+ min_length: 4
68
+ max_length: 128
69
+ length_penalty: 0.8
70
+ no_repeat_ngram_size: 2
71
+ do_sample: false
72
+ num_beams: 8
73
+ early_stopping: true
74
+ repetition_penalty: 5.5
75
+ base_model: distilgpt2
76
+ ---
77
+
78
+
79
+ # distilgpt2-emailgen
80
+
81
+ Why write the rest of your email when you can generate it?
82
+
83
+ ```python
84
+ from transformers import pipeline
85
+
86
+ model_tag = "postbot/distilgpt2-emailgen"
87
+ generator = pipeline(
88
+ 'text-generation',
89
+ model=model_tag,
90
+ )
91
+
92
+ prompt = """
93
+ Hello,
94
+
95
+ Following up on the bubblegum shipment."""
96
+
97
+ result = generator(
98
+ prompt,
99
+ max_length=64,
100
+ do_sample=False,
101
+ early_stopping=True,
102
+ ) # generate
103
+ print(result[0]['generated_text'])
104
+ ```
105
+
106
+ - try it in a [Google Colab](https://colab.research.google.com/gist/pszemraj/91df57e0c2caf1d5273b78576ad2853e/postbot-distilgpt2-emailgen-demo.ipynb) notebook
107
+ - Use it in bash/cmd [with this gist](https://gist.github.com/pszemraj/c1b0a76445418b6bbddd5f9633d1bb7f) :)
108
+
109
+ > For this model, formatting matters. The results may be (significantly) different between the structure outlined above and `prompt = "Hey, just wanted to ..."` etc.
110
+
111
+ ## Model description
112
+
113
+ This model is a fine-tuned version of [distilgpt2](https://huggingface.co/distilgpt2) on a dataset of 50k emails, including the classic `aeslc` dataset.
114
+
115
+ It achieves the following results on the evaluation set:
116
+ - Loss: 2.6247
117
+
118
+
119
+ ## Intended uses & limitations
120
+
121
+ The intended use of this model is to provide suggestions to "autocomplete" the rest of your email. Said another way, it should serve as a **tool to write predictable emails faster**. It is not intended to write entire emails; at least **some input** is required to guide the direction of the model.
122
+
123
+ Please verify any suggestions by the model for A) False claims and B) negation statements before accepting/sending something.
124
+
125
+ ## Training procedure
126
+
127
+ ### Training hyperparameters
128
+
129
+ The following hyperparameters were used during training:
130
+ - learning_rate: 6e-05
131
+ - train_batch_size: 8
132
+ - eval_batch_size: 8
133
+ - seed: 42
134
+ - distributed_type: multi-GPU
135
+ - gradient_accumulation_steps: 32
136
+ - total_train_batch_size: 256
137
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
138
+ - lr_scheduler_type: cosine
139
+ - lr_scheduler_warmup_ratio: 0.02
140
+ - num_epochs: 5
141
+
142
+ ### Training results
143
+
144
+ | Training Loss | Epoch | Step | Validation Loss |
145
+ |:-------------:|:-----:|:----:|:---------------:|
146
+ | 2.8299 | 1.0 | 248 | 2.7971 |
147
+ | 2.6984 | 2.0 | 496 | 2.6826 |
148
+ | 2.7022 | 3.0 | 744 | 2.6361 |
149
+ | 2.6436 | 4.0 | 992 | 2.6245 |
150
+ | 2.6195 | 5.0 | 1240 | 2.6247 |
151
+
152
+
153
+ ### Framework versions
154
+
155
+ - Transformers 4.21.1
156
+ - Pytorch 1.12.0+cu113
157
+ - Datasets 2.4.0
158
+ - Tokenizers 0.12.1
159
+
160
+ # [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
161
+ Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_postbot__distilgpt2-emailgen)
162
+
163
+ | Metric | Value |
164
+ |-----------------------|---------------------------|
165
+ | Avg. | 24.89 |
166
+ | ARC (25-shot) | 21.76 |
167
+ | HellaSwag (10-shot) | 27.52 |
168
+ | MMLU (5-shot) | 25.97 |
169
+ | TruthfulQA (0-shot) | 46.17 |
170
+ | Winogrande (5-shot) | 51.62 |
171
+ | GSM8K (5-shot) | 0.0 |
172
+ | DROP (3-shot) | 1.16 |
distilgpt2-emailgen.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3cfb63e6be94bd207eaf8251c35e9bba31dc52d725b581b242e7059a1430f50c
3
+ size 82423872