AI & transformers · Course 6 of 8

Transformers: implementation and training

Real PyTorch CPU tensor operations, independent checks and three composed projects. Run in Pythilo; no external weights, GPU or service required.

0 of 9 lessons passed

Start lesson 1

Lessons

Progress and your code are kept in this browser only.

  1. Mask attention with finite empty-row gradientsApp required
  2. Apply rotary positions without losing relative geometryApp required
  3. Decode chunks with an owned, offset-aware KV cacheApp required
  4. Isolate packed documents in causal attentionApp required
  5. Share KV heads without breaking query-head mappingApp required
  6. Normalize RMS with stable accumulation and autogradApp required
  7. Project: build a pre-norm decoder block and audit its gradientsApp required
  8. Project: train and reload a tiny causal language modelApp required
  9. Project: train a padding-safe transformer classifierApp required

All courses