liveBook · Manning

Full fine-tuning

As explained in LLM Customization and Fine-Tuning

Fine-tuning that updates the model's full set of weights rather than only a subset or adapter.

Full fine-tuning updates every model weight, giving training broad freedom to change behavior. That flexibility costs more compute and brings greater overfitting risk and harder rollback than LoRA. It is most useful when simpler adaptation cannot meet demanding output or reasoning requirements. section 6.15 section 6.4

Use the task to decide whether the extra capacity is worth the cost:

  • Consider it for rigid structured outputs, multi-step domain reasoning, or consistent behavior across varied inputs. section 6.4
  • Prefer LoRA for simpler tasks: it can deliver nearly equivalent quality at lower cost. Use retrieval-augmented generation for knowledge gaps; fine-tuning changes behavior, not what the model knows. section 6.15
  • Weigh compute, overfitting, rollback, and ongoing retraining, evaluation, and serving costs before committing. section 6.15

Where the added capacity can matter

A model generating structured clinical notes, extracting multiple fields from legal documents, or producing code in a domain-specific language must follow demanding output patterns. Full fine-tuning can also suit multi-step insurance-claims adjudication or diagnostic workflows. section 6.4

Training uses TRL’s SFTTrainer with gradient checkpointing; compared with the LoRA setup, omit the PEFT configuration and lower the learning rate. Curate data carefully: 500 strong examples can outperform 5,000 noisy ones, and 300–1,500 curated examples may suffice for moderate tasks. Track validation loss, test for safety regressions, and compare results with the base model. Tune learning rate, then epochs, then batch size; stop when gains fall below one percentage point per run. section 6.15

Check for catastrophic forgetting, overfitting, and distribution mismatch. A supervised fine-tuning checkpoint can also serve as the starting point for DPO or GRPO. section 6.15 section 8.2

How LLM Customization and Fine-Tuning covers it

How deep it goes
Defines updates to every weight and outlines training, monitoring, tuning, and risks without detailing optimizer internals.
Examples
Uses clinical notes, legal-document extraction, domain-specific code, claims adjudication, and diagnostic workflows as task examples.
What it assumes
Assumes a trained model and supervised examples, while emphasizing careful curation rather than teaching data preparation from zero.
What you can do after
Apply TRL’s SFTTrainer, monitor validation loss, run safety regressions, and tune learning rate, epochs, then batch size.
How it connects
Connects supervised fine-tuning with LoRA, retrieval-augmented generation, DPO, and GRPO.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of LLM Customization and Fine-Tuning. The section links point to the parts of the book it draws on.