NLP
Collection
4 items
โข
Updated
This model is a fine-tuned version of distilbert/distilgpt2 on the shakespeare-lines dataset. It achieves the following results on the evaluation set:
The training and evaluation data was taken from the shakespeare-lines dataset. The dataset was shuffled with a seed of 24, and split into training and evaluation with a ratio of 80:20.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("benchaffe/shakespeare-distilgpt2")
tokenizer = AutoTokenizer.from_pretrained("benchaffe/shakespeare-distilgpt2")
prompt = "What light through yonder window breaks"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_length=80,
temperature=0.8,
top_p=0.95,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The following hyperparameters were used during training:
Training Loss | Epoch | Step | Validation Loss |
---|---|---|---|
3.9479 | 1.0 | 22941 | 4.2781 |
3.7527 | 2.0 | 45882 | 4.2111 |
3.5778 | 3.0 | 68823 | 4.2035 |
3.4214 | 4.0 | 91764 | 4.2129 |
3.3513 | 5.0 | 114705 | 4.2490 |
Base model
distilbert/distilgpt2