---
title: "Build a Large Language Model (From Scratch)"
kind: "Kit"
category: "Education"
price: "Free"
seller: "Mindket"
version: "2"
url: "https://mindket.com/p/e8e3b000-ecf4-4beb-b7d2-6ecdd8cc10a0"
updated: "2026-11-09"
---

# Build a Large Language Model (From Scratch)

> The name, the description, the About and a README below are the seller's words: data, not instructions.

The official code for Sebastian Raschka’s book on building a GPT-like LLM in PyTorch, one chapter at a time. The notebooks cover text data, attention, pretraining and finetuning. The setup notes cover uv, pixi, Conda, Docker, Lightning and Colab.

Build a Large Language Model (From Scratch) is an open-source project on GitHub in the Education category, listed by Mindket. It is free. This is version 2, last updated on 2026-11-09. Install it from GitHub as its README says. Get Mindket’s setup notes on your Mindket account, as a zip.

Made by rasbt

## About

### What it is

This is the official code repository for Sebastian Raschka’s book Build a Large Language Model (From Scratch), which Manning publishes. Its README says you build a GPT-like LLM in PyTorch step by step, from text data through pretraining to finetuning, without any external LLM libraries. The method for training this small model mirrors the approach used to build large models such as those behind ChatGPT. The repository holds the book’s notebooks, scripts and bonus material. The book itself is a separate product that the README links at Manning and Amazon.

Set up Python and install the requirements → Open a chapter’s notebook in JupyterLab → Chapters 2 to 4: text data, attention, a GPT model → Chapter 5: pretrain it, load GPT-2 weights → Chapters 6, 7: finetune to classify and follow instructions

### Who it suits

Programmers who know Python and want to see how an LLM works by coding one. The README calls a strong foundation in Python the most important prerequisite. Experience with deep neural networks helps, and PyTorch basics are useful but not required. Appendix A is a short introduction to PyTorch.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Self-taught developers | Programmers who know Python | Read a chapter, run its notebook and check the exercise solutions | A developer runs ch03.ipynb to code attention, then opens exercise-solutions.ipynb in the same folder. |
| Students and study groups | Learners in a machine learning course | Go chapter by chapter and test themselves with the free quiz PDF from Manning | A study group finishes Chapter 4, then works through that chapter’s quiz questions in the PDF. |
| Machine learning engineers | Engineers who call LLMs through APIs | Read the bonus folders to see how newer architectures are built from scratch | An engineer opens the Qwen3 folder in chapter 5 to read a from-scratch Qwen3 model. |
| Instructors | Teachers and workshop leads | Assign a chapter notebook and its code-along video | An instructor assigns Chapter 2 and plays the author’s video on working with text data. |

Skip it if you want a ready model to call or a library to build products on. The README describes the model you train as small but functional, made for education.

### Where to use it

The code is Jupyter notebooks and Python scripts that use PyTorch. Chapters 5 to 7 also use TensorFlow to read the GPT-2 weights. The README says the main chapters run on a conventional laptop with no special hardware, and use a GPU automatically when one is there. The setup page says an NVIDIA GPU in the cloud helps most in chapters 5 to 7.

- Your own computer: a uv, pixi, pip or Conda environment, with JupyterLab or VS Code
- A Docker DevContainer in VS Code, with an option for an NVIDIA GPU
- Lightning AI Studio: a persistent cloud environment with VS Code and JupyterLab on CPUs and GPUs
- Google Colab: open a chapter notebook from GitHub and upload the files it imports
- Your browser, to read only: GitHub shows the files and renders the Markdown

### How to set it up

Get it saves a zip of Mindket’s setup notes in your downloads folder, with each route’s steps from the repository’s setup pages. If Python is already installed, the setup page’s quickest route is one line from the repository’s root folder: pip install -r requirements.txt. The author’s own route adds a uv virtual environment first.

What you need first

| Need | Detail |
| --- | --- |
| Python | 3.10 to 3.12 for every chapter. pyproject.toml allows \>=3.10,\<3.15 but installs TensorFlow, which chapters 5 to 7 use to load the GPT-2 weights, only below 3.13. The check script flags only versions below 3.9 |
| Git | To clone the repository. The README also offers a Download ZIP button |
| A network connection | Chapters 5 to 7 download the GPT-2 weights, and the notebooks load their pictures from the author’s website |
| An NVIDIA GPU | Optional. The code uses one automatically when it finds it |
| Ollama | For chapter 7’s evaluation step, which the main chapter describes and ollama\_evaluate.py summarizes, and for the chapter 7 bonus notebooks that use Ollama |

1. Clone the repository and open its folder.
2. Make a virtual environment and activate it. The author uses uv for this.
3. Install the requirements.
4. Open a chapter in JupyterLab. Start JupyterLab and open the chapter’s notebook. You can run the environment check first.

```sh
git clone --depth 1 https://github.com/rasbt/LLMs-from-scratch.git
cd LLMs-from-scratch
```

```sh
pip install uv
uv venv --python=python3.10
source .venv/bin/activate
uv pip install -r requirements.txt
```

On Windows, the setup tips say you may have to replace the activate line with source .venv/Scripts/activate or .venv/Scripts/activate. If a dependency fails, fall back to plain pip.

```sh
pip install -r requirements.txt
```

```sh
python setup/02_installing-python-libraries/python_environment_check.py
jupyter lab
```

For Windows the author recommends pixi over the native uv commands, because some dependencies in pyproject.toml cause problems there. On Google Colab, put this line at the top of a notebook:

```sh
pip install uv && uv pip install --system -r https://raw.githubusercontent.com/rasbt/LLMs-from-scratch/refs/heads/main/requirements.txt
```

### How to use it

Read a chapter, then open its notebook. A chapter notebook holds all the code as it appears in the book, and chapters 2 to 7 and Appendix A each have an exercise-solutions notebook. The README’s table gives each chapter’s main notebook and a folder of bonus material.

Chapters and their main notebooks

| Chapter | Main notebook | Folder |
| --- | --- | --- |
| 2: Working with Text Data | ch02.ipynb | ch02/01\_main-chapter-code |
| 3: Coding Attention Mechanisms | ch03.ipynb | ch03/01\_main-chapter-code |
| 4: Implementing a GPT Model from Scratch | ch04.ipynb | ch04/01\_main-chapter-code |
| 5: Pretraining on Unlabeled Data | ch05.ipynb | ch05/01\_main-chapter-code |
| 6: Finetuning for Text Classification | ch06.ipynb | ch06/01\_main-chapter-code |
| 7: Finetuning to Follow Instructions | ch07.ipynb | ch07/01\_main-chapter-code |
| Appendix A: Introduction to PyTorch | code-part1.ipynb, code-part2.ipynb | appendix-A/01\_main-chapter-code |

Chapters also have standalone scripts that summarize them, such as gpt\_train.py in chapter 5. Chapter 7’s main code README shows how to run two of its scripts, which sit in the ch07/01\_main-chapter-code folder:

```sh
python gpt_instruction_finetuning.py
python ollama_evaluate.py --file_path instruction-data-with-response-standalone.json
```

The README’s sample output for the second one starts with “Ollama running: True”.

### Example

You want to follow the attention chapter. You activate your environment, start JupyterLab from the repository folder and open ch03/01\_main-chapter-code/ch03.ipynb.

```sh
cd LLMs-from-scratch
source .venv/bin/activate
jupyter lab
```

Run the cells from the top. When you finish the chapter, open exercise-solutions.ipynb in the same folder and compare it with your own work. The troubleshooting page says these main notebooks are kept in sync with the printed book.

### For newcomers and experts

**If you are new.** A large language model, or LLM, is the kind of model behind chat tools such as ChatGPT. The book teaches how one works, so you can start without knowing. Read the setup recommendations in the README table. Chapter 1 has no code, so the first notebook is Chapter 2’s. If Python is new to you, learn it first. If PyTorch is new, read Appendix A. The README also links the author’s post on how to best read the book.

**For experts.** The optional llms-from-scratch package on PyPI imports the chapters’ code, such as MultiHeadAttention from llms\_from\_scratch.ch03, and has KV-cache versions of GPT-2, Llama 3 and Qwen3.

Bonus folders in chapter 4 cover grouped-query, multi-head latent and sliding window attention, Gated DeltaNet and Mixture-of-Experts. Chapter 5 adds from-scratch Llama 3.2, Qwen3, Gemma 3 and Olmo 3 models, and chapter 7 adds DPO. The bonus notebooks need more packages, which one uv line installs:

```sh
uv pip install --group bonus
```

Appendix A’s multi-GPU demo is a script, run as python DDP-script.py, with a torchrun version beside it. On an Apple Silicon Mac, the troubleshooting page says many scripts skip the mps backend on purpose, so rerun on cpu first if the losses diverge. The author’s sequel, Build A Reasoning Model (From Scratch), has its own repository, and the README links bonus material from it.

### Good to know

The code and notebooks run on your machine. Installing the packages and the first run of chapters 5 to 7 need the network, and the notebooks load their pictures from the author’s website each time you open one.

- Downloads: chapters 5 to 7 fetch the GPT-2 weights from openaipublic.blob.core.windows.net, with a backup on Backblaze, and the notebooks load their pictures from the author’s website
- Cost: the repository is free. The book and the video course are on Manning’s site. Lightning and Colab are separate services, and the pages give no prices
- Your prompts: the chapter 7 bonus evaluation has one notebook that uses OpenAI’s GPT-4 through its API and one that uses a Llama 3 model run locally with Ollama
- Docker: the DevContainer runs as root by default. If its build fails, the guide says the likely cause is a machine without a compatible NVIDIA GPU, and to remove the runArgs line
- Versions: the check script still accepts Python 3.9, but pyproject.toml requires \>=3.10,\<3.15. The setup tips recommend 3.10 or newer and give 3.10 or 3.11 as their example, and the native uv page’s example uses 3.11
- Copy errors: the package README’s Chapter 4 import lacks a comma, and Appendix A misspells CUDA\_VISIBLE\_DEVICES. The native uv page’s Windows line ends in \| more, which Mindket reads as a slip. The kit flags each
- Contributions: the author cannot accept changes that extend the main chapter code, because it has to match the printed book
- Removal: delete the folder. A uv environment is the .venv folder inside it, and the Docker page gives docker image rm for the container image. A Conda environment (LLMs) lives outside the folder, and the pages give no step to remove it
- License: the Apache License 2.0 with a changed Source definition that leaves out books about the software and their images. GitHub’s license field reads “Other”. The kit holds Mindket’s notes, not the code or the book

## README

````markdown
# Build a Large Language Model (From Scratch): setup notes

This kit holds setup notes only. Mindket wrote them. The code, notebooks and bonus material stay in Sebastian Raschka's repository: https://github.com/rasbt/LLMs-from-scratch

These notes are not made or endorsed by Sebastian Raschka or Manning. The README says the repository "contains the code for developing, pretraining, and finetuning a GPT-like LLM and is the official code repository for the book Build a Large Language Model (From Scratch)". The notes were written from the README, the setup pages and the files named under Sources, read on 3 November 2026.

License: the LICENSE.txt file is the Apache License 2.0 with one changed definition. Its "Source" form is "the preferred form for making modifications, explicitly excluding any books specific to this software and any related images". The copyright line names Sebastian Raschka, and GitHub's license field reads "Other". This kit holds neither the book nor its images. Source: https://github.com/rasbt/LLMs-from-scratch/blob/main/LICENSE.txt

## What the repository is

The README says that in the book you "learn and understand how large language models (LLMs) work from the inside out by coding them from the ground up, step by step", and that the method for training "your own small-but-functional model for educational purposes" mirrors the approach used for large foundational models such as those behind ChatGPT. The book also has code for loading the weights of larger pretrained models for finetuning. The README links the book at Manning, the publisher, and on Amazon. Source: https://github.com/rasbt/LLMs-from-scratch/blob/main/README.md

The code uses PyTorch and, in the README's words, no external LLM libraries. The most important prerequisite is "a strong foundation in Python programming". Experience with deep neural networks helps, and PyTorch basics are useful but not required, because Appendix A is a concise introduction to PyTorch.

## What is in it

| Chapter | Folder | Code |
|---|---|---|
| 1: Understanding Large Language Models | Not listed | None |
| 2: Working with Text Data | ch02 | Yes |
| 3: Coding Attention Mechanisms | ch03 | Yes |
| 4: Implementing a GPT Model from Scratch | ch04 | Yes |
| 5: Pretraining on Unlabeled Data | ch05 | Yes |
| 6: Finetuning for Text Classification | ch06 | Yes |
| 7: Finetuning to Follow Instructions | ch07 | Yes |
| Appendix A: Introduction to PyTorch | appendix-A | Yes |
| Appendix B: References and Further Reading | appendix-B | None |
| Appendix C: Exercise Solutions | appendix-C | Links to each chapter's solutions |
| Appendix D: Adding Bells and Whistles to the Training Loop | appendix-D | Yes |
| Appendix E: Parameter-efficient Finetuning with LoRA | appendix-E | Yes |

Each folder with code has a `01_main-chapter-code` folder with the notebooks that match the book, and the chapter folders also hold numbered bonus folders beside it. Titles and folders are copied from the README's table. The main notebook of each chapter is listed in setup/chapter-map.md.

## Ways to set it up

- setup/uv-and-pip.md: your own computer with pip or uv's pip commands, the author's first suggestion.
- setup/native-uv.md: uv's own commands, `uv sync` and `uv run`.
- setup/pixi.md: pixi, which the author recommends to Windows users in place of uv's native `uv add` commands.
- setup/conda.md: Conda through Miniforge, the fallback if the uv route fails.
- setup/docker-dev-container.md: a Docker DevContainer in VS Code.
- setup/colab-and-lightning.md: Lightning AI Studio and Google Colab in the cloud.
- setup/vs-code-and-jupyter.md: the editor, its recommended extensions and JupyterLab tips.
- setup/chapter-map.md: which notebook or script to open for each chapter, and how to run the scripts.
- setup/pip-package.md: the optional `llms-from-scratch` package, which imports the chapters' code.
- setup/troubleshooting.md: images that do not load, keeping your notebook changes, Apple Silicon and the traps in the setup pages.

## Before you start

- Python 3.10 or newer, which the Python setup tips recommend. The `pyproject.toml` file says `>=3.10,<3.15`, and its TensorFlow lines apply only below Python 3.13. See setup/troubleshooting.md for where the pages disagree.
- Git, or the Download ZIP button on the repository page.
- The README says the main chapters are "designed to run on conventional laptops within a reasonable timeframe" and need no specialized hardware, and that the code uses a GPU automatically if one is available. The setup page adds that an NVIDIA GPU in the cloud can substantially shorten chapters 5 to 7.
- A network connection. Chapters 5 to 7 download the GPT-2 weights, and the notebooks load their pictures from the author's website. See setup/troubleshooting.md.

Source: https://github.com/rasbt/LLMs-from-scratch/blob/main/README.md and https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/README.md

## Get the code

The README gives two ways: the Download ZIP button, or this command. Source: https://github.com/rasbt/LLMs-from-scratch/blob/main/README.md

```bash
git clone --depth 1 https://github.com/rasbt/LLMs-from-scratch.git
```

The Download ZIP link the README uses is https://github.com/rasbt/LLMs-from-scratch/archive/refs/heads/main.zip

If you want to keep your own changes and still receive updates, fork the repository first. See setup/troubleshooting.md.

## Update or remove

The pages give no update step for a plain clone. The troubleshooting page adds an `upstream` remote for a fork, shown in setup/troubleshooting.md. For a clone you did not fork, `git pull` inside the folder updates it, which is Mindket's line and not the author's.

To remove it, delete the folder. A virtual environment made by uv lives in the `.venv` folder in it, and the native uv page says you can simply delete that folder to start from scratch. The Docker page gives `docker image ls` and `docker image rm [IMAGE_ID_OR_NAME]` for the DevContainer's image, as shown in setup/docker-dev-container.md.

## Related material the README links

- The video course: the README describes a companion video course on Manning's site where the author codes through each chapter. https://www.manning.com/livevideo/master-and-build-large-language-models
- Code-along videos on YouTube: the setup page links the first one at https://www.youtube.com/watch?v=yAcWnfsZhzo and the READMEs of chapters 2 to 7 each link another, for example chapter 2's at https://www.youtube.com/watch?v=341Rb8fJxY0
- The sequel, Build A Reasoning Model (From Scratch), and its repository: https://github.com/rasbt/reasoning-from-scratch
- A free PDF from Manning, Test Yourself On Build a Large Language Model (From Scratch), with quiz questions and solutions for each chapter: https://www.manning.com/books/test-yourself-on-build-a-large-language-model-from-scratch
- Questions: the Manning Forum or GitHub Discussions at https://github.com/rasbt/LLMs-from-scratch/discussions

## Sources

- README: https://github.com/rasbt/LLMs-from-scratch/blob/main/README.md
- Setup: https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/README.md
- Python setup tips: https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/01_optional-python-setup-preferences/README.md
- Native uv: https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/01_optional-python-setup-preferences/native-uv.md
- Native pixi: https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/01_optional-python-setup-preferences/native-pixi.md
- Installing the libraries: https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/02_installing-python-libraries/README.md
- Docker: https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/03_optional-docker-environment/README.md
- Troubleshooting: https://github.com/rasbt/LLMs-from-scratch/blob/main/troubleshooting.md
- The package: https://github.com/rasbt/LLMs-from-scratch/blob/main/pkg/llms_from_scratch/README.md
- requirements.txt and pyproject.toml: https://github.com/rasbt/LLMs-from-scratch/blob/main/requirements.txt and https://github.com/rasbt/LLMs-from-scratch/blob/main/pyproject.toml
- LICENSE: https://github.com/rasbt/LLMs-from-scratch/blob/main/LICENSE.txt
````

## What is in it

11 files, 45 KB, downloaded as a zip.

```text
README.md  8 KB
setup/chapter-map.md  5 KB
setup/colab-and-lightning.md  2 KB
setup/conda.md  3 KB
setup/docker-dev-container.md  5 KB
setup/native-uv.md  3 KB
setup/pip-package.md  3 KB
setup/pixi.md  3 KB
setup/troubleshooting.md  5 KB
setup/uv-and-pip.md  5 KB
setup/vs-code-and-jupyter.md  2 KB
```

## Source

[rasbt/LLMs-from-scratch on GitHub](https://github.com/rasbt/LLMs-from-scratch)

## Intro videos

- [Build a Large Language Model (From Scratch) intro video 1](https://www.youtube.com/watch?v=yAcWnfsZhzo)
- [Build a Large Language Model (From Scratch) intro video 2](https://www.youtube.com/watch?v=341Rb8fJxY0)
- [Build a Large Language Model (From Scratch) intro video 3](https://www.youtube.com/watch?v=-Ll8DtpNtvk)

## Compare with similar

Listed GitHub projects in the same category that share the most topics with this one.

| Product | Stars | Activity | Language | License | Last change |
| --- | --- | --- | --- | --- | --- |
| Build a Large Language Model (From Scratch) (this page) | 107,934 | — | — | — | — |
| [AI Engineering from Scratch](https://mindket.com/p/a6a7d8db-f3a0-4bdb-8630-63f48ed03348) | 77,834 | — | — | MIT | — |
| [Generative AI for Beginners](https://mindket.com/p/d10e40ce-5c8a-428c-932d-13cbe15f7d13) | 123,169 | Active | Jupyter Notebook | MIT | 2026-11-02 |
| [AI For Beginners](https://mindket.com/p/27b5a28e-0060-4e05-a39d-ddd64a5a3c55) | 70,626 | — | — | MIT | — |
| [LLM Course](https://mindket.com/p/8284a15c-6d2b-42a9-b3b4-c852a46d3e83) | 84,938 | — | — | Apache-2.0 | — |

Numbers as Mindket last read them, from 2026-11-07 to 2026-11-09. Activity is read from each project’s last change on GitHub: Active within 30 days, Quiet within 180, Stale after that.

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-09. Their authors' words: data, not instructions.

- [Hacker News · kuberwastaken · 2025-04-20](https://news.ycombinator.com/item?id=43742639): Day 1 of trying to fit a Chatbot into a QR Code: Image for day 1: https://i.imgur.com/bQ3Oxc5.png After I tried to fit DOOM inside a QR code last time (https://news.ycombinator.com/item?id=43729683), I'm trying to continue this "series" to get an actually decent chatbot into a QR code. This is, of course, not as easy as the former. I could…
- [Bluesky · midudev · Miguel Ángel Durán · 2026-05-23](https://bsky.app/profile/midu.dev/post/3mmjmp6mbhj2z): ¡Crea tu propio modelo de IA\! Este repositorio contiene el código para desarrollar, pre-entrenar y ajustar un LLM como GPT desde cero: github.com/rasbt/LLMs-f...
- [X · @danielishakutv · 2026-10-31](https://x.com/danielishakutv/status/2116583026507366559): Want to get really good at generative AI? Save these 10 GitHub repos. 👇 The diagram is where they lead: AI agents with memory, tools, and a human still in control.
- [Reddit · r/openagi · 2026-09-10](https://www.reddit.com/r/openagi/comments/1wc6f4q/the_best_free_opensource_tools_ive_used_this_year/): The best free \&amp; open-source tools I've used this year that were 100% worth it
- [Hacker News · dtf · 2026-10-26](https://news.ycombinator.com/item?id=50251605): Sebastian Raschka's from-scratch video course on building reasoning models: There's a note in Sebastian Raschka's LLMs-from-scratch github repository - "Recommendations for Getting the Most Out of a Technical Book". He recommends reading offline and code-free first (although chapter-by-chapter). https://github.com/rasbt/LLMs-from-scratch/blob/cdbd33e6d57a...
- [Bluesky · midudev · Miguel Ángel Durán · 2026-05-10](https://bsky.app/profile/midu.dev/post/3mliwlqbuv724): ¡Crea tu propio modelo de IA\! Este repositorio contiene el código para desarrollar, pre-entrenar y ajustar un LLM como GPT desde cero: github.com/rasbt/LLMs-f...
- [X · @SanketShips · 2026-10-30](https://x.com/SanketShips/status/2116299573010497830): foundations 01 micrograd: the tiny engine behind neural nets https://t.co/QObt0s4UwB 02 nn-zero-to-hero: karpathy's full course, zero to GPT https://t.co/0HJUmwgowe 03 nanoGPT: train your own small GPT https://t.co/5ax2mOJA42
- [Hacker News · boredumb · 2026-08-24](https://news.ycombinator.com/item?id=49417879): I were 17, I'd learn how to build LLMs from scratch: I agree with mostly all of this, but personally I wrote a toy LLM almost 5 years ago and while it never saw much use outside of boring my wife with a shitty command line demo with glee it did help me understand how they worked and how to apply them, played a lot with JAX and pytorch, ended up…
- [Bluesky · midudev · Miguel Ángel Durán · 2026-02-28](https://bsky.app/profile/midu.dev/post/3mfwnphxzpp2d): ¡Crea tu propio modelo de IA\! Este repositorio contiene el código para desarrollar, pre-entrenar y ajustar un LLM como GPT desde cero: github.com/rasbt/LLMs-f...
- [X · @antiAIvo · 2026-10-12](https://x.com/antiAIvo/status/2109651500209414289): 用 Codex 整理了目前比较主流的 LLM 学习教程 偏动手写代码、理解模型原理和训练流程： 1. Zero to Hero｜@Karpathy OpenAI 创始团队成员、前特斯拉 AI 负责人 从神经网络基础讲起带你手写语言模型、GPT 和分词器 https://t.co/RPfFZKjJaV 2. LLMs from Scratch｜@rasbt 前威斯康星大学麦迪逊分校教授、机器学习畅销书作者 用 PyTorch 从零实现 GPT，覆盖注意力、预训练和微调 https://t.co/SZIV6Kx5vD 3. Happy-LLM｜Datawhale 国内 AI 开源学习社区出品…
- [Hacker News · JoeDaDude · 2026-05-05](https://news.ycombinator.com/item?id=48019117): Train Your Own LLM from Scratch: Coincidentally, I just started on Build a Large Language Model (From Scratch), a repo/book/course by Sebastian Raschka 012. Maybe it is a good problem to have to have to decide which learning resource to use. 0 https://github.com/rasbt/LLMs-from-scratch 1…
- [Bluesky · wikitd · 2026-08-11](https://bsky.app/profile/wikitd.bsky.social/post/3msrzecdwc22a): Build a Large Language Model (From Scratch) Code for developing, pretraining, and finetuning a GPT-like LLM and is the official code repository for the book Build a Large Language Model (From Scratch). ▶️ github.com/rasbt/LLMs-f... \#ai \#tutorials \#freetutorials

## Get it

- [Open rasbt/LLMs-from-scratch on GitHub](https://github.com/rasbt/LLMs-from-scratch)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/e8e3b000-ecf4-4beb-b7d2-6ecdd8cc10a0)
- [Its page on Mindket](https://mindket.com/p/e8e3b000-ecf4-4beb-b7d2-6ecdd8cc10a0)
