liveBook · Manning

Fine-tuning

As explained in Causal AI

Fine-tuning is the process of adapting a pretrained model by continuing parameter training on task-specific or domain-specific data.

Fine-tuning adapts a pretrained model by continuing parameter training on task-specific data. Pretraining supplies coherent language generation; fine-tuning aligns that capability with a causal Markov kernel. section 13.3.2

A practical workflow separates the modeling task into conditional text-generation problems:

  • Fine-tune GPT-2 to generate action vignettes from the King’s marginal distribution, using an empty prompt. section 13.3.2
  • Fine-tune BART sequence-to-sequence models to map King actions to Prince actions, and both actions to Kingdom fate. section 13.3.2

Causal vignette pipeline

A fine-tuned King model generates a war declaration; a Prince model generates abdication in response; a Kingdom model generates resource depletion and collapse. These models can then serve as distributions inside a Pyro causal model.

How Causal AI covers it

How deep it goes
Explains model selection, tokenization, dataset splitting, training configuration, generation, and Pyro integration, but not parameter-update mathematics.
Examples
Uses GPT-2 for King actions and BART models for Prince actions, Kingdom fate, and Prince-to-King inference.
What it assumes
Assumes pretrained Transformer checkpoints and basic Python, PyTorch, tokenization, and dataset handling.
What you can do after
Builds task-specific causal text generators with Hugging Face Transformers, then samples and scores their outputs inside Pyro.
How it connects
Connects pretrained models, Transformer models, sequence-to-sequence learning, causal language models, DAGs, and causal Markov kernels.

Also explained in

Compare how 37 books explain fine-tuning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Causal AI. The section links point to the parts of the book it draws on.