roneneldan/TinyStories
Viewer • Updated • 2.14M • 116k • 1.19k
A 5.9M-parameter GPT-style language model trained from scratch (random init, no pretrained weights)
on 19,800 TinyStories plus 3,000 short synthetic stories about two characters, Momo the monkey and
Ella the elephant (1,000 unique stories, each repeated 3 times, generated by momo_stories.py), as a learning project.
Use case: a bedtime story starter for young kids.
The full build, explained step by step, is in tiny_llm_from_scratch.ipynb in this repo.
Load with plain PyTorch: GPT(cfg).load_state_dict(torch.load("model.pt")).