Learn/Course 15
Transformers · weeks 20

Foundation-model lifecycle

A private support assistant must answer from evidence and resist manipulation.

Opening production brief

A measurable problem, before a model.

Users

Operators, product owners, and people affected by the foundation models decision.

Data

build vs buy, RAG vs tuning, provenance, decontamination with version, owner, event time, and availability contracts.

Constraints

A private support assistant must answer from evidence and resist manipulation. Every solution must state latency, cost, capacity, and fallback limits.

Success

Offline evidence plus a deployable resolution: A grounded system design spanning adaptation, RAG, evaluation, and safety.

CHAPTER 1

Frame and baseline

Turn the production problem into explicit data, metric, and baseline contracts.

  1. 01

    Prompt, retrieve, adapt, train, or buy?

    Match the intervention to the failure: prompts shape instructions, retrieval updates knowledge, tuning shapes behavior, and training or buying changes base capability.

    65–90 min · checkpoint · deterministic lab
  2. 02

    Corpus provenance, mixtures, and decontamination

    Corpus quality is governed by provenance, realized sampling, and auditable exclusions—not merely by token count.

    65–90 min · checkpoint · deterministic lab
CHAPTER 2

Build and stress

Formalize the machinery, test counterexamples, and expose system limits.

  1. 03

    Pretraining objectives, scaling, and checkpoints

    Pretraining progress is tokens transformed into validated capability, backed by slice-aware loss and checkpoints that preserve the exact continuation state.

    65–90 min · checkpoint · deterministic lab
  2. 04

    SFT, preference optimization, safety, and tools

    Post-training aligns behavior only to the examples and constraints you encode; tool permissions and safety must still be enforced and evaluated outside the loss.

    65–90 min · checkpoint · deterministic lab
CHAPTER 3

Resolve and operate

Join model behavior to architecture, observability, rollout, and rollback.

  1. 05

    Evals, model cards, feedback, and reproducibility

    Reliable releases bind artifacts, predeclared eval gates, honest limitations, and bias-aware feedback into one reproducible decision record.

    65–90 min · checkpoint · deterministic lab
  2. HW

    Domain adaptation release package

    Compare prompt, retrieval, and optional PEFT approaches under one provenance and evaluation contract.

    Rubric · staged hints · reference resolution
Prerequisite guidance

1 concepts make this faster.

Prerequisites are guidance, never hard gates.

C14Transformer from scratchTokenizer, attention, RoPE, residual stack, training loop, generation, and KV cache.
Ready to work the problem?

Prompt, retrieve, adapt, train, or buy?

Start lesson 01