Plan: Update READMEs with Full Script Inventory and Timing Data
Context
The repository has grown from 16 to 30 scripts (14 new algorithms added). The project-level README and all three section-level READMEs still reference the original 16 scripts. The user wants all READMEs updated to reflect the full 30-script inventory, and wants section-level READMEs to include actual run timing captured via time python <script>.py executed sequentially.
Step 1: Run All 30 Scripts Sequentially with Timing
Run each script one-at-a-time using time python <script>.py to capture wall-clock time. Execute in directory order within each tier. Capture real/user/sys times — use the real value for the README.
Order:
code
# 01-foundations (11 scripts)
time python 01-foundations/microbert.py
time python 01-foundations/microconv.py
time python 01-foundations/microdiffusion.py
time python 01-foundations/microembedding.py
time python 01-foundations/microgan.py
time python 01-foundations/microgpt.py
time python 01-foundations/microoptimizer.py
time python 01-foundations/microrag.py
time python 01-foundations/micrornn.py
time python 01-foundations/microtokenizer.py
time python 01-foundations/microvae.py
# 02-alignment (9 scripts)
time python 02-alignment/microbatchnorm.py
time python 02-alignment/microdpo.py
time python 02-alignment/microdropout.py
time python 02-alignment/microgrpo.py
time python 02-alignment/microlora.py
time python 02-alignment/micromoe.py
time python 02-alignment/microppo.py
time python 02-alignment/microqlora.py
time python 02-alignment/microreinforce.py
# 03-systems (10 scripts)
time python 03-systems/microattention.py
time python 03-systems/microbeam.py
time python 03-systems/microcheckpoint.py
time python 03-systems/microflash.py
time python 03-systems/microkv.py
time python 03-systems/micropaged.py
time python 03-systems/microparallel.py
time python 03-systems/microquant.py
time python 03-systems/microrope.py
time python 03-systems/microssm.py
Assistant
Starting by reading all current READMEs and running scripts with timing. Scripts run sequentially; file reads happen in parallel.
Assistant
Now I'll grab docstrings from new scripts and start running all 30 scripts with timing. The script runs go in the background since they'll take several minutes.
Assistant
Scripts running in background. Let me check progress while preparing the README updates.
Assistant
Scripts still running. Let me wait for more results.
Assistant
The zsh shell doesn't support bash PIPESTATUS. Let me stop that and rerun with zsh-compatible syntax.
Assistant
Scripts running in background. Let me check periodically for results.
Assistant
Good progress — 5 scripts done, still running. Let me continue waiting.
Assistant
microrag.py took 12m 30s — exceeds the 10-minute target. Continuing to wait for remaining scripts.
Assistant
Foundation scripts done. micrornn.py at 18m 30s also exceeds target. Continuing...
Assistant
All 30 scripts passed. Full timing data captured. Now I'll update all 4 READMEs in parallel.
★ Insight ─────────────────────────────────────
The timing spread reveals the computational gap between scalar autograd (micrornn at 18m 30s doing BPTT through time steps) vs. forward-pass-only demonstrations (microattention, microflash, microrope all under 1s). Scripts using the Value class for automatic differentiation are systematically slower because every arithmetic operation creates a node in a computation graph that gets traversed during backpropagation — the overhead of wrapping every float in an object dominates.
─────────────────────────────────────────────────
Assistant
Now update the project-level README.
Assistant
All 4 READMEs updated. Summary of changes:
Timing results — all 30 scripts pass:
Tier
Scripts
Range
Notable
01-foundations
11
12s – 18m 30s
micrornn.py (18m 30s) and microrag.py (12m 30s) exceed 10-minute target
02-alignment
9
6s – 5m 39s
All within target
03-systems
10
<1s – 1m 27s
5 scripts under 1 second (forward-pass demos)
Files modified:
Assistant
Already consumed the output from that task — all 30 scripts passed, timing data captured and written into the READMEs. No further action needed.
User
I am thinking we should create a simple python script, in the scripts folder, that runs all the scripts sequentially and records wall clock time and other metrics for each algorithm script in the system. Will this be a good idea, or will it been seen as something that is not necessary or not exactly aligned with the no-magic repo ideologies?
Assistant
It aligns fine. The hard constraints apply to algorithm scripts — one file, zero deps, self-contained. A utility script in scripts/ is meta-tooling for the repo itself, not a learning resource claiming to teach an algorithm. It sits outside the tier folders and serves a different purpose.
Why it fits:
30 scripts is past the threshold where manual time python X.py for each is tedious and error-prone
The timing data is already in the READMEs — a runner script makes that data reproducible and auditable rather than a one-off snapshot
It can stay zero-dependency (stdlib subprocess, time, json) which is consistent with the repo's ethos
scripts/ as a location clearly separates it from the algorithm implementations
What would make it feel out of place:
If it pulled in pytest, click, rich, or any external dependency
If it grew into a framework with config files, plugins, or flags
If it tried to validate correctness beyond exit codes (that's the algorithm script's job)
User
Cool. The script should be able to taken in parameters to either run the entire suite, specific section or specific list of scripts.
Assistant
Different task — this is a new script, not a README update. Let me explore the repo structure and existing patterns before planning.
Assistant
Good context. The CONTRIBUTING.md rules target algorithm contributions ("each script stands alone"), not repo-level tooling. A runner in scripts/ is infrastructure maintained by the repo owner, not an algorithm PR. Let me write the plan.
User
[Request interrupted by user for tool use]
Record output status (pass/fail) and wall time for each. Scripts auto-download datasets on first run (max 5MB each, cached locally).
Step 2: Update Section-Level READMEs
Each section README gets the same structural update:
2a. 01-foundations/README.md
Current state: 7 scripts in table, 6 future candidates, learning path with 7 scripts.
Remove implemented scripts from "Future Candidates" (REINFORCE, Dropout, Batch Normalization are now implemented; GRPO and QLoRA are new additions not previously listed)
Update learning path
Algorithm descriptions for new scripts:
Script
Algorithm
microbatchnorm.py
Batch Normalization — internal covariate shift and running statistics
microdropout.py
Dropout, weight decay, and early stopping as regularization
microgrpo.py
Group Relative Policy Optimization (DeepSeek's RLHF simplification)
microqlora.py
QLoRA — fine-tuning 4-bit quantized models with LoRA adapters
microreinforce.py
REINFORCE — vanilla policy gradient with baseline
2c. 03-systems/README.md
Current state: 5 scripts in table, 6 future candidates, learning path with 5 scripts.
Remove implemented scripts from "Future Candidates" (Model Parallelism, Activation Checkpointing are now implemented; RoPE, SSM, Paged Attention are new additions)
Update learning path
Algorithm descriptions for new scripts:
Script
Algorithm
microcheckpoint.py
Activation/gradient checkpointing — trading compute for memory
Tensor and pipeline parallelism — distributed model inference
microrope.py
Rotary Position Embedding (RoPE) — position via rotation matrices
microssm.py
State Space Models (Mamba-style) — linear-time sequence modeling
Section README "Test Results" Format
Each section README will include a results block like:
code
## Test Results
Measured on Apple M-series, Python 3.12. Times are wall-clock (`real` from `time`).
| Script | Status | Time |
|--------|--------|------|
| `microgpt.py` | Pass | 2m 34s |
| `micrornn.py` | Pass | 1m 12s |
...
Step 3: Update Project-Level README.md
File:README.md
Changes:
Update script count references: "16" → "30" (appears in Quick Start Path section and How This Was Built section)
Update the tier descriptions to mention the expanded script count per section
Update the Quick Start Path to incorporate key new scripts (keep it ~12 scripts, a curated subset)
Update the "How This Was Built" transparency section to reflect 30 scripts
Add a summary timing table or reference to section READMEs for timing data
Files Modified
File
Action
01-foundations/README.md
Update script table, timing, test results, future candidates, learning path
02-alignment/README.md
Update script table, timing, test results, future candidates, learning path
03-systems/README.md
Update script table, timing, test results, future candidates, learning path
Run all 30 scripts sequentially and confirm all pass
Verify all timing data is recorded accurately
Confirm no script exceeds the 10-minute constraint
Check all README links and cross-references are consistent
Verify script count totals match across all READMEs (11 + 9 + 10 = 30)
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /Users/druk/.REDACTED.jsonl
If this plan can be broken down into multiple independent tasks, consider using the TeamCreate tool to create a team and parallelize the work.
01-foundations/README.md — 7 → 11 scripts in table, added timing column, test results section, pruned 4 implemented algorithms from future candidates, expanded learning path
02-alignment/README.md — 4 → 9 scripts in table, added timing column, test results section, pruned 3 implemented algorithms from future candidates, expanded learning path
03-systems/README.md — 5 → 10 scripts in table, added timing column, test results section, pruned 2 implemented algorithms from future candidates, expanded learning path with new scripts first
README.md — updated tier descriptions with script counts (11+9+10=30), expanded quick start path from 9 to 12 scripts, updated "16" → "30" in transparency section
★ Insight ─────────────────────────────────────
The future candidates lists now contain only algorithms not yet implemented. Foundations went from 6 candidates to 2 (LSTM, Word2Vec). Alignment went from 5 to 2 (LR Scheduling, Knowledge Distillation). Systems went from 6 to 4 (Speculative Decoding standalone, Continuous Batching, Prefix Caching, Mixed Precision). The pruning reflects that GRPO and QLoRA were added despite not being on the original candidate lists — they were timely additions driven by the DeepSeek/QLoRA research wave.
─────────────────────────────────────────────────
Keep it simple — run each .py in tier order, record wall-clock time + exit code, print a summary table, optionally dump results to JSON. One file, under 100 lines.