Refresh Your Home For Fall
To see product details, add this item to your cart. You can always remove it later.
Shipper / Seller
Amazon.com
Amazon.com
Shipper / Seller
Amazon.com
Returns
30-day refund / replacement
30-day refund / replacement
This item can be returned in its original condition for a full refund or replacement within 30 days of receipt.
Read full return policy
Payment
Secure transaction
Your transaction is secure
We work hard to protect your security and privacy. Our payment security system encrypts your information during transmission. We don’t share your credit card details with third-party sellers, and we don’t sell your information to others. Learn more
Gift options
Available at checkout
Available at checkout This item is a gift. Change
At checkout, you can add a custom message, a gift receipt for easy returns and have the item gift-wrapped
Added to

Sorry, there was a problem.

There was an error retrieving your Wish Lists. Please try again.

Sorry, there was a problem.

List unavailable.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

  • Build a Reasoning Model (From Scratch)
  • First Chapter Summary
  • VIDEO

Follow the author

Get new release updates & improved recommendations
Something went wrong. Please try your request again later.

Build a Reasoning Model (From Scratch)

4.8 out of 5 stars (46)

Purchase options and add-ons

Get the eBook free when you register your print book at Manning.

"An exceptional deep dive into the next frontier of AI.”
—Aman Chadha, Google

This book is a practical guide to understanding how modern reasoning-oriented LLMs work by building their core methods step by step. The book tells a clear engineering story: start with a conventional pre-trained LLM, learn how text generation works, build reliable evaluation tools, improve reasoning through inference-time methods, then move into training-based approaches such as reinforcement learning and distillation.

The progression is deliberate. Early chapters establish the baseline model and explain text generation, KV caching, and evaluation with math verifiers. The middle chapters show how reasoning can be improved without changing model weights, using chain-of-thought prompting, sampling, self-consistency, response scoring, and self-refinement. Later chapters move to changing the model itself through reinforcement learning with verifiable rewards, GRPO improvements, format rewards, and finally distillation from stronger reasoning models into smaller ones.

The book is especially useful because it implements the core methods from scratch rather than treating them as black-box library calls. Readers see how self-consistency, self-refinement, Best-of-N, and training-based methods actually work, including their cost and latency trade-offs. It also discusses common failure modes, including cases where refinement can make answers worse. Difficult concepts such as softmax, temperature, and top-p sampling are clarified with code-linked explanations and diagrams, and visual workflows make pipelines and scoring methods easier to follow.

Reading the book feels like following a guided technical build rather than a loose survey of AI topics. Each concept is introduced because the project now needs it. Diagrams, roadmaps, code listings, exercises, and repeated workflow summaries help readers stay oriented through advanced material. This structure reflects
Sebastian Raschka’s professional strength: explaining complex machine learning topics by making every detail concrete and showing exactly where each section fits in the larger story. He does not treat mechanisms like evaluation, log-probabilities, KL regularization, or distillation as isolated abstractions; he connects them to the goal of making reasoning models understandable and implementable.

Physically and organizationally, the book has eight chapters and seven substantial appendixes. That design keeps the main narrative focused while moving supporting material like references, exercise solutions, model source code, larger models, batching, evaluation alternatives, and chat interfaces into ordered appendixes. The result is a logically flowing book that remains hands-on, navigable, and technically deep without constantly interrupting the central build.

What's inside

• From-scratch implementations of core LLM reasoning improvements
• Verifier-based evaluation methods
• RL with automatic verifiers for mathematics tasks

About the reader

For readers who know Python and have some knowledge of machine learning.

About the author

Sebastian Raschka is an LLM Research Engineer with over a decade of experience. He is the author of the bestselling book Build a Large Language Model (From Scratch).

Table of Contents

1 Understanding reasoning models
2 Generating text with a pretrained LLM
3 Evaluating reasoning models
4 Improving reasoning with inference-time scaling
5 Inference-time scaling via self-refinement
6 Training reasoning models with reinforcement learning
7 Improving GRPO for reinforcement learning
8 Distilling reasoning models for efficient reasoning
A References and further reading
B Exercise solutions
C Qwen3 LLM source code
D Using larger LLMs
E Batching and throughput-oriented execution
F Common approaches to model evaluation
G Building a chat interface

Frequently bought together

This item: Build a Reasoning Model (From Scratch)
$47.82
Get it as soon as Sunday, Sep 20
In Stock
Ships from and sold by Amazon.com.
+
$49.24
Get it as soon as Sunday, Sep 20
In Stock
Ships from and sold by Amazon.com.
+
$59.99
Get it as soon as Monday, Sep 21
In Stock
Ships from and sold by Amazon.com.
Total price: $00
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

Customers also bought or read

Loading...

From the Publisher

Build a Reasoning Model (From Scratch) header

Build a Reasoning Model (From Scratch) quote 1

"Distills the profound ideas in the clearest, most accessible way."

Byron Hsu, LMSYS

Build a Reasoning Model (From Scratch) quote 2

“Big. Dope. Great read, fun writing."

Chris Alexiuk, NVIDIA

Build a Reasoning Model (From Scratch) quote 3

“The gold standard for developers wanting to build at the cutting edge of AI."

Omar Sanseviero, Author of Hands-On Generative AI with Transformers and Diffusion Models

Build a Reasoning Model (From Scratch) about the book

why this book?

Build a Reasoning Model (From Scratch) helps you understand modern reasoning-oriented LLMs by building their core techniques from scratch rather than treating them as black boxes.

The book gives practical experience with evaluation, inference-time scaling, self-consistency, self-refinement, reinforcement learning with verifiable rewards, GRPO, and distillation.

Readers who know Python and some machine learning will gain a clear, hands-on path from using a pretrained LLM to improving, training, and evaluating reasoning models.

about manning

about Manning

Manning helps developers and tech professionals stay ahead in a fast-moving industry with expert-led books, videos, and projects. Learning never stops, but it’s hard to keep up, so we focus on content that’s practical, clear, and trusted. As an independent publisher, we adapt quickly, from pioneering early-access books to offering DRM-free eBooks. Our series, like "In Action" and "In a Month of Lunches", reflect a commitment to making complex topics accessible.

Deep Learning with Python, Third Edition
AI Agents in Action
Build a Large Language Model (From Scratch)
LLMs in Production: From language models to successful products
Data Analysis with LLMs: Text, tables, images and sound (In Action)
Causal AI
Customer Reviews
4.2 out of 5 stars 42
4.0 out of 5 stars 51
4.5 out of 5 stars 613
4.5 out of 5 stars 36
4.8 out of 5 stars 7
4.4 out of 5 stars 14
Level of proficiency Intermediate Intermediate Intermediate Intermediate Intermediate Advanced
About the reader For readers with intermediate Python skills. For intermediate Python programmers. Readers need intermediate Python skills and some knowledge of machine learning. For data scientists and ML engineers. For data scientists and data analysts. For data scientists and machine learning engineers.
Special features Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant. Includes liveBook with out built-in AI assistant.
Pages 648 344 368 456 232 520

Editorial Reviews

About the Author

Sebastian Raschka has been working on machine learning and AI for more than a decade. Sebastian joined Lightning AI in 2022, where he now focuses on AI and LLM research, developing open-source software, and creating educational material. Prior to that, Sebastian worked at the University of Wisconsin-Madison as an assistant professor in the Department of Statistics, focusing on deep learning and machine learning research. He has a strong passion for education and is best known for his bestselling books on machine learning using open-source software.

Product details

  • Publisher ‏ : ‎ Manning
  • Publication date ‏ : ‎ August 11, 2026
  • Language ‏ : ‎ English
  • Print length ‏ : ‎ 440 pages
  • ISBN-10 ‏ : ‎ 1633434672
  • ISBN-13 ‏ : ‎ 978-1633434677
  • Item Weight ‏ : ‎ 15.8 ounces
  • Dimensions ‏ : ‎ 7.38 x 1 x 9.25 inches
  • Best Sellers Rank: #9,252 in Books (See Top 100 in Books)
  • Customer Reviews:
    4.8 out of 5 stars (46)

About the author

Follow authors to get new release updates, plus improved recommendations.
Sebastian Raschka
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

Sebastian Raschka, PhD is an LLM Research Engineer with over a decade of experience in artificial intelligence. His work bridges academia and industry, including roles as senior engineering staff at an AI company and a statistics professor.

As an independent researcher and industry expert, Sebastian collaborates with companies on AI solutions and serves on the Open Source Advisory Board at University of Wisconsin–Madison.

Sebastian specializes in LLMs and the development of high-performance AI systems, with a deep focus on practical, code-driven implementations.