Views
No views yet
1from transformers import pipeline
2
3model_tag = "postbot/gpt2-medium-emailgen"
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'])aeslc dataset| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.8701 | 1.0 | 789 | 1.8378 |
| 1.5065 | 2.0 | 1578 | 1.6176 |
| 1.1873 | 3.0 | 2367 | 1.5840 |
| Metric | Value |
|---|---|
| Avg. | 25.97 |
| ARC (25-shot) | 26.45 |
| HellaSwag (10-shot) | 34.31 |
| MMLU (5-shot) | 24.1 |
| TruthfulQA (0-shot) | 43.96 |
| Winogrande (5-shot) | 50.43 |
| GSM8K (5-shot) | 0.0 |
| DROP (3-shot) | 2.53 |