Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Hi all, I am excited to share that the first chapters of Build A Reasoning Model (From Scratch) are now live!

This book is basically a sequel to Build A Large Language Model (From Scratch), starting with a pre-trained model (the Qwen3 model implemented in the bonus materials of this repository) and developing reasoning methods on top of it (inference-time scaling, reinforcement learning, and distillation).

This https://github.com/rasbt/LLMs-from-scratch repo will remain my main repo (and I plan to add bonus material in the future).

However, since reasoning is a big topic in itself, there is now the separate https://github.com/rasbt/reasoning-from-scratch repo for all the reasoning-related material so that things don't become too cluttered here.

I hope you'll like the new content!

You must be logged in to vote

Replies: 10 comments · 10 replies

Comment options

Already got myself a copy. Your first book was amazing. 😁

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Aug 29, 2025
Maintainer Author

Thanks @JohnMachado11 ! I hope you'll like this one too (it's definitely more challenging to write as reasoning methods can be very verbose and resource intensive 😅)

Comment options

Great repo I'll also check out the book

You must be logged in to vote
0 replies
Comment options

Have read the first one and keen to get my hands on the sequel , chapters on the GitHub look amazing and interesting

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Aug 29, 2025
Maintainer Author

Thanks @Akshitwadhwa !

Comment options

Your first book was amazing.
Great repo I'll also check out the book

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Sep 2, 2025
Maintainer Author

Thanks @bhawanaqutabgarh-sketch !!

Comment options

Nothing cannot we

You must be logged in to vote
0 replies
Comment options

Your first book helped me so much with securing my current position as an AI engineer. Thank you so much! Excited to get this book with my next paycheck :)

You must be logged in to vote
3 replies
@rasbt
Comment options

rasbt Sep 2, 2025
Maintainer Author

Congrats on landing the role, that's awesome to hear! and thanks for the kind support and words; it's very motivating that the book is actually useful (and I hope the new one will be too)!

@takeachangs
Comment options

Hi Sebastian,

Thank you once again! I often refer to your book during discussions with my coworkers, and I’ve started translating some parts into Korean for their convenience. Within the Korean AI community, I’ve noticed that many are struggling with the book due to the language barrier. I was wondering how I might contact you directly to discuss the possibility of translating your "LLM from Scratch" into Korean.

Cheers!

@rasbt
Comment options

rasbt Oct 8, 2025
Maintainer Author

Thanks for recommending my book, and thanks for offering to work on a Korean translation. Actually, I recently saw that it was already translated and published last month. I hope this is useful:

Screenshot 2025-10-08 at 2 28 26 PM

The ISBN is 979-11-4071-584-8

Comment options

BTW, why most reasoning models choose to build on top of QWEN?

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Sep 2, 2025
Maintainer Author

I discussed the choice a bit more in chapter 2. Tl;dr: it has real open source license without strings attached, is very good, and there is an existing reasoning variant that we can use as a baseline.

Comment options

Hi @rasbt, I am a ML Engineer at Tesla Optimus. I really enjoyed your first book and recently trained a LLM from scratch locally on a laptop as a hobby project https://github.com/Ankur-Deka/GPT-from-scratch

Excited to learn more from the new book! Thanks for the great quality content.

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Sep 2, 2025
Maintainer Author

Nice! Glad to hear that you liked my previous book (and are looking forward to this one as well). Btw I took a quick look at your repo: amazing how compact the code is!

Comment options

Would it be a good book for beginners who are somewhat familiar with python?

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Sep 13, 2025
Maintainer Author

I hope so! Like for the Build A Large Language Model (From Scratch) book, I recommend PyTorch knowledge, but otherwise, I think it should be fine. I covered the PyTorch essentials here in a somewhat compact and efficient way: https://sebastianraschka.com/teaching/pytorch-1h/

Comment options

is it only on Python?

You must be logged in to vote
1 reply
@rasbt
Comment options

rasbt Sep 16, 2025
Maintainer Author

It's Python (and specifically PyTorch). Please let me know in case you have any follow-up questions about this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Morty Proxy This is a proxified and sanitized view of the page, visit original site.