# LLM Customization and Fine-Tuning: Adaptation, Distillation, and Alignment

The companion code repository for a Manning book on adapting open-weights language models, covering prompting and RAG, LoRA and QLoRA, full supervised fine-tuning, distillation and DPO/RLHF alignment on a single GPU.

This repository holds the runnable code, data and examples for a Manning Early Access book on LLM customization and fine-tuning, organized by chapter. It is a hands-on playbook for turning a general-purpose open-weights LLM into a focused, cheaper, privately hosted system for a specific domain, and for keeping it reliable in production.

The book and its code walk through prompting, parameter-efficient fine-tuning, full supervised fine-tuning, distillation and preference optimization, then an operational layer for drift and safety monitoring in production. The worked example takes a small open model through LoRA, full SFT, distillation and DPO alignment on a single GPU, measuring cost and quality at each step; the first LoRA fine-tune runs in under 10 minutes on a 12 GB GPU or on Apple Silicon.

Readers without a training GPU can pull the trained models from Hugging Face and run inference or evaluation on any machine instead.

Website: https://github.com/bahree/ModelAdaptationBook
