Text Generation
Transformers
PyTorch
ONNX
Safetensors
gpt2
text generation
emailgen
email generation
email
text-generation-inference
Instructions to use postbot/gpt2-medium-emailgen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use postbot/gpt2-medium-emailgen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="postbot/gpt2-medium-emailgen")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("postbot/gpt2-medium-emailgen") model = AutoModelForCausalLM.from_pretrained("postbot/gpt2-medium-emailgen") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use postbot/gpt2-medium-emailgen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "postbot/gpt2-medium-emailgen" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "postbot/gpt2-medium-emailgen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/postbot/gpt2-medium-emailgen
- SGLang
How to use postbot/gpt2-medium-emailgen with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "postbot/gpt2-medium-emailgen" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "postbot/gpt2-medium-emailgen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "postbot/gpt2-medium-emailgen" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "postbot/gpt2-medium-emailgen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use postbot/gpt2-medium-emailgen with Docker Model Runner:
docker model run hf.co/postbot/gpt2-medium-emailgen
Librarian Bot: Add base_model information to model
#4
by librarian-bot - opened
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
| 3 |
- apache-2.0
|
| 4 |
tags:
|
| 5 |
- text generation
|
|
@@ -9,42 +9,72 @@ tags:
|
|
| 9 |
datasets:
|
| 10 |
- aeslc
|
| 11 |
- postbot/multi-emails-100k
|
| 12 |
-
|
| 13 |
widget:
|
| 14 |
-
- text:
|
| 15 |
-
|
| 16 |
-
Hope you are doing well. I just wanted to reach out and ask if differential calculus
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
example_title:
|
| 30 |
-
- text:
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
example_title:
|
| 36 |
-
- text:
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
parameters:
|
| 39 |
min_length: 32
|
| 40 |
max_length: 128
|
| 41 |
no_repeat_ngram_size: 2
|
| 42 |
-
do_sample:
|
| 43 |
temperature: 0.3
|
| 44 |
top_k: 20
|
| 45 |
top_p: 0.95
|
| 46 |
repetition_penalty: 3.5
|
| 47 |
length_penalty: 0.9
|
|
|
|
| 48 |
---
|
| 49 |
|
| 50 |
|
|
|
|
| 1 |
---
|
| 2 |
+
license:
|
| 3 |
- apache-2.0
|
| 4 |
tags:
|
| 5 |
- text generation
|
|
|
|
| 9 |
datasets:
|
| 10 |
- aeslc
|
| 11 |
- postbot/multi-emails-100k
|
|
|
|
| 12 |
widget:
|
| 13 |
+
- text: 'Good Morning Professor Beans,
|
| 14 |
+
|
| 15 |
+
Hope you are doing well. I just wanted to reach out and ask if differential calculus
|
| 16 |
+
will be on the exam'
|
| 17 |
+
example_title: email to prof
|
| 18 |
+
- text: 'Hey <NAME>,
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
Thank you for signing up for my weekly newsletter. Before we get started, you''ll
|
| 22 |
+
have to confirm your email address.'
|
| 23 |
+
example_title: newsletter
|
| 24 |
+
- text: 'Hi <NAME>,
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
I hope this email finds you well. I wanted to reach out and ask about office hours'
|
| 28 |
+
example_title: office hours
|
| 29 |
+
- text: 'Greetings <NAME>,
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
I hope you had a splendid evening at the Company sausage eating festival. I am
|
| 33 |
+
reaching out because'
|
| 34 |
+
example_title: festival
|
| 35 |
+
- text: 'Good Morning Harold,
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
I was wondering when the next'
|
| 39 |
+
example_title: event
|
| 40 |
+
- text: URGENT - I need the TPS reports
|
| 41 |
+
example_title: URGENT
|
| 42 |
+
- text: 'Hi Archibald,
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
I hope this email finds you extremely well.'
|
| 46 |
+
example_title: emails that find you
|
| 47 |
+
- text: 'Hello there.
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
I just wanted to reach out and check in to'
|
| 51 |
+
example_title: checking in
|
| 52 |
+
- text: 'Hello <NAME>,
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
I hope this email finds you well. I wanted to reach out and see if you''ve enjoyed
|
| 56 |
+
your time with us'
|
| 57 |
+
example_title: work well
|
| 58 |
+
- text: 'Hi <NAME>,
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
I hope this email finds you well. I wanted to reach out and see if we could catch
|
| 62 |
+
up'
|
| 63 |
+
example_title: catch up
|
| 64 |
+
- text: I'm <NAME> and I just moved into the area and wanted to reach out and get
|
| 65 |
+
some details on where I could get groceries and
|
| 66 |
+
example_title: grocery
|
| 67 |
parameters:
|
| 68 |
min_length: 32
|
| 69 |
max_length: 128
|
| 70 |
no_repeat_ngram_size: 2
|
| 71 |
+
do_sample: true
|
| 72 |
temperature: 0.3
|
| 73 |
top_k: 20
|
| 74 |
top_p: 0.95
|
| 75 |
repetition_penalty: 3.5
|
| 76 |
length_penalty: 0.9
|
| 77 |
+
base_model: gpt2-medium
|
| 78 |
---
|
| 79 |
|
| 80 |
|