CoolFace
Modelpublic

RichardErkhov/pszemraj_-_opt-125m-email-generation-awq

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes3downloads
Model Card

Quantization made by Richard Erkhov.

Github

Discord

Request more models

opt-125m-email-generation - AWQ

  • —Model creator: https://huggingface.co/pszemraj/
  • —Original model: https://huggingface.co/pszemraj/opt-125m-email-generation/

Original model description: --- license: other tags:

  • —generatedfromtrainer
  • —opt
  • —custom-license
  • —non-commercial
  • —email
  • —auto-complete
  • —125m datasets:
  • —aeslc widget:
  • —text: 'Hey <NAME>,

Thank you for signing up for my weekly newsletter. Before we get started, you''ll have to confirm your email address.' example_title: newsletter

  • —text: 'Hi <NAME>,

I hope this email finds you well. Let me start by saying that I am a big fan of your work.' example_title: fan

  • —text: 'Greetings <NAME>,

I hope you had a splendid evening at the Company sausage eating festival. I am reaching out because' example_title: festival

  • —text: 'Good Morning <NAME>,

I was just thinking to myself about how much I love creating value' example_title: value

  • —text: URGENT - I need exampletitle: URGENT parameters: minlength: 4 maxlength: 64 lengthpenalty: 0.7 norepeatngramsize: 3 dosample: false numbeams: 4 earlystopping: true repetitionpenalty: 3.5 usefast: false base_model: facebook/opt-125m ---
NOTE: there is currently a bug with huggingface API for OPT models. Please use the colab notebook to test :)

opt for email generation - 125m

Why write the rest of your email when you can generate it?

from transformers import pipeline
model_tag = "pszemraj/opt-125m-email-generation"
generator = pipeline(
              'text-generation', 
              model=model_tag, 
              use_fast=False,
              do_sample=False,
            )
            
prompt = """
Hello, 
Following up on the bubblegum shipment."""
generator(
    prompt,
    max_length=96,
) # generate

About

This model is a fine-tuned version of facebook/opt-125m on an aeslc dataset.

  • —Emails, phone numbers, etc., were attempted to be excluded in a dataset preparation step using clean-text in Python.
  • —Note that API is restricted to generating 64 tokens - you can generate longer emails by using this in a text-generation pipeline object

It achieves the following results on the evaluation set:

  • —Loss: 2.5552

Intended uses & limitations

  • —OPT models cannot be used commercially
  • —here is a GitHub gist for a script to generate emails in the console or to a text file.

Training and evaluation data

  • —the email_body field of train + validation (get more data) from the aeslc dataset.

Training results

Training LossEpochStepValidation Loss
2.82451.01292.8030
2.5212.02582.6343
2.20743.03872.5595
2.01454.05162.5552

Framework versions

  • —Transformers 4.20.1
  • —Pytorch 1.11.0+cu113
  • —Tokenizers 0.12.1