liveBook · Manning

Chapter 1: Why model adaptation?

What you will learn in chapter 1 of LLM Customization and Fine-Tuning

The introduction explains why general-purpose LLMs can fail at enterprise tasks and defines model adaptation as a range of ways to close that gap.

After this chapter you will be able to

Section by section

Introduction

The introduction explains why general-purpose LLMs can fail at enterprise tasks and defines model adaptation as a range of ways to close that gap.

Key terms: general-purpose large language model (LLM), generalist, specialist, model adaptation, pretrained LLM, continuum, input-level changes, parameter updates, behavioral shaping

1.1 The adaptation problem

The section frames model adaptation as a middle ground and a continuum of choices that should be guided by the use case, evidence, and ongoing business ownership.

Key terms: adaptation, pre-trained model, off-the-shelf API, adaptation continuum, rungs, prompting, RAG, LoRA, high-quality, representative examples, held-out evaluation set

1.2 Scenarios where adaptation pays off

The section identifies three common enterprise adaptation patterns and notes that they can be combined.

Key terms: industry’s vocabulary and rules, region’s languages and culture, house tone and brand voice

1.2.1 Scenario 1: Industry-specific models

This section shows why industry-specific data matters when adapting general-purpose models, illustrates different adaptation routes, and emphasizes data quality and trusted evaluation over scale.

Key terms: general-purpose model, industry-specific corpus, terminology, regulatory boundaries, workflow conventions, input-level route, weight-update route, retrieval, fine-tuned, catalog tagging

1.2.2 Scenario 2: Regional and cultural adaptation

This section explains why English-heavy general-purpose LLMs can fall short on regional languages and cultural context, and illustrates a regional adaptation approach with SEA-LION.

Key terms: English-heavy training corpora, translated benchmark, cultural gap, code-switching, SEA-LION, strong base, curated regional corpus, fine-tuning

1.2.3 Scenario 3: Enterprise tone and brand

This section shows why enterprise assistants need a deliberate brand voice, how that voice can be shaped without or with weight updates, and why customer-service quality still requires human handoff.

Key terms: general-purpose model, brand, tone and voice, input-level rung, scaffolding, weight updates, hand off, fine-tuned, LoRA, open base model

1.3 The numbers: ROI in real terms

This section shows how to assess adaptation ROI through cost, deployment constraints, latency, proprietary value, and ongoing human effort.

Key terms: ROI, fast tier, mainstream tier, frontier tier, self-hosting, payback, privacy, data sovereignty, data-residency, no-training commitments

1.4 Enterprise pain points

This section identifies enterprise problems that can justify model adaptation and explains the operational responsibility that adaptation shifts onto the team.

Key terms: accuracy gap, specialized vocabulary, inference costs, data residency, model portability, vendor lock-in, self-hosted adapter, evaluation gate, retrain, guardrails

1.5 When NOT to adapt

This section explains when to avoid model adaptation and what evidence, data, and ongoing ownership should be in place before attempting it.

Key terms: commodity use cases, frontier API, held-out evaluation set, prompt, prompting, retrieval, baseline, domain expert, high-quality examples, fine-tuning

1.6 How model adaptation works

The section frames the cost of choosing the wrong adaptation technique and introduces the process and technique continuum that the following sections will explain.

1.6.1 The adaptation lifecycle

This section explains how base models and curated data move through adaptation, evaluation, deployment, and monitoring in a continuous lifecycle.

Key terms: base model, curated data, adaptation step, adaptation lifecycle, held-out set, production workload, safety regression check, evaluation gate, deployment and monitoring, failure mode

1.6.2 The continuum of techniques

This section compares adaptation techniques by effort and by whether they change the model’s input or the model itself, then explains why production systems combine and evaluate them.

Key terms: continuum of techniques, what the model sees, what the model is, prompting, in-context learning, response schema, retrieval-augmented generation, retrieval quality, LoRA, QLoRA

1.6.3 What the gap actually looks like

The section contrasts base and adapted answers to show that fine-tuning can improve task-specific format and voice while making ungrounded answers sound more confident.

Key terms: base model, LoRA adapter, full-SFT model, house format, ungrounded, training data, desired behavior, refuse, cite a source, escalate

1.7 Choosing a starting technique

This section uses four diagnostic questions to choose an initial adaptation technique, starting with a measured baseline and adding training only when the evidence and constraints warrant it.

Key terms: commodity, specialized, frontier API, prompting plus RAG, prompting baseline, held-out set, accuracy, LoRA, high-quality, domain-representative examples, data curation

1.8 Considerations: Safety and adaptation risk

This section explains how model adaptation can weaken safety behavior and sets out a minimum regression check before deployment.

Key terms: guardrail weakening, jailbreak transfer, adversarial vulnerability, prompt injection, refusal behavior, safety regression suite, refusal rate, base model, release gate, explicit refusal examples

1.9 What you’ll need to follow along

States the Python prerequisite and reassures readers that fine-tuning is taught from first principles with runnable companion code.

1.9.1 The base model: Qwen3-4B-Instruct-2507

This section explains why the book uses Qwen3-4B-Instruct-2507, what hardware its fine-tuning examples require, and how the workflows extend to other models.

Key terms: Qwen3-4B-Instruct-2507, open-weight, consumer GPUs, LoRA, QLoRA, full SFT, VRAM, gradients, optimizer state, Qwen3-4B

1.9.2 The starter dataset: IT support Q&A from Stack Exchange and Dolly

This section introduces the small, publicly sourced IT support dataset used in the book’s hands-on chapters and explains why it includes general-instruction examples.

Key terms: IT support dataset, Stack Exchange, Databricks Dolly-15K, general-instruction dataset

1.9.3 Tooling and hardware

This subsection identifies the book’s software toolchain and shows how hardware needs vary by technique, with CPU smoke tests available before GPU runs.

Key terms: Python 3.12, PyTorch 2.x with CUDA, Hugging Face Transformers, TRL, PEFT, datasets library, hardware bar, distillation, LoRA student, 24 GB card

1.9.4 The code repository

This section tells readers where to find the book’s practical materials and which README to use for setup and chapter-specific instructions.

Key terms: public GitHub repository, top-level README, chapter READMEs, smoke test

1.10 How this book teaches model adaptation

The section introduces a recurring help desk example and outlines the book’s incremental, hands-on approach to teaching model adaptation.

1.11 Summary

1.12 References

This section lists the sources cited in chapter 1 without explaining their findings or methods.

Where this is used later

Concepts explained in this chapter

Chapter 2: How to do model adaptation →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.