The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...

Build a complete understanding of modern large language models from the inside out. This bundle takes you from transformer architecture and model training to inference optimization, quantization, and local deployment. Learn how LLMs are built, compressed, accelerated, and run efficiently using real-world tools, practical code, and proven engineering techniques.
Bought separately
$145
Minimum price
$75.00
$89.00
About the Bundle
Master the full stack of modern AI systems—from understanding transformer architecture and training models from scratch to optimizing, compressing, and deploying high-performance LLMs on your own hardware.
This comprehensive bundle brings together five practical engineering guides that take you deep inside the technologies powering today’s AI revolution. Whether you are a machine learning engineer, systems programmer, AI researcher, or developer building the next generation of intelligent applications, this collection gives you the knowledge and hands-on skills to build, optimize, and run large language models without relying on black-box APIs.
Start with the foundations in Building Large Language Models from Scratch, where you will build a complete transformer-based LLM using Python and PyTorch. Learn how tokenization, attention, training pipelines, fine-tuning, alignment, and deployment work from the ground up.
Then move into production-grade inference with Inside llama.cpp and Rust for LLM Inference, exploring the engines that make local and scalable AI possible. Learn how modern inference systems work internally, how to optimize performance across CPUs and GPUs, and how to build efficient serving infrastructure using C/C++ and Rust.
Unlock the power of smaller, faster models with LLM Quantization Recipes, a practical guide to compressing large models while preserving intelligence. Master techniques like GPTQ, AWQ, GGUF, and NF4, and learn how to make advanced AI models run efficiently on real-world hardware.
Finally, take AI fully local with Local Intelligence, your guide to running powerful open-source LLMs directly on Apple Silicon Macs. Learn how to use llama.cpp, Ollama, MLX, and Hugging Face tools to build private, cost-effective AI applications powered entirely by your own machine.
Inside this bundle, you will learn:
• How transformer-based large language models are built from the ground up • How tokenization, attention, training, and fine-tuning work internally • How inference engines execute and optimize LLM workloads • How to build high-performance AI infrastructure with Rust and C/C++ • How quantization reduces memory usage while maintaining model quality • How to deploy local LLMs on laptops, desktops, and production servers • How to run powerful AI models privately without depending on cloud APIs • How to benchmark, optimize, and select the right tools for your hardware
Whether you want to understand AI at the architectural level, build your own inference engine, run models locally, or engineer production-ready LLM systems, this bundle provides a complete roadmap from first principles to advanced deployment.
Build. Optimize. Deploy. Own your AI stack.
About the Books
This book is a complete guide to understanding and building large language model inference engines in Rust. It takes you from the mathematical foundations of the transformer architecture through tokenization, attention mechanisms, KV caching, quantization, batching strategies, GPU and CPU optimization, distributed serving, and production deployment. Along the way, you will see idiomatic Rust code examples, performance benchmarks, comparisons with leading frameworks like vLLM, TGI, llama.cpp, Candle, Burn, and mistral.rs, and practical insights for shipping inference systems that rival the best open-source and commercial offerings. Whether you are a systems programmer interested in AI infrastructure or an ML engineer curious about the Rust ecosystem, this book gives you the depth to build, optimize, and understand.
This book takes you from zero to production with llama.cpp, the C/C++ inference engine that has become the backbone of local AI. You will learn how to build it from source on Linux, macOS, and Windows; understand the GGUF file format and quantization trade-offs; master every command-line tool; deploy a production-ready API server; and tune performance across CUDA, ROCm, Vulkan, Metal, and CPU backends. Whether you are running models on a laptop, a gaming PC, or a data center GPU, this book gives you the knowledge to extract maximum value from your hardware.
Large language models have become too big to run on a single GPU. Quantization is the technology that makes them deployable, and it has evolved from an academic curiosity into an engineering discipline with its own algorithms, toolchains, and best practices. This book explains how LLM quantization works, from first principles through production deployment. You will learn the internals of GPTQ, AWQ, GGUF, NF4, and other methods; understand their trade-offs in quality, speed, and memory; and find clear guidance for choosing the right approach for your hardware and use case. Along the way you will encounter real benchmarks, reproducible code examples, and a decision framework for navigating one of the most rapidly evolving areas of applied machine learning.
Large language models power some of the most powerful software tools ever built, yet their inner workings remain mysterious to most developers. This book changes that. Starting from raw text and ending with a live inference API, you will build a complete LLM training pipeline from scratch using PyTorch. Every concept is explained clearly, every code listing is production-quality, and every chapter ends with hands-on exercises that cement your understanding. By the time you finish, you will understand tokenization, attention, positional encoding, transformer architecture, data curation, distributed training, fine-tuning, alignment, evaluation, and deployment at a level that no API wrapper can provide.
This book is a complete, practical guide to running large language models entirely on your own Mac. If you have an M1, M2, or M3 MacBook and want to deploy open-source LLMs locally for privacy, cost savings, or independence from cloud APIs, this book takes you from zero to mastery. You will learn the hardware architecture that makes Apple Silicon uniquely suited for this work, master every major inference framework (llama.cpp, Ollama, MLX, and Hugging Face Transformers), understand quantization strategies that fit billion-parameter models into your unified memory, and build real applications with local AI. Every technique described is fully open-source, reproducible on macOS, and grounded in real benchmarks and working code.
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earned over $15 million writing, publishing and selling on Leanpub.
Learn more about writing on Leanpub
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.