Build a DeepSeek Model (From Scratch)

Build a DeepSeek Model (From Scratch)

Paperback
Sale price  Rs. 5,129.00 Regular price  Rs. 5,699.00
Skip to product information
Build a DeepSeek Model (From Scratch)

Build a DeepSeek Model (From Scratch)

By: Rajat Dandekar, Sreedath Panat, Naman Dwivedi |  Publisher: Manning Publications |  Year: 2026

ISBN: 9781633434325

MRP: Rs. 5,699.00

You Pay: Rs. 5,129.00

You save: Rs. 570.00 ( 10% )

MRP: Rs. 5,699.00

You Pay: Rs. 5,129.00

You save: Rs. 570.00 ( 10% )

MRP: Rs. 4,727.00

You Pay: Rs. 3,782.00

You save: Rs. 945.00 ( 20% )

Usually ships in 20-30 days after the release date

Release date: 22 December 2026

Reward points: 51 points

🌍 Ships Worldwide

Available for delivery worldwide.

🌍 Available Worldwide

The E-Book is delivered digitally worldwide within 24 hours.

Book Type

Description

"An outstanding resource for anyone who wants to understand LLMs not just conceptually, but at the level where architectural details and training decisions really matter.”
—Dmitry Efimov, Amazon

The open-weight DeepSeek model upended the LLM world with frontier-level performance at a fraction of the training cost. This book gives you an insider’s understanding of the model’s advances and architectural breakthroughs as you build a small-scale version piece by piece. By the final chapter, you’ll have a working mini-DeepSeek running on your laptop, along with an “I built it myself” understanding of its internals.

Build a DeepSeek Model (From Scratch) takes a problem-solution approach to each of DeepSeek’s major innovations. You’ll see how Multi-Head Latent Attention (MLA) compresses the memory of earlier tokens the model keeps on hand as it generates text, sharply reducing its memory needs. You’ll also explore its Mixture of Experts architecture—a collection of small specialist networks that expand the model’s capacity while activating only a fraction of the model for each token. You’ll start with a basic Mixture-of-Experts layer, then introduce DeepSeek’s improvements: smaller experts for finer specialization, shared experts for common knowledge, and better distribution of work among them.

Next comes Multi-Token Prediction, which trains the model to anticipate several upcoming tokens rather than just the next one, helping it learn more from the same training text. This is followed by a deep dive into how DeepSeek’s approach to FP8 quantization trades lower numerical precision for faster computation and lower memory use, without hurting model quality.

You’ll explore DeepSeek’s approach to training by building a full training pipeline and learn how it manages the communications overhead associated with training MoE models. The book closes with readable accounts of DeepSeek’s reasoning training and distillation: how Group Relative Policy Optimization (GRPO) helps the model learn from successful attempts at a problem, and how smaller models learn by comparing several of its own attempts at a problem and favoring the better ones. You’ll even find head-to-head comparisons that let you measure the gains of key features in concrete terms.

Across eight substantial chapters, the story unfolds in clear, plain English and mathematical walkthroughs, illuminating diagrams, and PyTorch code you write yourself. Reviewer Sakshi Mahendru of Palo Alto Networks summarized his feelings: "An incredible pedagogical feat that captures the exact essence of the DeepSeek paper and makes it digestible by grounding architectural theory in from-scratch empirical experiments."

What's inside

  • Build all the key DeepSeek innovations—from scratch!
  • Improve inference with Multi-Head Latent Attention and RoPE
  • Effectively train a Mixture-of-Experts model
  • GRPO reinforcement learning for reasoning



About the reader

For intermediate-to-advanced ML engineers, AI researchers, and graduate students comfortable with PyTorch and deep learning fundamentals.

About the author

Raj Abhijit Dandekar (MIT), Rajat Dandekar (Purdue), and Sreedath Panat (MIT) co-founded Vizuara Labs, which offers dozens of training courses on AI agents and applications that make AI research and development accessible and practical. Naman Dwivedi is an AI researcher.

 

About the Author

Dr. Raj Abhijit Dandekar is a computer scientist and co-founder of Vizuara AI Labs, an online education platform that has trained over 50,000 students globally. He holds a PhD from MIT and is the lead instructor of the popular YouTube series Build DeepSeek from Scratch.

Dr. Rajat Dandekar, PhD in Mechanical Engineering from Purdue University, specializes in applying machine learning to complex physical systems. He co-founded Vizuara AI Labs.

Naman Dwivedi is an AI researcher at Vizuara AI Labs, specializing in turning advanced deep learning concepts into hands-on, practical code.

Dr. Sreedath Pana holds a PhD from MIT and is a co-founder of Vizuara AI Labs. He is an inventor and AI engineer known for creating self-cleaning AI-powered solar technology.

Ebook License

End-User Warranty And License Agreement

1. Grant Of License

Manning Has Authorized The Download By You Of An Unrestricted Number Of Copies Of The Electronic Book (Ebook) In Any Of The Available Formats. Manning Grants You A Nonexclusive, Nontransferable License To Use The Ebook According To The Terms And Conditions Herein. This License Agreement Permits You To Install The Ebook On Any And All Your Devices For Your Personal Use Only.

2. Restrictions

You Shall Not: (1) Share, Resell, Rent, Assign, Timeshare, Distribute, Or Transfer All Or Part Of The Ebook Or Any Rights Granted Hereunder To Any Other Person; (2) Duplicate The Ebook, Except For A Single Backup Or Archival Copy; (3) Remove Any Proprietary Notices, Labels, Or Marks From The Ebook; (4) Transfer Or Sublicense Title To The Ebook To Any Other Party.

3. Intellectual Property Protection

The Ebook Is Owned By Manning And Is Protected By United States And International Copyright And Other Intellectual Property Laws. Manning Reserves All Rights In The Ebook Not Expressly Granted Herein. This License And Your Right To Use The Ebook Terminate Automatically If You Violate Any Part Of This Agreement. In The Event Of Termination, You Must Remove The Original And Any Copies Of The Ebook From All Your Devices.

4. Source Code Supplementary Material

Any Source Code Files Provided As A Supplement To The Book Are Freely Available To The Public For Download. Reuse Of The Code Is Permitted, In Whole Or In Part, Including The Creation Of Derivative Works, Provided That You Acknowledge That You Are Using It And Identify The Source: Title, Publisher And Year.

5. Limited Warranty

Manning Warrants That The Ebook Files, A Copy Of Which You Are Authorized To Download, Are Free From Defects In The Operational Sense That They Can Be Read By A Pdf Reader Or Epub Reader, Or Other. Except For This Express Limited Warranty, Manning Makes And You Receive No Warranties, Express, Implied, Statutory Or In Any Communication With You, And Manning Specifically Disclaims Any Other Warranty Including The Implied Warranty Of Merchantability Or Fitness Or A Particular Purpose. Manning Does Not Warrant That The Operation Of The Ebook Will Be Uninterrupted Or Error Free. If The Ebook Was Purchased In The United States, The Above Exclusions May Not Apply To You As Some States Do Not Allow The Exclusion Of Implied Warranties. In Addition To The Above Warranty Rights, You May Also Have Other Rights That Vary From State To State.

6. Limitation Of Liability

In No Event Will Manning Be Liable For Any Damages, Whether Arising For Tort Or Contract, Including Loss Of Data, Lost Profits, Or Other Special, Incidental, Consequential, Or Indirect Damages Arising Out Of The Use Or Inability To Use The Ebook.

7. General

This Agreement Constitutes The Entire Agreement Between You And Manning And Supersedes Any Prior Agreement Concerning The Ebook. This Agreement Is Governed By The Laws Of The State Of New York.

Book Details
Author Rajat Dandekar, Sreedath Panat, Naman Dwivedi
Publisher Manning Publications
ISBN-13 9781633434325
Year 2026
Pages 416
Binding Paperback
Edition First
Country of Origin USA

You may also like