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...
Methods and Workflows for Fine-Tuning and Deploying Large Language Models on Limited Hardware
Minimum price
14ドル.99
24ドル.99
Buying multiple copies for your team? See below for a discount!
About the Book
This technical guide provides a comprehensive overview of the Unsloth framework, a library designed to accelerate the fine-tuning of Large Language Models (LLMs) while significantly reducing memory consumption. By leveraging custom Triton kernels and manual backpropagation, Unsloth allows practitioners to train models like Llama-3, Mistral, and Gemma on consumer-grade hardware that would typically require enterprise-level clusters.
The book moves through the end-to-end engineering lifecycle of an LLM, from environment configuration and memory budgeting to production deployment. It focuses on the architectural and mathematical principles that enable "extreme" fine-tuning, providing a detailed look at how high-performance Python patterns intersect with tensor mathematics.
Key Technical Topics Covered:
Designed for Machine Learning Engineers, MLOps specialists, and Senior Python Developers, this volume treats LLM fine-tuning as a deterministic software engineering problem. It provides the necessary foundations to build specialized, high-performance AI systems within strict hardware constraints.
Table of contents
Chapter 1: Performance Characteristics of Unsloth Compared to Standard Fine-Tuning Approaches
Chapter 2: Setting Up the Foundry - Installation, CUDA Requirements, and Triton
Chapter 3: The FastLanguageModel Class - Loading Llama-3, Mistral, and Gemma
Chapter 4: Under the Hood - Understanding 4-bit Quantization and Memory Gradients
Chapter 5: Your First Turbo-Charged Run - Fine-Tuning a Model in Under 10 Minutes
Chapter 6: Preparing the Knowledge - Advanced Dataset Mapping for Unsloth
Chapter 7: Formatting for Conversations - Mastering ChatML and Instruction Templates
Chapter 8: LoRA and QLoRA Decoded - Configuring Rank, Alpha, and Target Modules
Chapter 9: The Training Loop - Managing Epochs, Learning Rates, and SFTTrainer
Chapter 10: Performance Monitoring - Integration with Weights & Biases (W&B) for Unsloth
Chapter 11: Breaking the Memory Barrier - Techniques for Training on 8GB/12GB VRAM GPUs
Chapter 12: DPO (Direct Preference Optimization) - Aligning Models with Unsloth Speed
Chapter 13: Long Context Fine-Tuning - Expanding RoPE Scaling and Context Windows
Chapter 14: Vision-Language Fine-Tuning - Introduction to Training Multimodal Models
Chapter 15: Debugging the Brain - Common Training Instabilities and Loss Spikes
Chapter 16: The Art of Conversion - Exporting to GGUF for Ollama and LM Studio
Chapter 17: Serving at Scale - Merging LoRA Weights and Exporting for vLLM
Chapter 18: Quantization Mastery - Creating Custom 4-bit, 5-bit, and 8-bit GGUF Levels
Chapter 19: API Integration - Deploying your Unsloth-Tuned Model with FastAPI
Chapter 20: Capstone Project - Fine-Tuning a Reasoning Model (Think-Chain) for Complex Logic
Chapter 21: The Visual Paradigm - Orchestrating AI with Unsloth Studio
If printed, this book would span over 500 pages. Each chapter is structured into theoretical foundations, an annotated basic example, an annotated advanced example, and five coding exercises based on real-world scenarios with complete solutions.
Team Discounts
Get a team discount on this book!
Up to 3 members
Up to 5 members
Up to 10 members
Up to 15 members
Up to 25 members
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.