GPT-2 Fine-tuned on Waiting for Godot
A GPT-2 Medium model fine-tuned on Samuel Beckett's "Waiting for Godot" for generating absurdist theatrical dialogue and prose.
Model Description
This model is part of the Deepstory project, which combines Natural Language Generation, Text-to-Speech, and animation technologies to create interactive storytelling experiences.
The model has been fine-tuned on the complete text of "Waiting for Godot" to capture the distinctive absurdist dialogue style, circular conversations, and existential themes of Beckett's masterpiece.
Model Architecture
This model is based on GPT-2 Medium architecture.
| Parameter | Value |
|---|---|
| Architecture | GPT2LMHeadModel |
| Model Size | GPT-2 Medium |
| Number of Layers (n_layer) | 24 |
| Hidden Size (n_embd) | 1024 |
| Attention Heads (n_head) | 16 |
| Context Length (n_ctx) | 1024 |
| Max Positions (n_positions) | 1024 |
| Vocabulary Size | 50,257 |
| Activation Function | GELU (new) |
| Attention Dropout | 0.1 |
| Embedding Dropout | 0.1 |
| Residual Dropout | 0.1 |
| Layer Norm Epsilon | 1e-05 |
Usage
With Transformers Library
from transformers import GPT2Tokenizer, GPT2LMHeadModel
import torch
# Load model and tokenizer
tokenizer = GPT2Tokenizer.from_pretrained("thetobysiu/gpt2-waiting-for-godot")
model = GPT2LMHeadModel.from_pretrained("thetobysiu/gpt2-waiting-for-godot")
# Generate dialogue
prompt = "VLADIMIR: What do we do now?\nESTRAGON:"
input_ids = tokenizer.encode(prompt, return_tensors='pt')
output = model.generate(
input_ids=input_ids,
max_length=200,
temperature=0.9,
top_p=0.95,
top_k=50,
do_sample=True,
num_return_sequences=1
)
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
Generation Parameters
For best results when generating Beckett-style dialogue:
| Parameter | Recommended Value | Description |
|---|---|---|
| temperature | 0.8 - 1.0 | Higher for more absurd outputs |
| top_p | 0.9 - 0.95 | Nucleus sampling threshold |
| top_k | 40 - 50 | Top-k sampling |
| max_length | 100 - 300 | Maximum tokens to generate |
| do_sample | True | Enable sampling |
Character Format
The model works best when prompted with the character name format used in the play:
VLADIMIR:orDIDI:ESTRAGON:orGOGO:POZZO:LUCKY:BOY:
Training Data
The model was fine-tuned on the complete text of "Waiting for Godot" (En attendant Godot) by Samuel Beckett, including both Act I and Act II.
Training Procedure
The model was fine-tuned using the Hugging Face Transformers library starting from the pre-trained GPT-2 Medium checkpoint.
Intended Use
This model is intended for:
- Experimental theater and creative writing
- Generating absurdist dialogue
- Exploring AI-generated dramatic text
- Research in language models and literary style
- Educational purposes in studying Beckett's style
Characteristics of Generated Text
The model tends to generate text with:
- Circular, repetitive dialogue patterns
- Existential themes and philosophical musings
- Short, punchy exchanges between characters
- References to waiting, time, and uncertainty
- The distinctive rhythm of Beckett's prose
Limitations
- The model is trained on a relatively small corpus (single play)
- Generated dialogue may become repetitive
- Context length is limited to 1024 tokens
- May not capture all nuances of Beckett's theatrical timing
- The training data is based on copyrighted material
Ethical Considerations
- This model is trained on copyrighted material and should be used for personal/research purposes
- Generated content should not be presented as original work by Samuel Beckett
- The model may generate text touching on existential and nihilistic themes
Citation
If you use this model, please cite the Deepstory project:
@misc{deepstory,
author = {Siu King Wai},
title = {Deepstory},
year = {2020},
publisher = {GitHub},
url = {https://github.com/thetobysiu/deepstory}
}
License
This model is released under the MIT License. Please note that "Waiting for Godot" is the intellectual property of the Samuel Beckett estate.
Acknowledgments
- OpenAI for the original GPT-2 model
- Hugging Face for the Transformers library
- Samuel Beckett for the original play "Waiting for Godot"
- Downloads last month
- 15