Books | Sebastian Raschka, PhD
Skip to main content
🌙
Search this website
Submit search
Build a Reasoning Model (From Scratch)
ISBN-13 9781633434677
Amazon
Manning
Description
In Build a Reasoning Model (from Scratch), you will learn and understand how a reasoning large language model (LLM) works.
Reasoning is one of the most exciting and important recent advances in improving LLMs, but it’s also one of the easiest to misunderstand if you only hear the term reasoning and read about it in theory. This is why this book takes a hands-on approach. We will start with a pre-trained base LLM and then add reasoning capabilities ourselves, step by step in code, so you can see exactly how it works.
This book can be read on its own, and it also works well as a follow-up to Build a Large Language Model (from Scratch). The latter focuses on LLM architecture and pre-training from the ground up. This book starts with a pre-trained LLM and focuses on implementing reasoning techniques that are not covered there, including inference-time scaling, reinforcement learning training, and distillation.
The two books complement each other well, but they can also be read independently. Readers who want to focus on reasoning can start here and later read Build a Large Language Model (from Scratch) to understand how the underlying LLM architecture and pre-training work. Alternatively, readers who prefer a more bottom-up path can start with Build a Large Language Model (from Scratch) first and then continue with this book.
Other links
Local companion hub for the book, code, chapter links, and reasoning articles
Link to the official source code repository
Reviews
One of the best resources I’ve seen on reasoning models. It cuts through the hype with hands-on practice using evals to build intuition for each tweak so you understand why these techniques work.
– Ivan Leo, Member of Technical Staff, Google DeepMind
Big. Dope. Great read, fun writing. It’s hard to walk away without actually learning something!
– Chris Alexiuk, Sr. Product Research Engineer, NVIDIA
The most important topic in modern AI taught in the best way possible: by building it from the ground up. My go-to resource for mastering reasoning models.
– Logan Thorneloe, Software Engineer, Google and author of AI for Software Engineers
In the age of AI, fundamentals matter more than ever. Without them, you’re vibe-coding on sand and unable to tell signal from hype on Twitter.
In this book, Sebastian Raschka distills the profound ideas behind LLM reasoning in the clearest, most accessible way, with hands-on examples that make the concepts stick. If you’re eager to learn how to build a reasoning model but have little ML experience, this book is where to start.
– Byron Hsu, Member, LMSYS
An exceptional deep dive into the next frontier of AI. This book doesn’t just explain reasoning models, it equips you to build, test, and truly understand them from first principles. A must-read for anyone serious about advancing beyond prompt engineering into real model intelligence.
– Aman Chadha, Senior Staff Tech Lead / Senior Manager, Google DeepMind
A really well-structured, hands-on introduction to reasoning models! The visuals bring transparency to what often feels like a black box by clearly illustrating each stage of the reasoning process. It stands out as one of the few resources that walks through these methods step by step, helping build a clear understanding of a complex subject.
– Vinija Jain, ML Lead, Google
Not just a book, a learning ecosystem: deep knowledge, practical coding and an evolving repo!
– Ivan Fioravanti, Serial Entrepreneur & Local AI Advocate
Sebastian makes the complex feel intuitive. By building reasoning models from scratch, you gain a level of understanding that papers alone cannot provide. Truly essential for the modern AI engineer.
– Omar Sanseviero, Developer Experience Lead, Google DeepMind
Sebastian has a rare gift for making complex ML ideas intuitive. Of all the writing on reasoning models, this is a book you can read cover to cover and leave with deep clarity on how to build them.
– Omar Khattab, Assistant Professor, MIT EECS
Build a Large Language Model (From Scratch)
ISBN-13 978-1633437166
Amazon
Manning
Description
In Build a Large Language Model (from Scratch), you’ll discover how LLMs work from the inside out. In this book, I’ll guide you step by step through creating your own LLM, explaining each stage with clear text, diagrams, and examples.
The method described in this book for training and developing your own small-but-functional model for educational purposes mirrors the approach used in creating large-scale foundational models such as those behind ChatGPT. The book uses Python and PyTorch for all its coding examples.
This book is a strong starting point for readers who prefer a bottom-up approach and want to understand how LLMs are built and pretrained before moving on to reasoning-specific...