The era of generic, one-size-fits-all AI is ending. While foundational models like GPT, Claude, and Gemini excel at general knowledge, the next wave of innovation belongs to fine-tuned, domain-expert models that know your business, your code, and your data. This book is a practical guide to moving from the fragility of prompt engineering to the robustness, security, and control of model ownership. Written by award-winning researcher and bestselling author Laurence Moroney, Fine-Tuning AI leads you through the complete process of using data to train expert models that you own and run locally and privately on your laptop, phone, or data center. Aimed at developers and data owners who have hit the limits of APIs, high per-token costs, and latency, or are concerned about privacy, this book provides a clear blueprint for building efficient, cost-effective systems that can outperform generalist models on specialized tasks.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A hands-on blueprint for developers who have outgrown rented, per-token AI and want to own small, domain-expert models they can fine-tune and run privately on a laptop, phone, or data center. Read it if you can write basic Python and want to move from fragile prompts to a model you control.
【Book Arc】
- **Opening (~0%–10%)**: Frames the shift from generalist to specialist models, argues why renting intelligence hits a wall (cost, latency, privacy, drift), and states the book's four-part structure and beginner-friendly prerequisites.
- **Early (~10%–35%)**: Builds the business and technical case — token-cost math for a document-processing app, the "agentic multiplier," the latency problem (TTFT/TPS), the data firewall and metadata leaks, compliance, and model drift.
- **Middle (~35%–55%)**: Turns toward the specialist revolution and the practical core loop of fine-tuning, including hardware realities such as calculating VRAM requirements and preparing data.
- **Late (beyond ~55%)**: Excerpts do not cover this stage in detail; the preface promises evaluation, quantization, optimization, and deployment as part of the engineering journey.
- **Ending**: Excerpts do not cover the closing chapters or any capstone project.
【Book Arc note】
The sampled excerpts are heavily front-loaded: they establish motivation and orientation far more than they demonstrate the fine-tuning workflow itself.
【Key Takeaways】
- **Rented intelligence has a ceiling** (Early): Per-token pricing turns from negligible in prototypes to punishing at automation scale; the book's contract-analyzer example shows daily costs ranging from tens to thousands of dollars depending on model choice.
- **Agents multiply the cost problem** (Early): Agentic workflows call models repeatedly, so token spend compounds — making the economics of hosted frontier models increasingly risky for thin-margin products.
- **Fine-tuning moves instructions from context to weights** (Early): Instead of paying to resend elaborate system prompts every call, behavior is baked into the model, avoiding context-window pollution and the "lost in the middle" degradation.
- **Latency is a UX problem, not just a bill** (Early): Time to first token and tokens per second matter acutely for autocomplete and voice; smaller local models avoid queueing behind other customers and round-tripping to the cloud.
- **Data ownership is a sales and compliance issue** (Middle): Sending customer data to third parties creates provenance gaps under regulations like GDPR; metadata alone can leak strategic intent, as in M&A research.
- **Model drift breaks prompt-dependent systems** (Middle): Providers update models constantly, so carefully engineered prompts can fail overnight; an owned model is a static artifact you version and regress deliberately.
- **Small, well-engineered models can outperform giants on narrow tasks** (Middle): The post-LLaMA wave of open models and optimizations (e.g., LoRA) lowered the barrier so a laptop plus a few hours of work is enough to start.
- **The book targets builders, not researchers** (Opening): Only simple Python is assumed, and all work is achievable on Google Colab's free tier — no special hardware required to follow along.
【Reading Tips】
- **Skim the cost and compliance arguments if you're already convinced**: Chapters 1–3 are persuasive setup; if you've felt the API wall, move quickly to the fine-tuning loop.
- **Deep-read the cost tables and latency metrics**: They give you concrete vocabulary (TTFT, TPS, per-million-token pricing) for justifying a local-model decision to stakeholders.
- **Do the VRAM and data-prep work hands-on**: The middle section's hardware math and dataset preparation are where theory becomes skill; run the Colab examples rather than reading them.
- **Treat the preface's four-part map as your syllabus**: It tells you where evaluation, quantization, and deployment sit, even though the excerpts don't reach them.
- **Keep a checklist of your own constraints**: privacy, latency tolerance, and volume — the book's arguments are strongest when mapped onto your specific application.
【Coverage Limits】
This guide is based on stratified excerpts concentrated in the opening and early chapters; the later fine-tuning, evaluation, quantization, and deployment material is only gestured at in the preface and is not covered here in detail.
Excerpt 1
ine-tuning approachable without sacrificing technical rigor. From LoRA to multimodal and diffusion models, it builds intuition first and equips readers with...
Acknowledgments It takes a village to ship a book like this. First of all, everyone on the O'Reilly team: Nicole Butterfield, who believed in my vision and h...
o search for Japanese restaurants near the current location. For each of these, it can then browse their websites to find their menus. It can then search the...
on was simple: API providers update their models constantly. So, all the effort that goes into prompt engineering (in particular, injecting commands into the...
ion that led to the current explosion in AI technology lies. Attention Mechanisms This is the heart of the transformer. I like to think of them using this an...
kely to fine-tune, self-attention is the dominant mechanism. Cross-attention appears in encoder-decoder type architectures, and in multimodal models, where t...
on the tokens to prevent lookahead, as shown in Figure 2-8 . As such, an encoder isn't needed with its bidirectional self-attention, and only the decoder is...
at this, starting with understanding what an MoE model does. In a standard transformer, every token passes through every parameter of the model, as shown in...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
Fine-Tuning AI Customizing Large Language Models (Laurence Moroney)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
Fine-Tuning AI Customizing Large Language Models (Laurence Moroney)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
Fine-Tuning AI Customizing Large Language Models (Laurence Moroney)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment