Skip to content
The Daily Repo

raiyanyahya / how-to-train-your-gpt

Build a modern LLM from scratch. Every line commented. Explained like we are five.

Why this job: says: from scratch; topics: tutorial

What it does

This is a 12-chapter, 7,500+ line interactive textbook that teaches you how to build, train and run a modern language model from absolute scratch. The same family of architecture behind ChatGPT, Claude, LLaMA and Mistral.

Get started

python main.py
Maintenance
Active
Last commit 14 days ago
Stars
4,176
+19 this week
Licence
MIT
Allows business use
Downloads for
None listed
No release files
Latest version
None yet
No releases
Built with
Jupyter Notebook
89% of the code

Is it looked after?

Contributors
1
Last 90 days
Issues
100% closed
0 still open
Pull requests
0 merged
1 waiting
Releases
None
Never published

Similar repos

Repos similar to this one
RepoStarsLast commitLicenceDownloads for
rohitg00 / ai-engineering-from-scratch77,891todayMITNo downloads
shareAI-lab / learn-claude-code80,09613 days agoMITNo downloads
aa1143 / NamiAgent45410 days agoMITNo downloads
More: languages, topics and project record

Languages

  • Jupyter Notebook 89%
  • Python 11%

Topics

  • attention-mechanism
  • deep-learning
  • educational
  • from-scratch
  • gpt
  • language-model
  • llama
  • llm
  • machine-learning
  • natural-language-processing
  • python
  • pytorch

Project record

  • JobLists and guides
  • StatusListed
  • Commits42
  • Forks505
  • Watching26
  • Stars in 28 days+531
  • CreatedMay 3, 2026
  • First seen by usNov 7, 2026
  • CheckedNov 7, 2026

Type to search.

Try