RichardErkhov commited on
Commit
1aabcc0
·
verified ·
1 Parent(s): 4daba2d

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +132 -0
README.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ opt-125m-email-generation - AWQ
11
+ - Model creator: https://huggingface.co/pszemraj/
12
+ - Original model: https://huggingface.co/pszemraj/opt-125m-email-generation/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: other
20
+ tags:
21
+ - generated_from_trainer
22
+ - opt
23
+ - custom-license
24
+ - non-commercial
25
+ - email
26
+ - auto-complete
27
+ - 125m
28
+ datasets:
29
+ - aeslc
30
+ widget:
31
+ - text: 'Hey <NAME>,
32
+
33
+
34
+ Thank you for signing up for my weekly newsletter. Before we get started, you''ll
35
+ have to confirm your email address.'
36
+ example_title: newsletter
37
+ - text: 'Hi <NAME>,
38
+
39
+
40
+ I hope this email finds you well. Let me start by saying that I am a big fan of
41
+ your work.'
42
+ example_title: fan
43
+ - text: 'Greetings <NAME>,
44
+
45
+
46
+ I hope you had a splendid evening at the Company sausage eating festival. I am
47
+ reaching out because'
48
+ example_title: festival
49
+ - text: 'Good Morning <NAME>,
50
+
51
+
52
+ I was just thinking to myself about how much I love creating value'
53
+ example_title: value
54
+ - text: URGENT - I need
55
+ example_title: URGENT
56
+ parameters:
57
+ min_length: 4
58
+ max_length: 64
59
+ length_penalty: 0.7
60
+ no_repeat_ngram_size: 3
61
+ do_sample: false
62
+ num_beams: 4
63
+ early_stopping: true
64
+ repetition_penalty: 3.5
65
+ use_fast: false
66
+ base_model: facebook/opt-125m
67
+ ---
68
+ > NOTE: there is currently a bug with huggingface API for OPT models. Please use the [colab notebook](https://colab.research.google.com/gist/pszemraj/033dc9a38da31ced7a0343091ba42e31/email-autocomplete-demo-125m.ipynb) to test :)
69
+
70
+ # opt for email generation - 125m
71
+
72
+ Why write the rest of your email when you can generate it?
73
+
74
+ ```
75
+ from transformers import pipeline
76
+ model_tag = "pszemraj/opt-125m-email-generation"
77
+ generator = pipeline(
78
+ 'text-generation',
79
+ model=model_tag,
80
+ use_fast=False,
81
+ do_sample=False,
82
+ )
83
+
84
+ prompt = """
85
+ Hello,
86
+ Following up on the bubblegum shipment."""
87
+ generator(
88
+ prompt,
89
+ max_length=96,
90
+ ) # generate
91
+ ```
92
+ - [colab notebook](https://colab.research.google.com/gist/pszemraj/033dc9a38da31ced7a0343091ba42e31/email-autocomplete-demo-125m.ipynb) for testing/use
93
+
94
+ ## About
95
+
96
+
97
+ This model is a fine-tuned version of [facebook/opt-125m](https://huggingface.co/facebook/opt-125m) on an `aeslc` dataset.
98
+
99
+
100
+ - Emails, phone numbers, etc., were attempted to be excluded in a dataset preparation step using [clean-text](https://pypi.org/project/clean-text/) in Python.
101
+ - Note that API is restricted to generating 64 tokens - you can generate longer emails by using this in a text-generation `pipeline` object
102
+
103
+ It achieves the following results on the evaluation set:
104
+ - Loss: 2.5552
105
+
106
+ ## Intended uses & limitations
107
+
108
+ - OPT models cannot be used commercially
109
+ - [here is a GitHub gist](https://gist.github.com/pszemraj/c1b0a76445418b6bbddd5f9633d1bb7f) for a script to generate emails in the console or to a text file.
110
+
111
+ ## Training and evaluation data
112
+
113
+ - the `email_body` field of train + validation (get more data) from the [aeslc](https://huggingface.co/datasets/aeslc) dataset.
114
+
115
+
116
+ ### Training results
117
+
118
+ | Training Loss | Epoch | Step | Validation Loss |
119
+ |:-------------:|:-----:|:----:|:---------------:|
120
+ | 2.8245 | 1.0 | 129 | 2.8030 |
121
+ | 2.521 | 2.0 | 258 | 2.6343 |
122
+ | 2.2074 | 3.0 | 387 | 2.5595 |
123
+ | 2.0145 | 4.0 | 516 | 2.5552 |
124
+
125
+
126
+ ### Framework versions
127
+
128
+ - Transformers 4.20.1
129
+ - Pytorch 1.11.0+cu113
130
+ - Tokenizers 0.12.1
131
+
132
+