Skip to content

Align Week 1 lessons with runnable checkpoints - #285

Merged
skyzh merged 4 commits into
mainfrom
forge/tiny-week1-maintenance
Sep 3, 2026
Merged

Align Week 1 lessons with runnable checkpoints#285
skyzh merged 4 commits into
mainfrom
forge/tiny-week1-maintenance

Conversation

@skyzh

@skyzh skyzh commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Why

Week 1 Day 1 is already published, but its first useful test command appears only after the attention theory and does not explain which starter pieces are learner-owned. The supplied attention fixture also omitted a one-leading-dimension case, lost higher-rank coverage while correcting that gap, and treated a supported FP16-on-CPU mx.addmm case as unsupported. Finally, the documented pdm run test path could keep an older copied fixture instead of activating the current supplied test.

The first draft of this repair also left a misleading manual-implementation TODO beside the supplied MLX softmax and turned checkpoint outcomes into test-ledger prose.

Change

  • Lead the chapter with the required Day 1 ownership and an expected-red focused checkpoint; describe later checkpoints by the learner-visible capability that turns green rather than fixed pass counts.
  • Keep MLX softmax supplied and ungraded, correct its starter/reference comments, and offer a numerically stable manual implementation only as an optional bonus.
  • Exercise zero, one, two, and three leading dimensions in both simple-attention families and run all four linear precision/device cases against the public MLX oracle.
  • Make non-Week-4 pdm run test --week W --day D refresh only the selected copied test on every run. The ordinary learner command demonstrates this behavior; this change adds no test-runner or framework self-tests.

Review

  • Scope from main is exactly five existing paths: book/src/week1-01-attention.md, scripts/dev-tools.py, src/tiny_llm/basics.py, src/tiny_llm_ref/basics.py, and tests_refsol/test_week_1_day_1.py (+83/-18).
  • Untouched starter: Task 1 is 4 passed / 32 failed; linear is 4 failed; whole Day 1 is 4 passed / 40 failed.
  • Completed learner and reference: Task 1 is 36 passed, linear is 4 passed, Task 2 is 8 passed, and Day 1 is 44 passed. The local full reference suite is 511 passed / 8 skipped after the documented extension builds.
  • The documented learner command replaced a deliberately stale copied Day 1 test and ran the supplied softmax cases while leaving the learner implementation behavior unchanged. tests_refsol/test_dev_tools.py is restored byte-for-byte to main.
  • Changed Python files are Ruff-format clean; mdBook builds successfully. Apart from the described selected-day refresh behavior and Day 1 collection increase from 36 to 44, all public APIs, model implementation behavior, navigation, later-day, benchmark, model, asset, and Week 4 bytes are unchanged. This Week 1 maintenance work remains owner-held because merging to main deploys GitHub Pages.

AI-Assisted: GPT-5.6 Sol + Forge

@skyzh
skyzh marked this pull request as ready for review September 3, 2026 04:43
@skyzh
skyzh merged commit 5e916e5 into main Sep 3, 2026
1 check passed
@skyzh
skyzh deleted the forge/tiny-week1-maintenance branch September 3, 2026 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant