Blog Archives

Book Review: Build a Large Language Model from Scratch

Every now and again, a learning resource will arise that perfectly matches the technology trends of the day and provide a path forward for those who wish to obtain a commanding knowledge of the underlying foundation for the technology. Today, of course, the technology is large language models (LLMs), and the learning resource is a new title by prolific industry luminary Sebastian Raschka, Ph.D., “Build a Large Language Model from Scratch” from Manning Publications.

The overarching premise of the book is aligned with a quote from famed theoretical physicist and Nobel laureate Richard Feynman who said, “I don’t understand anything I can’t build.” And so, with this timely book you can indeed build your own LLM from ground zero. The book guides the reader through building a GPT-2 sized LLM (using publicly available GPT-2 weights) which can be done on a regular laptop. Supplemental book materials show how to scale this process to a Llama 3.2 scale model with a billion parameters (but you likely won’t be able to build such a model on a laptop).

I’ve been working with this book for several months as part of the publisher’s incredibly helpful program: Manning Early Release Program (MEAP). I discovered the book from the author’s posts on Twitter and LinkedIn. I knew of Raschka from his popular Youtube channel containing some amazing educational content. So, I took the plunge and started a methodical consumption of how to build an LLM. My experience was captivating. I could not put the book down. In fact, I reserved all my weekends for digging deep into the book. The book never left my backpack (still hasn’t).

This book is incredibly thorough as Raschka’s teaching style, honed from his time as a professor of statistics at the University of Wisconsin-Madison, is well-structured for a productive learning experience. Currently, he works for Lightning AI as a staff research engineer.

[Read full book review HERE]