← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/B13-interp-on-checkpoints.md · view on GitHub ↗

PRD — Interpretability across a training-run timeline

Goal

Replay the shipped interp tools (tinygpt sae, tinygpt memit, tinygpt rome, tinygpt patch, tinygpt causal-trace) across the multi-checkpoint history a single tinygpt train run produces, so we can see when a feature emerges, not just that a final model has it. Pythia (Biderman et al. 2023) and OLMo (Groeneveld et al. 2024) made this the standard small-model interp protocol; no competitor ships it at TinyGPT’s “every-byte-of-code-here” scale.

The /sae-timeline.astro viewer (already shipped) consumes the output of this PRD’s tooling. Without this PRD, the viewer renders empty.

Why now

Scope — in

Scope — out

Files to touch

FileChange
Sources/TinyGPT/InterpReplay.swiftnew — orchestrator
Sources/TinyGPT/Train.swiftoptional --interp-every N flag; spawn background interp pass per checkpoint
Sources/TinyGPT/TinyGPT.swiftcase "interp-replay"
Sources/TinyGPTModel/CheckpointBatchLoader.swiftnew — iterate a history directory, yield (step, modelHandle) pairs efficiently (mmap-friendly)
evals/interp-replay-smoke.shnew — run an SAE replay across 3 checkpoints of a 200-step shakespeare run; assert MSE non-increasing
docs/interpretability.md”Timeline view” section + invocation example

Don’t touch

Acceptance criteria

Reference patterns

Open questions