Adapt models with supervised instructions

Design instruction data, masking, adapters, validation, and releases while measuring retention of capabilities and the effect of example formatting.

10 published lessons1 module258 min of guided study
  1. 01
    Adapt models with supervised instructionsadvanced · 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

Adapt models with supervised instructions

Design instruction data, masking, adapters, validation, and releases while measuring retention of capabilities and the effect of example formatting.

  1. 01

    Conversation schemas become exact token sequences

    Preserve roles, turn boundaries, and tokenizer/template identity before treating an example as training data.

    25 min
  2. 02

    Mask the intended assistant prediction targets

    Separate attention visibility from target supervision and normalize loss over the explicitly selected tokens.

    26 min
  3. 03

    Truncate conversations without breaking their targets

    Preserve meaningful context and recompute aligned masks when a multi-turn example exceeds its token budget.

    25 min
  4. 04

    Deduplicate before trusting a split

    Keep related conversations, templates, and source records together so evaluation tests generalization rather than repeated content.

    25 min
  5. 05

    LoRA rank is a parameter budget, not a quality guarantee

    Count a declared low-rank update while separating trainable weights from the full training-memory footprint.

    26 min
  6. 06

    Merge updates, not arbitrary factor sums

    Check BA orientation, scaling, rank growth, and quantization before treating merged adapters as equivalent execution.

    27 min
  7. 07

    Example sampling is not token weighting

    Specify task proportions together with target lengths and loss normalization before calling a mixture balanced.

    25 min
  8. 08

    Measure what adaptation leaves behind

    Compare target gains and retained capabilities with paired, group-aware uncertainty rather than assuming frozen base weights prevent forgetting.

    26 min
  9. 09

    Control optimizer steps and effective exposure

    Relate microbatches, accumulation, target tokens, and schedules without treating one default learning rate as universal.

    26 min
  10. 10

    Release the whole adapter dependency tuple

    Bind adapter weights to their base, tokenizer, targets, and serving configuration, and verify a real rollback path.

    27 min
All engineering modules