Building Large Language Models from Scratch
Language: English
Published by APRESS L.P. Mai 2026, 2026
- Softcover
- New

Condition: New
£ 55.27
Quantity: 2 available
Add to basketItem description from seller
Neuware -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.
Seller Inventory # 9798868822964
- Title
- Building Large Language Models from Scratch
- Author
- Dilyan Grigorov
- Publisher
- APRESS L.P. Mai 2026
- Publication year
- 2026
- Condition
- Neu
- Binding
- Taschenbuch
- Language
- English
- ISBN 13
- 9798868822964
- Item weight
- 1,032 grams
- Dimensions
- 254x178x30 mm
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.
Shipping rates from Germany to U.S.A.
| Item | 9 to 30 business days | 8 to 14 business days |
|---|---|---|
| First item | £ 21.69 | £ 27.54 |
Payment methods
- Bank Wire Transfer
- Cash
- Cash on Delivery
- Check
- Paypal
Store description
Die Schreibwaren sind im Büro, in der Schule und Zuhause allgegenwärtig und auch im Computerzeitalter nicht aus dem Alltag wegzudenken. Schreibwaren Wegmann ist Ihr Online Shop für Bürobedarf und Schulbedarf, der das ganze Sortiment an Büromaterial und Schulsachen zu günstigen Preisen online zu kaufen bietet. In unserem ständig wachsendem Angebot im Online Shop führen wir derzeit viele tausend Büroartikel, alles rund um die Schule, Bürotechnik, Büroeinrichtung bis hin zu ausgefallenen Geschenkartikeln und Postkarten, originell oder regional aus der Region Bayerischer Wald, Böhmerwald, Arberland und Zwiesel. Schreibwaren Wegmann ist Ihr Schreibwarengeschäft. Besuchen Sie uns gerne auch persönlich in unserem Schreibwarenladen in Zwiesel am Stadtplatz 6. Wir heißen Sie herzlich willkommen. Unsere Öffnungszeiten im Schreibwarengeschäft: Montag - Freitag : 07.30 - 19.00 Uhr, Samstag 07.30 - 16.00 Uhr. Und natürlich rund um die Uhr, 24/7, im Schreibwaren Online Shop.…
Seller's business information
Metz Wegmann GmbH
Waldbahnstraße 94
Zwiesel, Germany 94227
Terms of sale
Metz Wegmann GmbH
Waldbahnstr. 94
94227 Zwiesel
Deutschland
Tel.: 09922609490
Fax: 09922609491
E-Mail: info@schreibwaren-wegmann.de
Registergericht: Amtsgericht Deggendorf
Registernummer: HRB 5721
Geschäftsführer: Janos Metz
Umsatzsteuer-Identifikationsnummer: DE364194228
Verantwortliche/r i.S.d. § 18 Abs. 2 MStV:
Janos Metz, Stadtplatz 6, 94227 Zwiesel
Zuständige Aufsichtsbehörde für das Angebot audiovisueller Mediendienste:
Bayerische Landeszentrale für neue Medien (BLM), Heinrich-Lübke-Straße 27, 81737 München, Deutschland
Wir sind zur Teilnahme an einem Streitbeilegungsverfahren vor einer Verbraucherschlichtungsstelle weder verpflichtet noch bereit.
Betriebsstätte:
Stadtplatz 6
94227 Zwiesel
Deutschland
Right of withdrawal
If you are a consumer you can withdraw from the contract in accordance with the following. Consumer means any natural person who is acting for purposes which are outside his trade, business, craft or profession.
Information regarding the right of withdrawal
Statutory right to withdraw
You have the right to withdraw from this contract within 14 days without giving any reason.
The withdrawal period will expire after 14 days from the day on which you acquire, or a third party other than the carrier and indicated by you acquires, physical possession of the last good or the last lot or piece.
To exercise the right of withdrawal, electronically fill in and submit a clear statement on our website, under "My Purchases" in "My Account". We will communicate to you an acknowledgement of receipt of such a withdrawal on a durable medium (e.g. by e-mail) without delay.
To meet the withdrawal deadline, it is sufficient for you to send your communication concerning your exercise of the right of withdrawal before the withdrawal period has expired.
Effects of withdrawal
If you withdraw from this contract, we will reimburse to you all payments received from you, including the costs of delivery (except for the supplementary costs arising if you chose a type of delivery other than the least expensive type of standard delivery offered by us).
We may make a deduction from the reimbursement for loss in value of any goods supplied, if the loss is the result of unnecessary handling by you.
We will make the reimbursement without undue delay, and not later than 14 days after the day on which we are informed about your decision to withdraw from this contract.
We will make the reimbursement using the same means of payment as you used for the initial transaction, unless you have expressly agreed otherwise; in any event, you will not incur any fees as a result of such reimbursement.
We may withhold reimbursement until we have received the goods back, or you have supplied evidence of having sent back the goods, whichever is the earliest.
You shall send back the goods or hand them over to Wegmann1855, Zwiesel, Germany, +49 22609490, without undue delay and in any event not later than 14 days from the day on which you communicate your withdrawal from this contract to us. The deadline is met if you send back the goods before the period of 14 days has expired. You will have to bear the direct cost of returning the goods. You are only liable for any diminished value of the goods resulting from the handling other than what is necessary to establish the nature, characteristics and functioning of the goods.
Exceptions to the right of withdrawal
The right of withdrawal does not apply to:
- The delivery of newspapers, journals or magazines with the exception of subscription contracts; and
- The supply of digital content which is not supplied on a tangible medium (e.g. on a CD or DVD) if you accepted when you placed your order that we could start to deliver it, and that you could not withdraw once delivery had started.