There is a GitHub repository with more than 565,000 stars that is not a tool, not an app, and not a model. It is a list — a curated collection of step-by-step guides for rebuilding famous technologies from scratch: your own Git, your own Docker, your own database, your own operating system. It is called build-your-own-x, and its philosophy is a line from physicist Richard Feynman: "What I cannot create, I do not understand."

For AI learners, its most valuable corner is the AI Model section — seven free Python guides that take you from a blank file to a working LLM. The best place to start is the lead guide, LLMs-from-scratch, the official code for Sebastian Raschka's book Build a Large Language Model (From Scratch).

The AI Model section: 7 free guides

All seven guides are in Python, and all are linked from the AI Model section of the list:

  • A Large Language Model (LLM) — a ChatGPT-like GPT model in PyTorch, from scratch
  • A Reasoning Model — an LLM with inference-time scaling, GRPO and distillation
  • Diffusion Models — image generation models, from scratch
  • An LLM Evaluation Harness — test cases, a runner, and rule-based and LLM judges
  • RAG for Document Search — retrieval-augmented generation over your own documents
  • A Coding Agent — an agent that writes and edits code, from scratch
  • Sparse Autoencoders — toy models of superposition, then train your own SAE

Start here: LLMs-from-scratch

The LLM guide is the repository rasbt/LLMs-from-scratch — 109,119 stars and 16,869 forks — and it is the official code for the book. The code is free; the book and the 17-hour-15-minute companion video course are paid.

The chapters take you through: understanding LLMs, building a tokenizer and data loader, coding attention mechanisms and multi-head attention, assembling a working GPT model, pretraining on unlabeled data, finetuning for classification (for example spam), and finetuning to follow instructions. Appendices cover a PyTorch introduction and parameter-efficient finetuning with LoRA.

How to run it free, step by step

  1. Clone the repo: git clone --depth 1 https://github.com/rasbt/LLMs-from-scratch.git — or click Download ZIP on the GitHub page.
  2. Set up Python: read the setup folder's README in the repo for the recommended Python setup and package installation.
  3. Open the notebooks: each chapter is a Jupyter notebook (ch02.ipynb, ch03.ipynb and so on). Open them in Jupyter on your laptop, or upload them to Google Colab for a free GPU.
  4. Work chapters 2 to 4 in order: tokenizer, then attention, then the full GPT model. Do the exercises — solutions are in Appendix C.
  5. Pretrain a small model (Ch 5): start with the small educational model in the chapter, not a ChatGPT-scale one.
  6. Finetune it (Ch 6-7): first a spam classifier, then instruction tuning — and you have a model that follows directions, built by you.

The README states the code is "designed to run on conventional laptops within a reasonable timeframe".

Honest limits — read before you start

  • This is intermediate level, not for absolute beginners. You need a strong Python foundation before chapter 2 makes sense.
  • The book and video course are paid; the code is free.
  • No GPU is required, but a GPU helps. The code uses a GPU automatically if one is available.
  • We did not run the notebooks end to end for this post. The laptop-friendly claim is the README's own statement, and the code is tested on Linux, Windows and macOS.

Bottom line

Build-your-own-x is the most-starred learning roadmap on GitHub for a reason: it turns "how does ChatGPT work?" into something you can build, run and understand yourself.

Sources: GitHub — codecrafters-io/build-your-own-x (565,872 stars, 27 Nov 2026); GitHub — rasbt/LLMs-from-scratch (109,119 stars, 27 Nov 2026).

Originally published on Ai Game Changer Pro: https://aigamechangerpro.blogspot.com/2026/11/build-your-own-llm-from-scratch-free.html