# Build a Large Language Model (From Scratch) by Sebastian Raschka

Hacker Approved page: https://hackerapproved.com/p/build-a-large-language-model/

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. It was recommended in 8 of 12 months, in 14 threads. It meets the Hacker Approved badge rule.

**Verdict:** Explains how LLMs work by having readers build a GPT-style model step by step in PyTorch.

Summary written by Claude from the comments below.

## Why people recommend it

- Clear, readable, well-explained (5 comments in the sample): "I found the book by Rashka for Building an LLM from Scratch really helpful in understanding a lot of concepts behind LLMs" ([source](https://news.ycombinator.com/item?id=48043122)) "It's clear and well-written (by a human!) and goes into much more explanatory detail than this does" ([source](https://news.ycombinator.com/item?id=49653381)) "super readable and does a great job at holding your hand through the entire process" ([source](https://news.ycombinator.com/item?id=50246122))
- Builds a GPT model step by step (4 comments in the sample): "The best part about it is seeing the code built up for the GPT-2 architecture in basic pytorch" ([source](https://news.ycombinator.com/item?id=46535615)) "There are GitHub repos with the code from Sebastian Raschka's books, which build an LLM from scratch in PyTorch" ([source](https://news.ycombinator.com/item?id=49430929)) "It provides a clear explanation of the building blocks used in the first versions of ChatGPT" ([source](https://news.ycombinator.com/item?id=47162472))
- Explains how LLMs actually work (3 comments in the sample): "It's also not a bad foundation for people who want to understand how these things are trained and work." ([source](https://news.ycombinator.com/item?id=50247471)) "it is a great resource for learning how LLMs work, from tokenization to generating text" ([source](https://news.ycombinator.com/item?id=50248690)) "I learned more from his book on LLMs than any other source on LLMs" ([source](https://news.ycombinator.com/item?id=50248438))
- Pairs well with explainer videos (2 comments in the sample): "I would highly recommend Sebastian Raschka's book and youtube videos as way into the subject" ([source](https://news.ycombinator.com/item?id=46359565)) "it’s been well worth it (particularly paired with his explainer videos" ([source](https://news.ycombinator.com/item?id=49311491))

## Other machine learning books people recommend

- [Build an LLM from Scratch by Sebastian Raschka](https://hackerapproved.com/p/build-an-llm-from-scratch/): 8 recommend, 0 mixed, 0 criticize
- [Python Data Science Handbook by Jake VanderPlas](https://hackerapproved.com/p/python-data-science-handbook/): 7 recommend, 1 mixed, 0 criticize
- [Probabilistic Machine Learning by Kevin Murphy](https://hackerapproved.com/p/probabilistic-machine-learning/): 5 recommend, 0 mixed, 0 criticize
- [The Welch Labs Illustrated Guide to AI by Welch Labs](https://hackerapproved.com/p/welch-labs-illustrated-guide-to-ai/): 5 recommend, 0 mixed, 0 criticize

## Where to get it

- [See price on Amazon](https://www.amazon.com/dp/1633437167)
- [Bookshop.org](https://bookshop.org/book/9781633437166)

## The badge

A product earns the Hacker Approved badge when at least 10 people recommend it, recommenders outnumber critics at least 2 to 1 (mixed feelings count toward neither side), it was recommended in at least 4 of the 12 months and in at least 5 different threads, and no single thread supplies more than half of the people who recommend it. Health and money products are never badged.

## Cite as

Hacker Approved, "Build a Large Language Model (From Scratch) by Sebastian Raschka", https://hackerapproved.com/p/build-a-large-language-model/ (16 recommend, 0 mixed, 0 criticize; Hacker News comments, November 2025 to October 2026).

Counts updated 2 Nov 2026, with data through October 31, 2026.
