Text Generation
Transformers
PyTorch
Safetensors
gpt2
Generated from Trainer
distilgpt2
email generation
email
text-generation-inference
Run this model with HF Jobs
Run postbot/distilgpt2-emailgen on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/postbot/distilgpt2-emailgen. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/postbot/distilgpt2-emailgen on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/postbot/distilgpt2-emailgen. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/postbot/distilgpt2-emailgen. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use postbot/distilgpt2-emailgen with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use postbot/distilgpt2-emailgen with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="postbot/distilgpt2-emailgen")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("postbot/distilgpt2-emailgen") model = AutoModelForCausalLM.from_pretrained("postbot/distilgpt2-emailgen", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use postbot/distilgpt2-emailgen with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "postbot/distilgpt2-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/distilgpt2-emailgen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/postbot/distilgpt2-emailgen
- SGLang
How to use postbot/distilgpt2-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/distilgpt2-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/distilgpt2-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/distilgpt2-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/distilgpt2-emailgen", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use postbot/distilgpt2-emailgen with Docker Model Runner:
docker model run hf.co/postbot/distilgpt2-emailgen
Librarian Bot: Add base_model information to model
#2
by librarian-bot - opened
7 unmodified lines891011121314151617181920212223242526272829303132333435363738394041424344454647487 unmodified linesdatasets:- aeslc- postbot/multi_emailswidget:- text: "Good Morning Professor Beans,Hope you are doing well. I just wanted to reach out and ask if differential calculus will be on the exam"example_title: "email to prof"- 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."example_title: "newsletter"- text: "Hi <NAME>,\n\nI hope this email finds you well. I wanted to reach out and ask about office hours"example_title: "office hours"- text: "Greetings <NAME>,\n\nI hope you had a splendid evening at the Company sausage eating festival. I am reaching out because"example_title: "festival"- text: "Good Morning Harold,\n\nI was wondering when the next"example_title: "event"- text: "URGENT - I need the TPS reports"example_title: "URGENT"- text: "Hi Archibald,\n\nI hope this email finds you extremely well."example_title: "emails that find you"- text: "Hello there.\n\nI just wanted to reach out and check in to"example_title: "checking in"- text: "Hello <NAME>,\n\nI hope this email finds you well. I wanted to reach out and see if you've enjoyed your time with us"example_title: "work well"- text: "Hi <NAME>,\n\nI hope this email finds you well. I wanted to reach out and see if we could catch up"example_title: "catch up"- text: "I'm <NAME> and I just moved into the area and wanted to reach out and get some details on where I could get groceries and"example_title: "grocery"parameters:min_length: 4max_length: 128length_penalty: 0.8no_repeat_ngram_size: 2do_sample: Falsenum_beams: 8early_stopping: Truerepetition_penalty: 5.5---7 unmodified lines891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787 unmodified linesdatasets:- aeslc- postbot/multi_emailswidget:- text: 'Good Morning Professor Beans,Hope you are doing well. I just wanted to reach out and ask if differential calculuswill be on the exam'example_title: email to prof- text: 'Hey <NAME>,Thank you for signing up for my weekly newsletter. Before we get started, you''llhave to confirm your email address.'example_title: newsletter- text: 'Hi <NAME>,I hope this email finds you well. I wanted to reach out and ask about office hours'example_title: office hours- text: 'Greetings <NAME>,I hope you had a splendid evening at the Company sausage eating festival. I amreaching out because'example_title: festival- text: 'Good Morning Harold,I was wondering when the next'example_title: event- text: URGENT - I need the TPS reportsexample_title: URGENT- text: 'Hi Archibald,I hope this email finds you extremely well.'example_title: emails that find you- text: 'Hello there.I just wanted to reach out and check in to'example_title: checking in- text: 'Hello <NAME>,I hope this email finds you well. I wanted to reach out and see if you''ve enjoyedyour time with us'example_title: work well- text: 'Hi <NAME>,I hope this email finds you well. I wanted to reach out and see if we could catchup'example_title: catch up- text: I'm <NAME> and I just moved into the area and wanted to reach out and getsome details on where I could get groceries andexample_title: groceryparameters:min_length: 4max_length: 128length_penalty: 0.8no_repeat_ngram_size: 2do_sample: falsenum_beams: 8early_stopping: truerepetition_penalty: 5.5base_model: distilgpt2---
README.md+57-27