Skip to content
Day 69: new resources are added every day. See what's new

Course

How to Train Your GPT

A commented, from-scratch guide to building a modern language model, explained simply.

  • Rating

    4.5 / 5

  • Pricing

    Free

  • Difficulty

    Intermediate

  • Works on

    Cross-Platform, Web

Built with love by Shushant Lakhyani. Building bestproductivityresources.com

What is How to Train Your GPT?

How to Train Your GPT is a free, open-source, twelve-chapter guide to building a modern language model from scratch. Every line is commented, covering tokenisation, attention, RoPE and training loops in plain language so you can learn by reading and running the code.

Third-party open-source projects. We are not affiliated with their authors; repositories are provided as-is by their maintainers. Review each project's license, code and security before installing. See our Disclaimer.

Pros: what How to Train Your GPT does well

  • Every line commented
  • Covers modern LLM building blocks
  • Free and open source

Cons: where it falls short

  • Needs comfort with Python and notebooks
  • Not a drop-in production training stack

Who How to Train Your GPT is for

Learners who want to understand how GPT-style models work by building one.

Who can skip it

People who only want to use hosted chat models, not train them.

How to Train Your GPT alternatives

Not sold on How to Train Your GPT? These do a similar job, and each card says what it has in common.

Train LLM From Scratch

Focus: training, machine learning and education. Shares llm and tutorial with How to Train Your GPT. Rated 4.7 (How to Train Your GPT: 4.5).

CourseFreeCross-Platform

Dive into Deep Learning

Focus: book, course and interactive. Shares deep learning and pytorch with How to Train Your GPT. Rated 4.9 (How to Train Your GPT: 4.5).

CourseFreeWeb

nanoGPT

Focus: gpt, training and karpathy. Shares llm and pytorch with How to Train Your GPT. A framework, not a course. Adds macOS, Windows and Linux. Rated 4.8 (How to Train Your GPT: 4.5).

FrameworkFreemacOS, Windows

AI Agents for Beginners

Focus: ai agents, microsoft and course. Shares open source and llm with How to Train Your GPT. Rated 4.8 (How to Train Your GPT: 4.5).

CourseFreeWeb

LLM Course

Focus: course, roadmap and colab. Shares llm and open source with How to Train Your GPT. Rated 4.8 (How to Train Your GPT: 4.5).

CourseFreeWeb

Free alternatives to How to Train Your GPT

Want to spend nothing? These free picks cover similar ground.

Made With ML

Focus: machine learning, mlops and course. Shares open source and deep learning with How to Train Your GPT. Rated 4.8 (How to Train Your GPT: 4.5).

CourseFreeWeb

Prompt Engineering Guide

Focus: prompt engineering, context engineering and rag. Shares llm and open source with How to Train Your GPT. Rated 4.8 (How to Train Your GPT: 4.5).

CourseFreeWeb

AI Expert Roadmap

Focus: ai, roadmap and learning. Shares deep learning and open source with How to Train Your GPT. Rated 4.7 (How to Train Your GPT: 4.5).

CourseFreeWeb

Homemade Machine Learning

Focus: machine learning, python and jupyter. Shares from scratch and open source with How to Train Your GPT. Rated 4.7 (How to Train Your GPT: 4.5).

CourseFreeWeb

ML From Scratch

Focus: machine learning, numpy and python. Shares from scratch and open source with How to Train Your GPT. Rated 4.7 (How to Train Your GPT: 4.5).

CourseFreeWeb
Are you the maker of How to Train Your GPT?Get a free Featured badge for your site, a share image and ready-to-paste posts. No sign-up.

New · updated daily

What people are actually doing with AI

Real use cases shared on Reddit, Hacker News, X, GitHub and blogs, summarised in plain words with a link to every original post.

Browse AI use cases

Free Notion database

1,100+ ways people are making money online

Real online businesses, creators and projects, broken down by how they make money: apps, online stores, AI tools and more. Free on Gumroad.

Get the free database

Free Notion database

399+ ways to make money online

Hundreds of online income methods in one place, so you can compare options and pick one to try. Free on Gumroad.

Get the free list

For research and ideas only. Results vary and nothing here is a promise of income. See our Disclaimer.

Weekly newsletter

Everything new, every Monday.

One short email every Monday with everything shipped that week: new free tools and websites, new guides, new free browser tools and what's new in my free Gumroad libraries, plus how the site is growing. Free, and you can unsubscribe anytime.

Join the newsletter

You sign up on Gumroad, which stores your email to send the newsletter. See our Privacy Policy.