1from transformers import pipeline
2
3model_tag = "postbot/distilgpt2-emailgen-V2"
4generator = pipeline(
5 'text-generation',
6 model=model_tag,
7 )
8
9prompt = """
10Hello,
11
12Following up on the bubblegum shipment."""
13
14result = generator(
15 prompt,
16 max_length=64,
17 do_sample=False,
18 early_stopping=True,
19) # generate
20print(result[0]['generated_text'])distilgpt2 on the postbot/multi-emails-100k dataset.
It achieves the following results on the evaluation set:| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.9045 | 1.0 | 789 | 2.0006 |
| 1.8115 | 2.0 | 1578 | 1.9557 |
| 1.8501 | 3.0 | 2367 | 1.9110 |
| 1.7376 | 4.0 | 3156 | 1.9126 |
| Metric | Value |
|---|---|
| Avg. | 24.59 |
| ARC (25-shot) | 20.99 |
| HellaSwag (10-shot) | 26.78 |
| MMLU (5-shot) | 25.53 |
| TruthfulQA (0-shot) | 46.51 |
| Winogrande (5-shot) | 52.01 |
| GSM8K (5-shot) | 0.0 |
| DROP (3-shot) | 0.31 |