This model is a fine‑tuned version of GPT‑2 small (124M parameters) on the Abirate/english_quotes dataset.
The goal is to generate text in the style of philosophical or literary quotes, including the author’s name.
⚠️ This model was created for educational and research purposes only. It is not intended for production use.
It demonstrates full fine‑tuning of a causal language model on a small dataset and the improvements in generation quality compared to the base model.
Base model: gpt2 Task: Causal language modelling (text generation) Fine‑tuning type: Full fine‑tuning (all parameters updated)
Intended Uses & Limitations
Direct Use (Research / Experimentation)
You can use this model to generate short quotes given a prompt. The model expects prompts to start with the special token <|startoftext|> and will learn to produce a quote followed by an author and the <|endoftext|> token.
The special tokens help the model learn where a quote starts and ends.
Training Procedure
The model was trained for 5 epochs using the Hugging Face Trainer with the following hyperparameters:
Hyperparameter
Value
Learning rate
5e-5
Batch size (per device)
8
Gradient accumulation
2
Effective batch size
16
Warmup steps
100
Weight decay
0.01
Optimizer
AdamW
Precision
fp16
Max sequence length
128
Training steps
1410
Hardware: NVIDIA Tesla T4 (15 GB VRAM) on Google Colab / Kaggle. Training time: ~5 minutes.
Evaluation Results
The final training loss was 2.506, corresponding to a perplexity of 12.26.
Validation loss stagnated around 2.30, indicating a slight overfitting after 3‑4 epochs – acceptable for a small generative model.