Build and evaluate language model systems

Follow tokens through inference, retrieval, tools, adaptation, and evaluation with explicit quality and resource budgets.

10 published lessons1 module321 min of guided study
  1. 01
    Build and evaluate language model systemsadvanced · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

Build and evaluate language model systems

Follow tokens through inference, retrieval, tools, adaptation, and evaluation with explicit quality and resource budgets.

  1. 01

    Tokenization and vocabulary design

    Connect subword representations to context use, embedding memory, language coverage, and reproducible model inputs.

    29 min
  2. 02

    Autoregressive decoding and sampling

    Derive temperature, top-k, and nucleus sampling while separating likelihood, diversity, correctness, and reproducibility.

    30 min
  3. 03

    KV caches and inference memory

    Account for attention state by layers, key-value heads, sequence length, precision, and concurrent requests.

    32 min
  4. 04

    Prefill, decoding, and phase disaggregation

    Model first-token and streaming latency before separating prompt processing and token generation across workers.

    32 min
  5. 05

    Quantization and calibration

    Derive a uniform quantizer and evaluate precision changes through payload size, clipping error, representative calibration, and kernel behavior.

    31 min
  6. 06

    Retrieval-augmented generation

    Design evidence retrieval with separate recall, grounding, freshness, authorization, and context-budget measurements.

    33 min
  7. 07

    Tool use and structured generation

    Separate grammar-constrained output, schema validation, semantic checks, authorization, and side-effect execution.

    32 min
  8. 08

    Preference optimization and alignment

    Derive a pairwise preference objective relative to a reference policy and evaluate what preference labels can establish.

    34 min
  9. 09

    Language model evaluation

    Build reproducible, paired evaluations that separate task success, uncertainty, contamination, judgment bias, and serving cost.

    34 min
  10. 10

    Agent orchestration and resource budgets

    Model a bounded agent as a state machine with explicit observations, permissions, verification, retries, and token-cost limits.

    34 min
All engineering modules