pszemraj commited on
Commit
cc5499a
1 Parent(s): 37b28f8

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +70 -23
README.md CHANGED
@@ -34,40 +34,87 @@ parameters:
34
  use_fast: False
35
  ---
36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
- # opt-125m-emailgen-v2_DS-aeslc_Ep-4_Bs-8
39
 
40
- This model is a fine-tuned version of [facebook/opt-125m](https://huggingface.co/facebook/opt-125m) on an unknown dataset.
41
- It achieves the following results on the evaluation set:
42
- - Loss: 2.5552
43
 
44
- ## Model description
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
- More information needed
47
 
48
- ## Intended uses & limitations
49
 
50
- More information needed
51
 
52
- ## Training and evaluation data
53
 
54
- More information needed
 
55
 
56
- ## Training procedure
 
 
 
 
 
 
 
57
 
58
- ### Training hyperparameters
59
 
60
- The following hyperparameters were used during training:
61
- - learning_rate: 0.0004
62
- - train_batch_size: 8
63
- - eval_batch_size: 8
64
- - seed: 42
65
- - distributed_type: multi-GPU
66
- - gradient_accumulation_steps: 16
67
- - total_train_batch_size: 128
68
- - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
69
- - lr_scheduler_type: cosine
70
- - num_epochs: 4
71
 
72
  ### Training results
73
 
 
34
  use_fast: False
35
  ---
36
 
37
+ ---
38
+ license: other
39
+ tags:
40
+ - generated_from_trainer
41
+ - opt
42
+ - custom-license
43
+ - no-commercial
44
+ - email
45
+ - auto-complete
46
+ - 125m
47
+ datasets:
48
+ - aeslc
49
+
50
+ widget:
51
+ - text: "Hey <NAME>,\n\nThank you for signing up for my weekly newsletter. Before we get started, you'll have to confirm your email address."
52
+ example_title: "newsletter"
53
+ - text: "Hi <NAME>,\n\nI hope this email finds you well. Let me start by saying that I am a big fan of your work."
54
+ example_title: "fan"
55
+ - text: "Greetings <NAME>,\n\nI hope you had a splendid evening at the Company sausage eating festival. I am reaching out because"
56
+ example_title: "festival"
57
+ - text: "Good Morning <NAME>,\n\nI was just thinking to myself about how much I love creating value"
58
+ example_title: "value"
59
+ - text: "URGENT - I need"
60
+ example_title: "URGENT"
61
+ parameters:
62
+ min_length: 4
63
+ max_length: 64
64
+ length_penalty: 0.7
65
+ no_repeat_ngram_size: 3
66
+ do_sample: False
67
+ num_beams: 4
68
+ early_stopping: True
69
+ repetition_penalty: 3.5
70
+ use_fast: False
71
+ ---
72
+ > 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 :)
73
 
74
+ # opt for email generation - 125m
75
 
76
+ Why write the rest of your email when you can generate it?
 
 
77
 
78
+ ```
79
+ from transformers import pipeline
80
+ model_tag = "pszemraj/opt-125m-email-generation"
81
+ generator = pipeline(
82
+ 'text-generation',
83
+ model=model_tag,
84
+ use_fast=False,
85
+ do_sample=False,
86
+ )
87
+
88
+ prompt = """
89
+ Hello,
90
+ Following up on the bubblegum shipment."""
91
+ generator(
92
+ prompt,
93
+ max_length=96,
94
+ ) # generate
95
+ ```
96
+ - [colab notebook](https://colab.research.google.com/gist/pszemraj/033dc9a38da31ced7a0343091ba42e31/email-autocomplete-demo-125m.ipynb) for testing/use
97
 
98
+ ## About
99
 
 
100
 
101
+ This model is a fine-tuned version of [facebook/opt-125m](https://huggingface.co/facebook/opt-125m) on an `aeslc` dataset.
102
 
 
103
 
104
+ - 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.
105
+ - Note that API is restricted to generating 64 tokens - you can generate longer emails by using this in a text-generation `pipeline` object
106
 
107
+ It achieves the following results on the evaluation set:
108
+ - Loss: 2.5552
109
+
110
+ ## Intended uses & limitations
111
+
112
+ - OPT models cannot be used commercially
113
+
114
+ ## Training and evaluation data
115
 
116
+ - the `email_body` field of train + validation (get more data) from the [aeslc](https://huggingface.co/datasets/aeslc) dataset.
117
 
 
 
 
 
 
 
 
 
 
 
 
118
 
119
  ### Training results
120