I am excited to announce that my new book, LLM Customization and Fine-Tuning: Adaptation, Distillation, and Alignment, written with Weehyong Tok , is now available in Early Access (MEAP) from Manning Publications . π

A general-purpose model API is a fine place to start. Sooner or later, though, most teams need something an API cannot provide: a model that speaks their house terminology and calls their internal tools, that keeps sensitive data within their own boundaries, that meets a latency budget, and that behaves predictably after launch. That means adapting a model you own and run yourself. This book is a practical, end-to-end guide to doing exactly that and to keeping the result reliable in production.
Special launch offer
The book is 50% off sitewide at manning.com
through July 23. After that, you can still get 50% off through August 6 with my code MLLLMFT, valid for all formats.
π Get your copy here .
Why we wrote it
Weehyong and I kept answering the same question. A team has a real use case and a hardware budget, and they ask: which adaptation technique should we use, and how? The answers were scattered across papers and disconnected tutorials, and too many were toy demos that did not survive contact with a real dataset or a production requirement. We wanted one reproducible, honest reference that runs the whole way, from the first prompt to a monitored deployment.
What makes it different
A single assistant you build end to end. The goal is not a generic chatbot; it is a system that answers in your house format, names the right internal tools, and gets your domain right, on data that never has to leave your control. One model, one dataset, and one running example anchor the whole book: every chapter adapts Qwen3-4B-Instruct-2507 on a real IT-support dataset built from Stack Exchange communities (Super User, Ask Ubuntu, and Server Fault, with a small general-knowledge slice mixed in), and you carry a single enterprise IT help-desk assistant from few-shot prompting to a LoRA adapter, a fully fine-tuned model, a distilled student, a preference-aligned model, and finally a monitored production deployment. Along the way, you also learn to build the data itself, including generating synthetic, teacher-produced training examples for the cases where real labeled data runs short. Because the model, the data, and the task stay fixed, you can compare techniques fairly and watch the same problem solved at every rung of the spectrum.

The full spectrum, and a framework to choose. The book covers prompting and RAG, parameter-efficient fine-tuning (LoRA/QLoRA), full supervised fine-tuning, knowledge distillation, and preference-based alignment (DPO). Just as important, it gives you an explicit framework to decide between them, weighing cost, latency, privacy, and return on investment, so you are choosing on evidence rather than guessing or defaulting to whatever you used last time.
Your own hardware, at any scale. Every hands-on example runs on a single GPU you can actually get hold of, and much of it on a laptop. We use a small open-weights model on purpose, so you can run everything yourself and learn by doing. The techniques are model-size-agnostic: LoRA, QLoRA, SFT, distillation, and DPO apply unchanged to the far larger models most enterprises deploy, where scaling up is a matter of more memory and compute, not different methods. These are the same techniques now used in managed enterprise tuning services; this book is the vendor-neutral, do-it-yourself counterpart that teaches them and the operational layer that those services abstract away.
The operational layer most books skip. Training a model is only half the job. The book devotes a full chapter to what decides whether a model survives past launch: model and data versioning, drift detection with canary prompts, rollback procedures, and continuous safety monitoring.
Reproducible and honest. Two commitments run through every chapter: everything is reproducible on hardware you can actually get, and we are honest about the trade-offs, including when a technique does not win. It is all in the open in the companion repository: the code, the trained models on Hugging Face, and the training and evaluation logs, including the experiments that fell flat. The book reproduces its published numbers on a single GPU. It is validated end-to-end across accelerators, from a 24 GB NVIDIA A30 up to an H200, on AMD (MI300X via ROCm) and on Apple Silicon, so you can reproduce every result and learn as much from what failed as from what worked.
What’s inside
The book builds in the order you would actually work, one chapter at a time:
- Why model adaptation? When adapting a model earns its keep, and when an API is the right answer.
- How to do model adaptation. The full spectrum and the decision framework, end to end.
- What data do I need for model adaptation? Sourcing, quality-gating, splitting, and generating the data that makes or breaks the result.
- In-context learning, few-shot, and RAG. Get real results with prompting and retrieval before you train anything.
- Parameter-efficient fine-tuning: LoRA and QLoRA. Fine-tune on a single, modest GPU.
- Supervised fine-tuning: maximum expressiveness. Full fine-tuning, and how to tell when it is worth it.
- Knowledge distillation: capturing frontier model intelligence. Move a stronger teacher’s behavior into a smaller, faster student.
- Preference optimization: teaching your model to judge. Align the model with DPO, and test safety after alignment.
- Managing model evolution, drift, and versioning. Versioning, drift detection, rollback, and safety monitoring in production.
What you will learn
- Choose the right adaptation technique (prompting/RAG vs LoRA/QLoRA vs full SFT vs distillation vs DPO) using an explicit cost, latency, privacy, and ROI framework.
- Fine-tune an LLM end-to-end on a single GPU with LoRA and QLoRA, including data prep, training, evaluation, and inference.
- Build a real training-data pipeline: curate and quality-gate data, generate teacher-model data, and track lineage and versioning.
- Distill a smaller, faster student from a stronger teacher, and align a model with DPO, with safety-regression testing at each step.
- Operate models in production: a model and data registry, drift detection, rollback, a red-team safety monitor, and an outcome-based retraining cadence.
- Reason honestly about results and economics: when a technique helps, when it does not, and what it really takes to run.
Who is it for
If you are an ML or applied-AI engineer, a data scientist moving from notebooks to deployed models, a platform or MLOps engineer, or a technical lead making build-versus-buy and technique-selection calls, this book is written for you. You need working Python and comfort at the command line; we teach the LLM-specific parts from the ground up and assume no prior fine-tuning experience.
Explore the code
The book has a companion GitHub repository containing runnable code for every chapter, prepared datasets, and cross-accelerator logs. Explore it at github.com/bahree/ModelAdaptationBook , and pull the trained models from Hugging Face if you would rather run inference than train.
It is a MEAP, so your feedback shapes it
Because this is a Manning Early Access Program title, you are reading the book as we write it. Your questions and suggestions in the liveBook forum genuinely change what goes into the final book, so please tell us what works, what does not, and where you get stuck.
Get your copy
Order LLM Customization and Fine-Tuning
while the launch discount lasts: 50% off sitewide through July 23, then 50% off with code MLLLMFT through August 6.
We cannot wait to see what you build.
With gratitude π
Amit Bahree
A general model, broad but unsure, Off your data, and hard to secure; So adapt what you own, On one GPU, well-honed, From prompt to production, mature.