Building Large Language Models from Scratch (eng)
Language: English
Published by Apress, 2026
- Softcover
- New

Seller: Brook Bookstore On Demand, Napoli, NA, ItalyBrook Bookstore On Demand
AbeBooks seller since October 11, 2022
Condition: New
US$ 56.76
Quantity: Over 20 available
Add to basketItem description from seller
Questo è un articolo print on demand.
Seller Inventory # RSPRNB3STD
- Title
- Building Large Language Models from Scratch (eng)
- Author
- Grigorov, Dilyan
- Publisher
- Apress
- Publication year
- 2026
- Condition
- new
- Binding
- Soft cover
- Language
- English
- ISBN 13
- 9798868822964
- Item weight
- 1.03 kilograms
This book is a complete, hands-on guide to designing, training, and deploying your own Large Language Models (LLMs)—from the foundations of tokenization to the advanced stages of fine-tuning and reinforcement learning. Written for developers, data scientists, and AI practitioners, it bridges core principles and state-of-the-art techniques, offering a rare, transparent look at how modern transformers truly work beneath the surface.
Starting from the essentials, you’ll learn how to set up your environment with Python and PyTorch, manage datasets, and implement critical fundamentals such as tensors, embeddings, and gradient descent. You’ll then progress through the architectural heart of modern models, covering RMS normalization, rotary positional embeddings (RoPE), scaled dot-product attention, Grouped Query Attention (GQA), Mixture of Experts (MoE), and SwiGLU activations, each explored in depth and built step by step in code. As you advance, the book introduces custom CUDA kernel integration, teaching you how to optimize key components for speed and memory efficiency at the GPU level—an essential skill for scaling real-world LLMs. You’ll also gain mastery over the phases of training that define today’s leading models:
- Pretraining - Building general linguistic and semantic understanding.
- Midtraining - Expanding domain-specific capabilities and adaptability.
- Supervised Fine-Tuning (SFT) - Aligning behavior with curated, task-driven data.
- Reinforcement Learning from Human Feedback (RLHF) - Refining responses through reward-based optimization for human alignment.
The final chapters guide you through dataset preparation, filtering, deduplication, and training optimization, culminating in model evaluation and real-world prompting with a custom TokenGenerator for text generation and inference.
By the end of this book, you’ll have the knowledge and confidence to architect, train, and deploy your own transformer-based models, equipped with both the theoretical depth and practical expertise to innovate in the rapidly evolving world of AI.
What You’ll Learn
- How to configure and optimize your development environment using PyTorch
- The mechanics of tokenization, embeddings, normalization, and attention mechanisms.
- How to implement transformer components like RMSNorm, RoPE, GQA, MoE, and SwiGLU from scratch.
- How to integrate custom CUDA kernels to accelerate transformer computations.
- The full LLM training pipeline: pretraining, midtraining, supervised fine-tuning, and RLHF.
- Techniques for dataset preparation, deduplication, model debugging, and GPU memory management.
- How to train, evaluate, and deploy a complete GPT-like architecture for real-world tasks.
Who this book is for:
Software developers, data scientists, machine learning engineers and AI enthusiasts looking to build their models from scratch.
"Synopsis" may belong to another edition of this title.
About the Author
Dilyan Grigorov is a software developer with a passion for Python software development, generative deep learning & machine learning, data structures, and algorithms. He is an advocate for open source and the Python language itself. He has 16 years of industry experience programming in Python and has spent 5 of those years researching and testing Generative AI solutions. His passion for them stems from his background as an SEO specialist dealing with search engine algorithms daily. He enjoys engaging with the software community, often giving talks at local meetups and larger conferences. In his spare time, he enjoys reading books, hiking in the mountains, taking long walks, playing with his son, and playing the piano.
"About the title" may belong to another edition of this title.
Brook Bookstore On Demand
Napoli, NA, Italy
AbeBooks seller since October 11, 2022
Shipping rates from Italy to U.S.A.
| Item | 25 to 40 business days | 60 to 60 business days |
|---|---|---|
| First item | US$ 12.07 | US$ 560.58 |
Payment methods
Store description
Account dedicated to Print on Demand titles. Brook Bookstore offers a wide selection of books with a continuously updated catalog and fast shipments all over the world. We hold distribution rights with all of the publishers we promote and are in continuous search of new interesting titles to propose to our customers. We are part of Brandon Group SRL (an Italian company) and all of the orders are shipped from Europe. Depending on availability orders will be picked from our different warehouses. CONTACT US If you have any questions please do not hesitate to contact us sending a message to our store. We have a well prepared customer service team who will be happy to assist you. Our working hours are from Monday to Friday from 9:30 to 18:30 (CET, UTC +1) so messages received during the weekends might be responded with a slight delay but we guarantee you will get back to you as soon as possible. RETURNS If you want to return your order, please submit your request through Abebooks platform. Returns requests are managed case by case by our team and always in line with Abebooks policies: AbeBooks’ Return Policy guarantees that you can return any book for a refund within 30 days, when the return is due to an error on the bookseller’s part. When the motive of the return is not due to an error of the seller it is up to Brook Bookstore to accept the return or else after studying the case. CANCELLATION You can send a cancellation request to our customer service team while the package has not yet been shipped. After that we cannot ensure we can retrieve the parcel but we suggest you to get in touch with us in order to verify the case. INVOICE You can request the invoice to be issued together with the shipment of the order or, at the latest, in the same month of the shipment. …
Specialty
Print on DemandSeller's business information
Brandon Group S.R.L.
Via Vannella Gaetani 27, Brandon Group
Napoli, NA Italy 80121
Terms of sale
Account dedicated to Print on Demand titles.
CANCELLATION
You can send a cancellation request from the order page while the package has not yet been shipped. After that we cannot ensure we can retrieve the parcel but we suggest you to get in touch with us in order to verify the case.
INVOICE
You can request the invoice to be issued together with the shipment of the order or, at the latest, in the same month of the shipment.
RETURNS
If you want to return your order, please contact us for authorization or place a request on the order page. Orders returned without authorization may not be credited.
If your order presents damages or any other issue on arrival we must be advised of this within 14 days of delivery in order to find the most suitable solution for you.
Returns for Brook Bookstore (Brandon Group SRL) are only accepted in the following addresses:
Return address in the United Kingdom:
MHI
(c/o BR Books)
82 Feeder Road
Bristol
BS2 0TQ
UK
Return address in Italy (for all EU countries):
Brandon Group c/o TWS
Via Trento, 9
20067 Tribiano (MI) – Italy
Return address in Japan:
Brandon Group JP
c/o Windows, Inc.
Mr. Jiro Asami
2-12-7-504 Oshiage, Sumida-ku
Tokyo 131-0045 Japan
Return address in the USA:
TruLogic- EZI - Brook Bookstore
5401 NW 72nd ave
MIami FL 33166-4941
Return address in Australia:
Active - Ezi - - Brook Bookstore
2/2-4 Federation Way,
Moorabbin Airport
Mentone, 3194
Victoria
AUSTRALIA
Return address in Canada:
No3rd - Ezi - - Brook Bookstore
520 Ave Lepine
Dorval QC H9P 2V6
CANADA
Return address in Mexico:
Chronos - EZI - Brook Bookstore
Calle Duba 112
Parque industrial Logistik II
79526 Villa de Reyes
San Luis Potosi
*For returns from other areas please contact us in order to provide further assistance.