Build a Large Language Model (From Scratch) versus Hands-On Large Language Models.
Both show up on every "best" list. They're not competitors. They're a sequence. Here's which one to read first, and when.
Reviewed by Ashish Sheth · Updated May 2026
Author
Sebastian Raschka
Jay Alammar, Maarten Grootendorst
Pages
368
425
Published
2024
2024
Publisher
Manning Publications
O'Reilly Media
Level
intermediate
beginner to intermediate
Amazon Rating
4.5/5 (445)
4.5/5 (392)
Goodreads Rating
4.6/5 (313)
4.29/5 (254)
Build a Large Language Model (From Scratch)
Strengths
+ Clear, step-by-step pedagogy that breaks down complex concepts into manageable pieces
+ Hands-on coding throughout, you build a working model on your laptop
+ Excellent diagrams and visual explanations alongside code
+ Companion GitHub repo has 91,000+ stars with bonus materials
Caveats
− Limited mathematical depth on why certain architectural choices exist
− Focuses only on GPT-style architecture, no coverage of alternatives
− Requires solid Python and basic ML knowledge to follow along
Hands-On Large Language Models
Strengths
+ 275+ custom diagrams make abstract concepts visual and intuitive
+ Accessible to beginners without prior PyTorch/TensorFlow knowledge
+ Practical code examples covering real use cases like semantic search and RAG
+ Well-structured progression from foundations to advanced techniques
Caveats
− Limited depth on transformer internals despite the author's blog reputation
− Image generation sections lack clarity
− May be too introductory for experienced ML practitioners
The verdict
Read Hands-On Large Language Models first to build foundations, then move to Build a Large Language Model (From Scratch) for advanced concepts.
Build a Large Language Model (From Scratch)
Check Price on Amazon →
Hands-On Large Language Models
Check Price on Amazon →
Frequently asked
Which is better, Build a Large Language Model (From Scratch) or Hands-On Large Language Models?
Read Hands-On Large Language Models first to build foundations, then move to Build a Large Language Model (From Scratch) for advanced concepts.
Do I need a GPU to follow along?
No. The model you build is small enough to train on a regular laptop CPU. That's intentional. The goal is understanding, not training a production model.
Is Hands-On Large Language Models good for beginners?
Yes, it's one of the most beginner-friendly LLM books available. No PyTorch or TensorFlow experience needed. The 275+ diagrams carry a lot of the explanation load.