Instructions to use deva-penumaka/distilgpt2-email-continuation-subject-and-body with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deva-penumaka/distilgpt2-email-continuation-subject-and-body with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deva-penumaka/distilgpt2-email-continuation-subject-and-body")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deva-penumaka/distilgpt2-email-continuation-subject-and-body") model = AutoModelForCausalLM.from_pretrained("deva-penumaka/distilgpt2-email-continuation-subject-and-body", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deva-penumaka/distilgpt2-email-continuation-subject-and-body with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deva-penumaka/distilgpt2-email-continuation-subject-and-body" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deva-penumaka/distilgpt2-email-continuation-subject-and-body", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/deva-penumaka/distilgpt2-email-continuation-subject-and-body
- SGLang
How to use deva-penumaka/distilgpt2-email-continuation-subject-and-body 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 "deva-penumaka/distilgpt2-email-continuation-subject-and-body" \ --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": "deva-penumaka/distilgpt2-email-continuation-subject-and-body", "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 "deva-penumaka/distilgpt2-email-continuation-subject-and-body" \ --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": "deva-penumaka/distilgpt2-email-continuation-subject-and-body", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use deva-penumaka/distilgpt2-email-continuation-subject-and-body with Docker Model Runner:
docker model run hf.co/deva-penumaka/distilgpt2-email-continuation-subject-and-body
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("deva-penumaka/distilgpt2-email-continuation-subject-and-body")
model = AutoModelForCausalLM.from_pretrained("deva-penumaka/distilgpt2-email-continuation-subject-and-body", device_map="auto")This model is a fine-tuned version of distilbert/distilgpt2 for generating an email continuation using both the email subject and an incomplete email body.
Limitations
The model may:
Generate inaccurate or fabricated information Produce repetitive text Produce inappropriate or biased content Continue an email in a way that does not match the writer's intention Include names, facts, or commitments that were not present in the input
This model should not automatically send email or make decisions without human review.
Training data considerations
The model inherits limitations and biases from its base model and training dataset. Users should review the dataset and evaluate the model for their specific use case.
- Downloads last month
- 35
Model tree for deva-penumaka/distilgpt2-email-continuation-subject-and-body
Base model
distilbert/distilgpt2
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deva-penumaka/distilgpt2-email-continuation-subject-and-body")