Training log · Tiny GPT
GPT-2-style model trained from random weights on TinyStories
Every value the training program logged for the published checkpoint. The program writes one averaged line per epoch, so this run has two logged points per curve.
- 1,060,992 parameters
- 3 layers · 4 heads · 128 hidden
- 128-token context
- 3,512-token BPE vocabulary
- 270 train / 30 validation stories
- 2 epochs on a consumer-grade GPU
Training loss (mean over the epoch)Validation loss (30 held-out stories)
Training loss is averaged while the weights are still changing and with dropout on, so it sits above validation loss. The untrained point is the uniform-guess value, not a logged one.
Logged values
| Epoch | Train loss | Val loss | Val perplexity | Checkpoint |
|---|---|---|---|---|
| 1 | 7.5319 | 7.0656 | 1,171 | Saved |
| 2 | 6.6421 | 6.3688 | 583 | Saved |
The program keeps the checkpoint with the lowest validation loss, so the published weights are from epoch 2.
Independent re-check. The published weights, run in the browser on the first 100 stories of TinyStories' own validation file, score a loss of 6.346 (perplexity 570, 95% interval 552–592), within 0.4% of the logged 6.3688.
Run settings
| Program | transformer_hf_dataset_and_llm.py --generate-llm (run_generate_llm)recorded |
| Data | roneneldan/TinyStories, train split; 270 training and 30 validation stories (10% held out)recorded |
| Tokenizer | Byte-level BPE fitted on the training stories only; 3,512 tokens learnedrecorded |
| Model | GPT2LMHeadModel from random weights: 3 layers, 4 heads, 128 hidden, 128 positions, tied embeddingsrecorded |
| Optimizer | AdamW, weight decay 0.01, gradient clipping 1.0recorded |
| Batch size · LR | 8 · 2e-4 (34 optimizer steps per epoch)script defaults |
“Recorded” values come from the model card, config.json and the training code; “script defaults” are the program's defaults, consistent with the logged 270/30 split and 2 epochs, because the exact command line for this run was not saved.