Read the script’s setup instructions and run it on your own computer. The website does not execute code or verify your results.
// Independent work
W04-LAB
Week 4: A miniature language model
Train the accumulated tiny decoder, compare checkpoints and sampling, and save a reproducible model.
Extend the guided artifact rather than start a second project. Reload the checkpoint; report held-out loss and explain attention with a complete small example.
What to produce
A miniature language model
Setup commands, data or generation procedure, versions, and recorded outputs
Acceptance results and a precise limitation
Check your work
Reload the checkpoint; report held-out loss and explain attention with a complete small example.
Each claimed execution is supported by actual saved output.
Fixture results and real model results are identified separately.
Setup and reproduction use the taught tools without private credentials.
Self-assessment rubric
Technical correctness · 35 points
Implementation or analysis follows the relevant technical mechanism and handles the stated case.
Evaluation and evidence · 30 points
Reproducible tests, appropriate baseline, and accurate interpretation.
Engineering quality · 20 points
Clear structure, safe boundaries, and usable reproduction instructions.
Explanation and reflection · 15 points
Explains tradeoffs, limitations, and next experiment with evidence.
// Phase milestone
M01
Miniature Language Model
Build and explain a miniature language model.
Must demonstrate a causal attention mechanism, held-out evaluation, and reproducible output.
What to produce
Runnable code with setup instructions
Training and held-out evaluation results
Attention explanation and checkpoint/sampling comparison
Check your work
Must demonstrate a causal attention mechanism, held-out evaluation, and reproducible output.
Setup and reproduction steps are complete.
Known limitations are explicit; no unsupported security or quality claims.
Self-assessment rubric
Functional integration · 30 points
Required components work together in a reproducible end-to-end workflow.
Security and reliability · 25 points
Boundaries, failure handling, and recovery are demonstrated with evidence.
Evaluation evidence · 25 points
Appropriate test set, clear measures, honest interpretation, and traceability.
Documentation and explanation · 20 points
Architecture, setup, tradeoffs, and limitations are understandable.
// Retrieve before you reread
Week 4 knowledge check
Try all 6 questions. Check your answers, review the explanations, and retry whenever you like. Answers are checked on this device.