Build a Large Language Model (From Scratch)
Build a Large Language Model (From Scratch) by Sebastian Raschkaby Sebastian Raschka
Hacker ApprovedThe most recommended of 10 machine learning books
Explains how LLMs work by having readers build a GPT-style model step by step in PyTorch.
16 people recommended Build a Large Language Model (From Scratch) by Sebastian Raschka in Hacker News comments and none criticized it, November 2025 to October 2026.
Summary written by Claude from the comments below.
16 people gave an opinion
- recommend it
- 16
- mixed feelings
- 0
- warn against or regret it
- 0
The record
Recommended in 8 of 12 months
In 14 different threads.
- November 2025: not recommended
- December 2025: recommended
- January 2026: recommended
- February 2026: recommended
- March 2026: not recommended
- April 2026: not recommended
- May 2026: recommended
- June 2026: recommended
- July 2026: not recommended
- August 2026: recommended
- September 2026: recommended
- October 2026: recommended
Why it carries the badge
- 16 people recommend itNeeds 10 or more, met.
- Nobody criticizes itNeeds 2 to 1 or better, met.
- Recommended in 8 of 12 monthsNeeds 4 or more, met.
- Recommended in 14 threadsNeeds 5 or more, met.
- The biggest thread supplies 44% of its recommendersNeeds half or less, met.
The same rules apply to every product, and the badge can’t be bought. Mixed feelings count toward neither side. How the badge works
What people say about it
Reasons grouped from a sample of 24 of the 26 opinions about it, picked in proportion to how many people recommend it, have mixed feelings and criticize it. Each mark is one comment in the sample. Open a reason to read what they said.
Why people recommend it
Each mark is one comment
Clear, readable, well-explained
“I found the book by Rashka for Building an LLM from Scratch really helpful in understanding a lot of concepts behind LLMs”
Comment from 6 May 2026 in “Learning the Integral of a Diffusion Model” “It's clear and well-written (by a human!) and goes into much more explanatory detail than this does”
Comment from 11 Sep 2026 in “LLM Visualizer – Build a Transformer from Scratch” “super readable and does a great job at holding your hand through the entire process”
Comment from 26 Oct 2026 in “Sebastian Raschka's from-scratch video course on building reasoning models” - Comment from 5 May 2026 in “Train Your Own LLM from Scratch”
- Comment from 8 Jan 2026 in “The Q, K, V Matrices”
Builds a GPT model step by step
“The best part about it is seeing the code built up for the GPT-2 architecture in basic pytorch”
Comment from 8 Jan 2026 in “The Q, K, V Matrices” “There are GitHub repos with the code from Sebastian Raschka's books, which build an LLM from scratch in PyTorch”
Comment from 25 Aug 2026 in “I were 17, I'd learn how to build LLMs from scratch” “It provides a clear explanation of the building blocks used in the first versions of ChatGPT”
Comment from 26 Feb 2026 in “I don't know how you get here from "predict the next word."” - Comment from 6 Jun 2026 in “How LLMs Work”
Explains how LLMs actually work
“It's also not a bad foundation for people who want to understand how these things are trained and work.”
Comment from 26 Oct 2026 in “Sebastian Raschka's from-scratch video course on building reasoning models” “it is a great resource for learning how LLMs work, from tokenization to generating text”
Comment from 26 Oct 2026 in “Sebastian Raschka's from-scratch video course on building reasoning models” “I learned more from his book on LLMs than any other source on LLMs”
Comment from 26 Oct 2026 in “Sebastian Raschka's from-scratch video course on building reasoning models” Pairs well with explainer videos
“I would highly recommend Sebastian Raschka's book and youtube videos as way into the subject”
Comment from 22 Dec 2025 in “The Illustrated Transformer” “it’s been well worth it (particularly paired with his explainer videos”
Comment from 15 Aug 2026 in “AI by Hand”
Other machine learning books people recommend
The four most recommended other machine learning books, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.
| Product | Recommend | Mixed | Criticize | Approval | Months | Had for | Badge |
|---|---|---|---|---|---|---|---|
| Build a Large Language Model (From Scratch)by Sebastian RaschkaThis page | 16 | 0 | 0 | 100% | 8 | — | Approved |
| Build an LLM from Scratchby Sebastian Raschka | 8 | 0 | 0 | 100% | 5 | — | — |
| Python Data Science Handbookby Jake VanderPlas | 7 | 1 | 0 | 100% | 2 | — | — |
| Probabilistic Machine Learningby Kevin Murphy | 5 | 0 | 0 | 100% | 3 | — | — |
| The Welch Labs Illustrated Guide to AIby Welch Labs | 5 | 0 | 0 | 100% | 3 | — | — |
What people said
24 of the 26 opinions about it, picked in proportion to the three counts, newest first. Each links to the original comment.
“He recommends reading offline and code-free first (although chapter-by-chapter”
“it was one of the best investments of my time in all of 2025”
“it is a great resource for learning how LLMs work, from tokenization to generating text”
“I learned more from his book on LLMs than any other source on LLMs”
“In many cases things are better taught top down.”
“his pedagogy is great (at least for me”
“It's also not a bad foundation for people who want to understand how these things are trained and work.”
“super readable and does a great job at holding your hand through the entire process”
“Sebastian is the author of two excellent books related to LLMs”
“It's clear and well-written (by a human!) and goes into much more explanatory detail than this does”
“there are totally decent books about building them from scratch”
“There are GitHub repos with the code from Sebastian Raschka's books, which build an LLM from scratch in PyTorch”
“very reasonably priced and the experience of working through a book is a lot nicer”
“From that perspective it's been a great experience.”
“it’s been well worth it (particularly paired with his explainer videos”
“I couldn't understand the transformer architecture until I built a few myself.”
“I worked through Sebastian Raschka's "Build a Large Language Model (From Scratch)" [0] and Raj Abhijit Dandekar's "Build a DeepSeek Model (From Scratch)" [1] books.”
“I found the book by Rashka for Building an LLM from Scratch really helpful in understanding a lot of concepts behind LLMs”
“Great for people who want to understand the real nuts and bolts”
“It provides a clear explanation of the building blocks used in the first versions of ChatGPT”
“The best part about it is seeing the code built up for the GPT-2 architecture in basic pytorch”
“It's approachable and also detailed.”
“I would highly recommend Sebastian Raschka's book and youtube videos as way into the subject”
“I'm also re-reading Sebastian Raschka's amazing book.”
Counts come from 1,791,911 Hacker News comments labeled by Claude, November 2025 to October 2026, with data through October 31, 2026. Counts updated 2 Nov 2026. How we count. Report a mistake.