The code for a book that teaches you how ChatGPT-style AI works by building a small one yourself.
Your data
Stays on your device
Coding needed
Developers only
Cost
Free
Computer
An ordinary computer is fine
On your deviceData stays with you
Drafted with AIMostly for developers
What it does
This is the official code for the book "Build a Large Language Model (From Scratch)". A large language model (LLM) is the kind of AI behind chatbots like ChatGPT.
Chapter by chapter, you write a small but working model: preparing text, building the parts that let it pay attention to words, training it, and then teaching it to classify text and follow instructions. The author says the method mirrors how the big models are made.
The code is designed to run on an ordinary laptop. There is also an optional companion video course and a follow-up book on reasoning models.
Who it's for
People with solid Python skills who want to really understand how AI chat models work inside.
Can I use it without coding?
Developers only. The author lists strong Python programming as the main prerequisite; the code runs as notebooks. New to this? Start here.
Can I run it?
Cost
FreeNothing to pay or sign up for.
Computer
An ordinary computer is fine
Privacy
Runs on your own device: your data stays with you
API key
Not needed
Try it
Download a copy of the repository as a ZIP file.
Follow the setup guide in the repository to install Python and its packages.
Work through the chapter notebooks alongside the book.
Using Claude Code, Cursor or another AI coding assistant? Paste the prompt and it will walk you through the setup.New to this?
Before you install
Only download from the official GitHub page. Copies with similar names exist for many popular projects.
Plain-AyI is an independent guide and doesn't host or review the software it lists. Please check each project's official page before installing.
No standard license listed. Check the GitHub page before using it for business.