Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
569 commits
Select commit Hold shift + click to select a range
5a838b6
fix(jax-single-pool): disable XLA command buffers (CUDA graphs) in th…
ocg-goodfire Jun 11, 2026
d7fb467
fix(jax-single-pool): deliver preemption SIGTERM to the srun tasks, n…
ocg-goodfire Jun 11, 2026
6661d5b
pd-offline-eval: normalize raw-HF Llama specs to the vendored view
ocg-goodfire Jun 11, 2026
2372641
infra(jax-single-pool): offline-eval loop forwards extra pd-offline-e…
ocg-goodfire Jun 11, 2026
34371d6
infra(jax-single-pool): delete the in-job retry loop
ocg-goodfire Jun 11, 2026
ed94be8
feat(jax-single-pool): push-triggered offline eval — trainer submits …
ocg-goodfire Jun 11, 2026
fbba967
feat(jax-single-pool): canonical run identity — p- ids, runs/<id>/ la…
ocg-goodfire Jun 11, 2026
dc79203
test(jax-single-pool): pin the stacked implementation's outputs as pa…
ocg-goodfire Jun 11, 2026
6879f50
feat(jax-single-pool): arbitrary per-layer matrix sites — q/k/v/o/gat…
ocg-goodfire Jun 11, 2026
306fdf2
docs(jax-single-pool): site-generality — README rows, AUDIT notes, SP…
ocg-goodfire Jun 11, 2026
759b76f
feat(jax-single-pool): fresh per-batch sign-PGD training adversary (t…
ocg-goodfire Jun 11, 2026
e3780fa
docs(jax-single-pool): INTEGRATION.md — jax/torch module map (shared …
ocg-goodfire Jun 11, 2026
cc3f121
feat(jax-single-pool): LlamaSimpleMLP pile target — second Decomposed…
ocg-goodfire Jun 11, 2026
961ba70
feat(jax-single-pool): CI_L0 eval groups (torch parity)
ocg-goodfire Jun 11, 2026
4884d91
Merge remote-tracking branch 'origin/feature/jax-single-pool-pd' into…
ocg-goodfire Jun 11, 2026
be2e5ac
Rename PPGD/PGD scope literals to shape-spelled names (Oli)
ocg-goodfire Jun 11, 2026
f662724
Alias legacy scope literals when loading stored run configs (Oli)
ocg-goodfire Jun 11, 2026
325f378
Merge remote-tracking branch 'origin/main' into feature/fsdp-lm-trainer
ocg-goodfire Jun 11, 2026
53c8866
Adopt the shape-spelled scope renames in the extracted package + swep…
ocg-goodfire Jun 11, 2026
ef810ab
Merge branch 'feature/fsdp-lm-trainer' into refactor/shared-config-pa…
ocg-goodfire Jun 11, 2026
9b06c6f
Merge remote-tracking branch 'origin/feature/jax-single-pool-pd' into…
ocg-goodfire Jun 11, 2026
140b220
jax: adopt shape-spelled scope names (torch parity; old yaml literals…
ocg-goodfire Jun 11, 2026
e38cff5
Final lint pass + INTEGRATION.md unification status
ocg-goodfire Jun 11, 2026
ff5c1b8
jax slurm: derive repo paths from the submission directory (unified-c…
ocg-goodfire Jun 11, 2026
7b3ca0c
pd-jax-lm: snapshot-based SLURM launcher for jsp-train runs
ocg-goodfire Jun 11, 2026
86595a0
jax: fresh-PGD pile configs (counterpart of torch p-af354eb1) + 513-w…
ocg-goodfire Jun 11, 2026
c797944
docs: pd-jax-lm launch path in CLAUDE.md / INTEGRATION.md
ocg-goodfire Jun 11, 2026
6ee44f1
jax: delete hand-written launch sbatch files, superseded by pd-jax-lm
ocg-goodfire Jun 11, 2026
5774791
jax: stamp eval/step on in-loop eval records + define eval axes at init
ocg-goodfire Jun 11, 2026
7a11d7c
pd-offline-eval: slow metrics only — fast scalars are the live traine…
ocg-goodfire Jun 11, 2026
93006b4
jax: fold internal config NamedTuples into the shared schema (gaps 2+4)
ocg-goodfire Jun 11, 2026
8d61c79
jax: delete the nano_pd_jax prototype + make targets for the jax envs
ocg-goodfire Jun 11, 2026
5c6f86e
make install-jax: survive NFS-held venvs (move wreck aside, create-if…
ocg-goodfire Jun 11, 2026
d505006
jax: split train.py; disentangle PGD vs PPGD naming; imp-min _no_beta…
ocg-goodfire Jun 11, 2026
3705f05
jax: LOSS_PARITY_DESIGN.md — recon-loss unification design (no code)
ocg-goodfire Jun 11, 2026
d207715
ppgd: warn that warmup hardcodes route-all (latent Subset-variant inc…
ocg-goodfire Jun 11, 2026
9b8c16b
jax: recon-loss unification — every recon torch loss as plan x source…
ocg-goodfire Jun 11, 2026
8cc52b8
feature/jax: drop ephemeral debug/bench artifacts from the PR diff
ocg-goodfire Jun 11, 2026
e6d3eb8
feature/jax: carve out the n-pool and torch-FSDP subsystems
ocg-goodfire Jun 11, 2026
d7b54ba
feature/jax: drop finished-investigation config graveyards (~12k yaml…
ocg-goodfire Jun 11, 2026
fdb2eb3
rename: nano_param_decomp_jax -> param_decomp_jax (drop the nano-era …
ocg-goodfire Jun 11, 2026
28f105d
feature/jax: cut dead fused-KL module + multipool _llama8b yamls
ocg-goodfire Jun 11, 2026
6a16b4e
feature/jax: paper to its own PR (#562); drop ephemeral docs + unused…
ocg-goodfire Jun 12, 2026
1718731
untrack scope/ — in-progress colleague work swept in by accident, sta…
ocg-goodfire Jun 12, 2026
7018b2c
wip
ocg-goodfire Jun 15, 2026
eefc167
docs(spec): wave-1 SPEC.md amendments (re-anchor §9 + 10 numbered cla…
ocg-goodfire Jun 16, 2026
6ebb27b
fix(jax): swallow wandb CommError in MetricsSink.log (robustness pari…
ocg-goodfire Jun 16, 2026
f601743
fix(jax): assert finite logged losses in train step (#703) (#772)
ocg-goodfire Jun 16, 2026
5a5b336
docs(jax-eval): record per-key mean-safety of the in-loop eval aggreg…
ocg-goodfire Jun 16, 2026
c96ecde
feat(jax): plumb wandb group/tags through pd-jax-lm to wandb.init (#6…
ocg-goodfire Jun 16, 2026
52cd7af
fix(jax): retry-install HF HTTP adapter before cold-cache weight load…
ocg-goodfire Jun 16, 2026
60cce05
test(jax-eval): per-metric averaging parity vs torch position-weighte…
ocg-goodfire Jun 16, 2026
b461fbd
test(jax-checkpoint): sharded TrainState round-trip at production per…
ocg-goodfire Jun 16, 2026
1810be4
test(jax-eval): pin fresh-PGD c-scope eval probe KL device-count inva…
ocg-goodfire Jun 16, 2026
3b778f1
test(jax): pin E11 recon-term log-key parity with torch instance_key …
ocg-goodfire Jun 16, 2026
46c02d7
test(jax): cover target.spec family refusal + supported-family dispat…
ocg-goodfire Jun 16, 2026
8571780
test(jax): guard eval-path imp-min global reduction at 1 vs N devices…
ocg-goodfire Jun 16, 2026
96f98a7
test(jax/checkpoint): verify persistent-source step_count round-trip …
ocg-goodfire Jun 16, 2026
0dff711
test(jax): verify fresh-PGD c/bc init sources are replica-identical (…
ocg-goodfire Jun 16, 2026
a4a046c
chore(launcher): single source of truth for pd-jax-lm wrapper keys (#…
ocg-goodfire Jun 16, 2026
48f9a94
feature/jax: flatten JAX wandb config dump to match torch key layout …
ocg-goodfire Jun 16, 2026
2114064
test(jax): pin fresh-PGD c-scope sign-ascent device-count invariance …
ocg-goodfire Jun 16, 2026
98f02cd
test(ci-fn): grad-check lower_leaky_hard custom VJP (S6, R-5) (#789)
ocg-goodfire Jun 16, 2026
d7a97c9
test(jax): pin replicated source-leaf grad as MEAN not SUM across dev…
ocg-goodfire Jun 16, 2026
327be7d
test(jax): refuse decaying PPGD source lr_schedule in torch_config co…
ocg-goodfire Jun 16, 2026
50fd13c
test(jax-adversary): pin sc-scope PPGD source batch broadcast axis (S…
ocg-goodfire Jun 16, 2026
d282fc5
test(adversary): pin first post-resume persistent ascent to bias-corr…
ocg-goodfire Jun 16, 2026
d5713ec
test(jax-equiv): pin the chunk-plan static-live gate (S2) for split-l…
ocg-goodfire Jun 16, 2026
5baca2d
feat(jax): support post-warmup source-LR decay (cosine/linear) (#581)…
ocg-goodfire Jun 16, 2026
198740c
test(jax/equivalence): pin sc-scope (1,T,C+1) batch-broadcast in mask…
ocg-goodfire Jun 16, 2026
e15e208
docs(jax/recon): pin hidden-acts keep-on-bridge decision as SPEC S31 …
ocg-goodfire Jun 16, 2026
ac85e3b
test(jax/adversary): confirm orbax persists sources_opt_state at prod…
ocg-goodfire Jun 16, 2026
4b273fd
jax: implement persistent start_frac>0 source-LR warmup gating (#613,…
ocg-goodfire Jun 16, 2026
6b54400
jax recon: skip x@Δ matmul for constant-source entries via static has…
ocg-goodfire Jun 16, 2026
71592ee
docs(jax): JAX-first transition plan + parity analysis
ocg-goodfire Jun 16, 2026
06d65b2
jax: pin runtime standalone-dependency boundary with a guard test (#813)
ocg-goodfire Jun 16, 2026
ac60bab
jax: read param_decomp_config directly; delete torch_config.py (#812)
ocg-goodfire Jun 16, 2026
c96624a
push-1: freeze parity goldens, drop torch-reference generators + veri…
ocg-goodfire Jun 16, 2026
e437311
Retire the torch trainer from HEAD (oracle at tag torch-oracle) (#814)
ocg-goodfire Jun 16, 2026
55dceba
docs(jax/spec): pin cosine-LR (S20), grad-clip eps (S19), lower_leaky…
ocg-goodfire Jun 16, 2026
7de4bb1
test(jax): drive subset_chunk_plan static-live-set forward against to…
ocg-goodfire Jun 16, 2026
e911877
jax: drop train/loss/*_no_beta key to match torch (#647) (#817)
ocg-goodfire Jun 16, 2026
9a6f7ec
jax: service SIGTERM in faith-warmup + eval loops (S22) (#818)
ocg-goodfire Jun 16, 2026
19f0a58
jax: bound the N3 bf16-input imp-min cast-point seam with a test (#59…
ocg-goodfire Jun 16, 2026
5fe4d7d
jax ci_fn: unify GELU (erf) + RMSNorm eps with torch oracle (#820)
ocg-goodfire Jun 16, 2026
7129153
jax: match torch's cosine-LR denominator + grad-clip eps (S19, S20) (…
ocg-goodfire Jun 16, 2026
7039849
test(jax): pin fnmatch site-resolution order vs torch oracle (#725) (…
ocg-goodfire Jun 16, 2026
839fe6e
fix(jax): green the suite after optimistic merges (#581 partial-rever…
ocg-goodfire Jun 16, 2026
f32bd6e
refactor(jax): chunkwise is the one recon-plan impl; remove PPGD+subs…
ocg-goodfire Jun 16, 2026
80d8300
test(jax export): lock the multi-site KIND_ORDER→sorted permutation (…
ocg-goodfire Jun 16, 2026
3d26b26
jax: refuse fp32 frozen-target requests per-model, no silent downgrad…
ocg-goodfire Jun 16, 2026
c1d604a
docs: rewrite TRANSITION.md around the settled fully-JAX single-frame…
ocg-goodfire Jun 16, 2026
cb6c28a
pd-jax-lm: optional --comment flag for SLURM job comment (#831)
ocg-goodfire Jun 16, 2026
758bcf2
push-2: harvest reads JAX runs natively (first consumer migration) (#…
ocg-goodfire Jun 16, 2026
5d5c97e
feat(jax): persistent-PGD bsc scope onto post-refactor feature/jax (t…
ocg-goodfire Jun 16, 2026
45574ec
docs: tidy root CLAUDE.md for fully-JAX reality; fix two-venv dev fri…
ocg-goodfire Jun 16, 2026
175ed95
push-2: clustering reads JAX runs natively (#834) (#837)
ocg-goodfire Jun 16, 2026
66c09cc
jax: generic model I/O + pluggable recon loss, keep (B,T) waist
ocg-goodfire Jun 16, 2026
3c8203c
jax: native slow/offline eval metrics for SimpleMLP runs (#713) (#838)
ocg-goodfire Jun 16, 2026
29e5ce5
refactor(recon): one make_plan + orthogonal chunking helpers (#835) (…
ocg-goodfire Jun 16, 2026
a4fae83
push-2: autointerp reads JAX runs natively (second consumer migration…
ocg-goodfire Jun 16, 2026
9195f6a
strip frontend to read-only viewer (#842) (#843)
ocg-goodfire Jun 16, 2026
ff60193
push-3: app backend reads JAX runs natively + sheds torch (#841) (#845)
ocg-goodfire Jun 16, 2026
b7efefe
refactor: rename DecomposedLM → DecomposedModel; clean/masked_logits …
ocg-goodfire Jun 16, 2026
fd2e2b8
fix(jax): drive make check-jax toward zero + gate it in pre-commit (#…
ocg-goodfire Jun 16, 2026
4a4b9a5
chore: delete dropped-feature modules + app surface (attribution grap…
ocg-goodfire Jun 16, 2026
84f8045
fix(tests): repair two pre-existing red tests (jax-launch validation,…
ocg-goodfire Jun 16, 2026
94a6f17
shed(clustering): delete torch workers + numpy accumulator (zero torc…
ocg-goodfire Jun 16, 2026
1cf7371
feat(jax): open_jax_run loads llama8b targets (+ slow_eval shares the…
ocg-goodfire Jun 16, 2026
142b148
feat(jax): hidden-acts recon eval metrics (masked_site_outputs seam; …
ocg-goodfire Jun 16, 2026
f5649e8
fix(lab): int64 coactivation + type hygiene + dead-code cleanup (revi…
ocg-goodfire Jun 16, 2026
f0b67af
fix(jax): tighten Anys + fail-fast asserts (review pass) (#855)
ocg-goodfire Jun 16, 2026
6ae2224
fix(config): fail-fast validators + narrow types + discriminated Glob…
ocg-goodfire Jun 16, 2026
f0d59d6
chore: delete verified-dead retired-torch-trainer core from param_dec…
ocg-goodfire Jun 16, 2026
4184a40
merge: bring main (#858 Xet-CDN 408 retry) into feature/jax
ocg-goodfire Jun 17, 2026
f2d4c67
feat(jax): generic [*leading,d] waist + axis names + jaxtyping/bearty…
ocg-goodfire Jun 17, 2026
9215854
feat(jax): TMS target — first non-LM bundle over the generic [*leadin…
ocg-goodfire Jun 17, 2026
9bdd708
shed(harvest): numpy accumulator + delete dead torch worker & Autoint…
ocg-goodfire Jun 17, 2026
43ebba4
feat(jax): attn-patterns recon eval → JAX, in-loop, metric-local disp…
ocg-goodfire Jun 17, 2026
14c634a
refactor(lab): delete CLT/transcoder comparison adapters + vendored t…
ocg-goodfire Jun 17, 2026
45ff7e0
feat(jax): add ResidualMLP decomposition target (#4) (#864)
ocg-goodfire Jun 17, 2026
d59510e
refactor(jax): retire the torch offline-eval path (#2) (#865)
ocg-goodfire Jun 17, 2026
2edb96d
feat(jax): assert LM-only axis-semantics on in-loop eval metrics (#12…
ocg-goodfire Jun 17, 2026
10b4685
chore: delete dead torch TMS + ResidualMLP experiment dirs (#867)
ocg-goodfire Jun 17, 2026
743cf83
chore(app): temporarily remove torch web-app for JAX-primary merge (#…
ocg-goodfire Jun 17, 2026
dc78a5d
feat(jax): one-off C49k checkpoint migration to current TrainState la…
ocg-goodfire Jun 17, 2026
cb515bc
feat(jax): Llama-8B l18-26 9-layer chunkwise config + abstract-AOT me…
ocg-goodfire Jun 17, 2026
841d440
refactor(jax): drop torch-run loading + cascade-prune dead torch core…
ocg-goodfire Jun 17, 2026
b3fa79d
refactor(jax): collapse two-file wrapper/torch_config configs into on…
ocg-goodfire Jun 17, 2026
6f57c08
feat(jax): wire ResumeProvenance fine-tune init into the JAX trainer …
ocg-goodfire Jun 17, 2026
7cb9a6f
feat(jax): persistent XLA compilation cache for jsp-train (#875)
ocg-goodfire Jun 17, 2026
7a42e65
docs(jax): add MIGRATION_HOLES.md — known gaps in the JAX-primary stack
ocg-goodfire Jun 17, 2026
3bbaea2
docs(jax): add MIGRATION_REVIEW.md — prioritized review guide for the…
ocg-goodfire Jun 17, 2026
bdda5ce
refactor: delete all torch from the repo (JAX-only) (#876)
ocg-goodfire Jun 17, 2026
123d132
test(jax): prove C49k checkpoint migration is value-exact (#877)
ocg-goodfire Jun 17, 2026
38b28b6
chore: exclude **/node_modules from pyright
ocg-goodfire Jun 18, 2026
5bbe9ac
fix(jax): init_from_parent keeps the global step (multi-host save)
ocg-goodfire Jun 18, 2026
737f2f2
test(jax): canary that jaxtyping+beartype runtime checks are live
ocg-goodfire Jun 18, 2026
406f238
feat(lab): pd-jax-lm --allocator for XLA allocator override
ocg-goodfire Jun 18, 2026
390907f
docs(jax): migration taxonomy + holes blind-spots
ocg-goodfire Jun 18, 2026
334095b
feat(jax): persist config.yaml as a wandb run file (torch parity)
ocg-goodfire Jun 18, 2026
b462938
refactor(config): drop dead use_sigmoid_parameterization; weight-tyin…
ocg-goodfire Jun 18, 2026
66d233f
feat(pretrain): JAX-native in-house target-LM pretraining (pd-pretrain)
ocg-goodfire Jun 18, 2026
97860ae
refactor(jax): generic decomposition engine + move TMS/ResidMLP toys …
ocg-goodfire Jun 18, 2026
0122e89
feat(clustering): restore ensemble pipeline + consensus on the JAX path
ocg-goodfire Jun 18, 2026
b9242f2
feat(jax): wire the global shared-MLP CI arch end-to-end for the toys
ocg-goodfire Jun 18, 2026
35d4630
Merge branch 'feature/lm-pretrain-jax' into worktree-agent-a5bb52e117…
ocg-goodfire Jun 18, 2026
00bc0c3
Merge branch 'feature/clustering-restore' into worktree-agent-a5bb52e…
ocg-goodfire Jun 18, 2026
524eec8
refactor: unify into one venv; rename jax_single_pool->param_decomp; …
ocg-goodfire Jun 18, 2026
4693493
feat(slow-eval): restore UVPlots / PermutedCIPlots / IdentityCIError …
ocg-goodfire Jun 18, 2026
32357db
feat(slow-eval): bring the slow/plot eval tier back IN-LOOP (SPEC S28…
ocg-goodfire Jun 18, 2026
6b8d7d8
merge: in-loop slow eval (SPEC S28/S28a/S29 amended)
ocg-goodfire Jun 18, 2026
65ab8c8
feat(slow-eval): render position-CI plots + IdentityCIError in-loop (…
ocg-goodfire Jun 18, 2026
603ad58
refactor(cli): stop exposing inner trainers as pd-* console scripts
ocg-goodfire Jun 19, 2026
76d32d5
feat(slow-eval): in-loop only; UVPlots as a figure metric for toys + …
ocg-goodfire Jun 19, 2026
a7c7069
perf(jax-launch): hardlink venvs from a same-FS uv cache (#880)
danbraunai-goodfire Jun 19, 2026
3474ab5
refactor: core = pure trainer lib; composition/IO/CLI -> lab; dissolv…
ocg-goodfire Jun 19, 2026
bb85de2
test: gate >1-device tests behind --runmultidevice + make test-multid…
ocg-goodfire Jun 19, 2026
9539187
ci+make: test-all runs everything (1-device suite + multidevice subset)
ocg-goodfire Jun 19, 2026
a585ca4
refactor: collapse the resolved-config dataclass; engine takes pydant…
ocg-goodfire Jun 19, 2026
e8c8226
merge: collapse resolved-config DC (engine takes pydantic + built obj…
ocg-goodfire Jun 19, 2026
1a48b23
refactor: simplify toward main — drop JAX-port naming, dedup target b…
ocg-goodfire Jun 19, 2026
2f1e319
refactor: make distributed-init config-driven via runtime.dp; argpars…
ocg-goodfire Jun 19, 2026
a559275
Merge remote-tracking branch 'origin/feature/jax' into feature/jax
ocg-goodfire Jun 19, 2026
14a44ee
refactor(config): remove dead PDConfig fields (reject via extra=forbid)
ocg-goodfire Jun 19, 2026
c6369ad
feat(config): strip-shim for the removed PDConfig fields (provenance)
ocg-goodfire Jun 19, 2026
c8ae00e
feat(eval): restore CI_L0 wandb bar chart; cross-ref the two cosine i…
ocg-goodfire Jun 19, 2026
0a82fb6
refactor(sink): explicit MetricsSink.for_run / silent constructors
ocg-goodfire Jun 19, 2026
05e1e7b
refactor(ci): chunkwise CI fn — protocol + read_activations seam + sc…
ocg-goodfire Jun 22, 2026
0f91e61
refactor(ci): single-pass read_activations + drop vestigial AnyCIFn a…
ocg-goodfire Jun 22, 2026
41cae52
refactor(decomp): extract DecompVU / init_decomp_vu / site_out into c…
ocg-goodfire Jun 22, 2026
6dded08
refactor(config): collapse three CI config→arch converters into one c…
ocg-goodfire Jun 22, 2026
1ce16d5
refactor(core): code-review quick wins — dead code, type tightenings,…
ocg-goodfire Jun 22, 2026
13b834f
fix(configs): migrate LM run configs to the chunkwise_transformer CI fn
ocg-goodfire Jun 22, 2026
7a79e1e
refactor(lm): DecomposedModel as Protocol + eqx.Module targets (froze…
ocg-goodfire Jun 22, 2026
6591ac7
refactor(targets): move concrete target modules into param_decomp/tar…
ocg-goodfire Jun 22, 2026
7021d28
refactor(core): rename config.py -> built_run.py
ocg-goodfire Jun 22, 2026
dab1cce
refactor(log): library-safe import, required logfile from the run ent…
ocg-goodfire Jun 22, 2026
8bc85b7
refactor(config): narrow PersistentPGDReconLossConfig scope/optimizer…
ocg-goodfire Jun 22, 2026
79a5b1d
refactor(config): move runtime_cast to lab harvest (its sole consumer)
ocg-goodfire Jun 22, 2026
011ca54
refactor(config): drop run_id/out_dir from config schema — derive run…
ocg-goodfire Jun 22, 2026
e3ec35f
refactor(types): components/vu are DecompVU, not Any (fix the test, n…
ocg-goodfire Jun 22, 2026
391d05f
test(launch): migrate _MINIMAL_LM fixture to the chunkwise ci_config …
ocg-goodfire Jun 22, 2026
b4bda91
test(core): guard the no-bake invariant — frozen weights are jaxpr ar…
ocg-goodfire Jun 22, 2026
ac1973b
refactor(sharding): model-owned placement, delete inferred shardable …
ocg-goodfire Jun 24, 2026
f46c94e
docs(test): drop stale shardable wording from sharding test docstring
ocg-goodfire Jun 24, 2026
46882be
docs(core): drop 7 migration-era design docs, repoint dangling refere…
ocg-goodfire Jun 24, 2026
a95f2a2
refactor(infra): drop torch-era dead code from slurm.py
ocg-goodfire Jun 24, 2026
0b92e32
refactor(core): rename build_recon_terms -> build_loss_spec
ocg-goodfire Jun 24, 2026
4ca6986
test(lab): move test_toy_uv_eval into tests/, drop empty scripts package
ocg-goodfire Jun 24, 2026
15ffd03
refactor(core): drop LM perf-logging (tokens/sec) from the generic en…
ocg-goodfire Jun 24, 2026
4dc6304
refactor(core): flatten the JAX loss surface into a uniform list of t…
ocg-goodfire Jun 24, 2026
4fdfb15
refactor(full32L): remove residual-start; port onto chunkwise feature…
ocg-goodfire Jun 24, 2026
0e53aa1
feat(full32L): scan-over-layers forward + cuDNN attn-sharding pin
ocg-goodfire Jun 24, 2026
1b3263c
refactor(simple-mlp): embed-internal full-model target (residual-star…
ocg-goodfire Jun 24, 2026
c64b73a
spec: remove residual-start — full-model, token-input engine (AMENDED…
ocg-goodfire Jun 24, 2026
d1d9798
Merge origin/feature/jax into feature/jax-full32L-port
ocg-goodfire Jun 24, 2026
23881ea
refactor(core): replace TrainState sources/sources_opt_state with adv…
ocg-goodfire Jun 24, 2026
8dfb861
feat(losses): smooth-L0 (Geman–McClure) imp-min penalty — ported from…
ocg-goodfire Jun 24, 2026
bfd6b51
feat(sharding): 2-D (dp, tp) device mesh + runtime.tp (piece 1 of chu…
ocg-goodfire Jun 24, 2026
3883362
refactor: complete residual-start removal — delete prefix machinery, …
ocg-goodfire Jun 24, 2026
5c71dbe
feat(sharding): chunk×tp re-axis of the CI fn + V/U on tp (2-D mesh p…
ocg-goodfire Jun 24, 2026
9a3170f
fix(sharding): FSDP V/U on dp × Megatron on tp (was tp-only → faith-w…
ocg-goodfire Jun 24, 2026
cbb3d88
fix(sharding): U d_out replicated (cuDNN q/k/v) + host-mem bump + res…
ocg-goodfire Jun 24, 2026
3888920
fix(attn): head-parallel q/k/v sharding for cuDNN flash-attn on the 2…
ocg-goodfire Jun 24, 2026
7ce98e7
feat(llama8b): full-model 2-D mesh sharding fixes — multi-layer decom…
ocg-goodfire Jun 25, 2026
6bc5e2c
refactor(sharding): uniform FSDP(dp)×TP(tp) for V/U and the CI fn
ocg-goodfire Jun 25, 2026
b07c4e2
feat(llama8b): FSDP the frozen target on dp — full-32L decomposition …
ocg-goodfire Jun 25, 2026
3937f33
feat(train): remat_ci_fn — checkpoint the CI-fn forward (activation-m…
ocg-goodfire Jun 25, 2026
bd1306e
Merge origin/feature/jax (adversaries rename + smooth-L0) into full32…
ocg-goodfire Jun 25, 2026
d61db72
fix(jax-launch): set NCCL_DEBUG=WARN so slurm logs aren't flooded wit…
danbraunai-goodfire Jun 25, 2026
6746263
feat(losses): split batch-invariant frequency-minimality out of imp-min
ocg-goodfire Jun 25, 2026
e4586e3
fix(test): make slow-eval cadence smoke time dispatch, not off-thread…
danbraunai-goodfire Jun 25, 2026
7abe40b
test(slow-eval): trim the dispatch-timing comment to the load-bearing…
danbraunai-goodfire Jun 25, 2026
3a59222
feat(remat): per-layer scan-body remat for the recon forward
ocg-goodfire Jun 25, 2026
58e3b09
perf(ci_fn): scan chunks instead of vmap to bound the FSDP gather tra…
ocg-goodfire Jun 25, 2026
65f3bf8
Merge branch 'feature/stable-imp-min' into integrate/jax-full32L-unified
ocg-goodfire Jun 26, 2026
2ae4286
config(full32L): set remat_ci_fn: true
ocg-goodfire Jun 26, 2026
a3ffa2a
feat(ppgd): configurable source_dtype (bf16 PPGD sources) [EXPERIMENTAL]
ocg-goodfire Jun 25, 2026
98fbb5b
Merge remote-tracking branch 'origin/feature/jax' into feature/jax
ocg-goodfire Jun 26, 2026
c204b6a
fix(run): thread remat_ci_fn to make_train_step (was hardcoded False)…
ocg-goodfire Jun 26, 2026
aecf861
tidy(nits): drop stale yaml fields, revert seq_len TEMP HACK, fix lau…
ocg-goodfire Jun 26, 2026
c452e72
feat(run): compact per-step train log with elapsed<eta (#897)
danbraunai-goodfire Jun 29, 2026
4135496
fix(slow-eval): run the CI-fn readout in training precision (bf16), n…
danbraunai-goodfire Jun 29, 2026
951f5d6
fix(load_run): replicate HF prefix without cross-host allgather (dp>=…
danbraunai-goodfire Jun 29, 2026
b94a387
perf(hsdp): full32L donation + V/U hoist → b128/4-seq-per-GPU, ~3.6x …
ocg-goodfire Jun 29, 2026
d4f99e4
fix(jax): correctness + multi-host robustness fixes from feature/jax …
danbraunai-goodfire Jun 29, 2026
28dc9b0
fix(ci): make stacked-parity forward pins portable (CI flake) (#901)
danbraunai-goodfire Jun 29, 2026
397d920
refactor(launch): lift rank-env / XLA-flag surface into runtime.launc…
ocg-goodfire Jun 29, 2026
afe250c
perf(llama8b): untie recon remat policy from the V/U gather
ocg-goodfire Jun 29, 2026
bb6788d
feat(run): PD_PROFILE_MAX_EVENTS to raise the perfetto event cap
ocg-goodfire Jun 29, 2026
ba98bda
config(l18): layer-18-only decomposition, all 7 matrices, C doubled
ocg-goodfire Jun 29, 2026
4ecaa6d
perf(jax): compute CI/weights once + recompute stochastic recon masks…
ocg-goodfire Jun 30, 2026
809a072
chore(jax): remove PD_REPLICATE_WEIGHTS dead-end
ocg-goodfire Jun 30, 2026
69ba9f4
refactor(jax): config-native runtime — PD_ env vars → config, XLA fla…
ocg-goodfire Jun 30, 2026
2f9af23
perf(llama8b): static segmented masked forward, drop per-site lax.cond
ocg-goodfire Jun 30, 2026
448d1a5
fix(launch): handle Fire tuple-parsed --tags
ocg-goodfire Jun 30, 2026
2c844b7
feat(config): allow optional CI-fn grad clip
ocg-goodfire Jun 30, 2026
aead57f
refactor(eval): drop unused ce_unrecovered wandb metrics (#909)
danbraunai-goodfire Jul 1, 2026
4326635
fix(slurm): append log across requeue (--open-mode=append)
ocg-goodfire Jul 1, 2026
2abca95
fix(checkpoint): force restored state onto reference shardings
ocg-goodfire Jul 1, 2026
33046b1
config(pile-4l): default to smooth-L0 anneal-to-0.01; kind-tagged imp…
danbraunai-goodfire Jul 1, 2026
39137b5
fix(runs): pin run config as launch_config.yaml, not config.yaml (#910)
danbraunai-goodfire Jul 1, 2026
e925323
feat(slow-eval): opt-in per-token CI density heatmap (#911)
ocg-goodfire Jul 1, 2026
ca215e7
fix(hidden-acts-eval): derive waist leading from CI output, not token…
ocg-goodfire Jul 2, 2026
4587f0e
feat(logging): window min/max/median for grad-norm summaries (#914)
ocg-goodfire Jul 2, 2026
73fcbc1
refactor(config): remove inert n_samples from PersistentPGDReconLoss …
danbraunai-goodfire Jul 2, 2026
e0f1a2f
docs: de-parameterise config-specific comments (#920)
ocg-goodfire Jul 2, 2026
944e911
docs: sweep dead prefix/suffix (residual-start) terminology; re-lock …
ocg-goodfire Jul 3, 2026
e749885
config: finish the shape-literal scope migration in repo-authored con…
ocg-goodfire Jul 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
26 changes: 2 additions & 24 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,10 @@ jobs:
run: uv run ruff format .

- name: Run tests
run: |
NUM_PROCESSES=$(nproc | awk '{print ($1<4?$1:4)}')
echo "Using $NUM_PROCESSES pytest workers"
uv run pytest param_decomp/tests/ param_decomp_lab/tests/ --runslow --durations 10 --numprocesses $NUM_PROCESSES --dist worksteal
# `make test-all` runs the 1-device suite then the multidevice subset (sim CPU devices).
run: make test-all
env:
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
OMPI_ALLOW_RUN_AS_ROOT: 1
OMPI_ALLOW_RUN_AS_ROOT_CONFIRM: 1
HF_HOME: ${{ github.workspace }}/.hf-cache
build-frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: param_decomp_lab/app/frontend
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Install dependencies
run: npm install

- name: Run svelte-check
run: npm run check

- name: Run linter
run: npm run lint

- name: Build frontend
run: npm run build
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
docs/coverage/**
notebooks/**
scratch/
.scratch_*

# Script outputs (generated files, often large)
scripts/outputs/
scripts/standalone_repros/*.json
scripts/standalone_repros/*.txt
scripts/profile_ci_fn_*.json
scripts/profile_ci_fn_*.txt

**/out/
neuronpedia_outputs/
Expand Down Expand Up @@ -180,3 +185,8 @@ cython_debug/
*.schema.json

.claude/worktrees

.venv-cuda/
**/.venv-cuda/

nano_param_decomp_jax/jax_single_pool/experiments/logs/
267 changes: 172 additions & 95 deletions CLAUDE.md

Large diffs are not rendered by default.

49 changes: 24 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# setup
# ONE venv for the whole workspace: the JAX trainer core (`param_decomp` + `pretrain` +
# `vendored_jax`) is the root distribution and carries jax as a normal dependency, so a
# single `uv sync --all-packages` installs core + config + lab into one `.venv`. The CPU
# jax wheel is the base; the CUDA wheel is the `[cuda]` extra the per-run launch workspace
# installs.
.PHONY: install
install:
uv sync --no-dev
Expand All @@ -10,41 +15,21 @@ install-lab:
.PHONY: install-dev
install-dev:
uv sync --all-packages
uv run pre-commit install

.PHONY: install-all
install-all: install-dev install-app


.PHONY: app
app:
@uv run --package param-decomp-lab python -m param_decomp_lab.app.run_app

.PHONY: install-app
install-app:
(cd param_decomp_lab/app/frontend && npm install)

.PHONY: check-app
check-app:
(cd param_decomp_lab/app/frontend && npm run format && npm run check && npm run lint)
uv run --no-sync pre-commit install

# special install for CI (GitHub Actions) that reduces disk usage and install time
# 1. create a fresh venv with `--clear` -- this is mostly only for local testing of the CI install
# 2. install with `uv sync` but with some special options:
# > `--frozen` to enforce using the lock file for consistent dependency versions
# > `--link-mode copy` because symlinks/hardlinks dont work half the time anyway
# > `--extra-index-url` to get cpu-only pytorch wheels. installing with just `uv sync` will download a bunch of cuda stuff we cannot use anyway, since there are no GPUs anyways. takes up a lot of space and makes the install take 5x as long
# > `--index-strategy unsafe-best-match` because pytorch index won't have every version of each package we need. markupsafe is a particular pain point
# Note: explored the `--compile-bytecode` option for test speedups, nothing came of it. see https://github.com/goodfire-ai/param-decomp/pull/187/commits/740f6a28f4d3378078c917125356b6466f155e71
.PHONY: install-ci
install-ci:
uv venv --python 3.13 --clear
uv sync \
--frozen \
--all-packages \
--link-mode copy \
--extra-index-url https://download.pytorch.org/whl/cpu \
--index-strategy unsafe-best-match
--link-mode copy

# checks
.PHONY: type
Expand All @@ -66,22 +51,36 @@ check-pre-commit:

# tests

# `param_decomp/tests/` is the JAX trainer core suite (incl. the LM equivalence goldens);
# `param_decomp_lab/{tests,experiments}/` the lab suites (the toy TMS/ResidMLP tests live
# beside their models under experiments/).
TEST_PATHS = param_decomp/tests/ param_decomp_lab/tests/ param_decomp_lab/experiments/

.PHONY: test
test:
uv run pytest param_decomp/tests/ param_decomp_lab/tests/ --testmon --durations 10
uv run pytest $(TEST_PATHS) --testmon --durations 10

# Use min(4, nproc) for numprocesses. Any more and it slows down the tests.
NUM_PROCESSES ?= $(shell nproc | awk '{print ($$1<4?$$1:4)}')

.PHONY: test-all
test-all:
uv run pytest param_decomp/tests/ param_decomp_lab/tests/ --runslow --durations 10 --numprocesses $(NUM_PROCESSES) --dist worksteal
uv run pytest $(TEST_PATHS) --runslow --durations 10 --numprocesses $(NUM_PROCESSES) --dist worksteal
$(MAKE) test-multidevice

# Tests needing >1 device (sharding / checkpoint topology). They hang at the default 1
# device, so they're skipped in the 1-device passes and run here under SIMULATED CPU
# devices (XLA_FLAGS). `make test-all` runs this automatically as a second pass; invoke it
# directly only to run the subset alone (e.g. iterating on sharding/checkpoint).
.PHONY: test-multidevice
test-multidevice:
XLA_FLAGS="--xla_force_host_platform_device_count=4" uv run pytest $(TEST_PATHS) -m multidevice --runmultidevice --durations 10

COVERAGE_DIR=docs/coverage

.PHONY: coverage
coverage:
uv run pytest param_decomp/tests/ param_decomp_lab/tests/ --cov=param_decomp --cov=param_decomp_lab --runslow
uv run pytest $(TEST_PATHS) --cov=param_decomp --cov=param_decomp_lab --runslow
mkdir -p $(COVERAGE_DIR)
uv run python -m coverage report -m > $(COVERAGE_DIR)/coverage.txt
uv run python -m coverage html --directory=$(COVERAGE_DIR)/html/
Expand Down
22 changes: 22 additions & 0 deletions PERF_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# full32L HSDP perf — synthesized into Lore

The full perf investigation (V/U reconstruction hoist → buffer donation → b128/4-seq-per-GPU
at ~3.6× the b32 throughput) has been distilled into Lore. This file is intentionally short:
a 1100-line chronological trail of hypotheses, corrections, and dead-ends is not worth carrying
on the trunk.

**Canonical understanding** (mechanisms, exact memory anatomy, throughput, open levers):
lore `2026-06-29--full32l-hsdp-donation-canonical-scaling-memory`.

**Closed levers / measured-null results** (so they aren't re-chased — collective-combine,
latency-hiding, NCCL NVLS/CUMEM/PROTO, command buffers, unroll-by-K, scan-unroll,
replicate-weights, TP-without-SP): lore `2026-06-29--full32l-mfu-closed-levers-and-measured-facts`.

**Open comm lever** (CI-fn weight-grad cross-node reduce un-batched in the scan backward):
lore `2026-06-29--full32l-ci-fn-weight-grad-reduce-unbatched-in-scan`.

**Trainer-architecture canon** (JAX single-pool; torch 2/3-pool retired):
lore `2026-06-29--state--trainer-architecture`.

The full chronological trail is preserved in the git history of the `perf/hsdp-mfu` and
`perf/gather-coalesce-unroll-k` branches (this file's prior revisions).
68 changes: 14 additions & 54 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,66 +29,26 @@ The `pd-*` commands are installed by `param-decomp-lab`. Each in-repo experiment
self-contained script that reads a YAML and calls `optimize()`:

```bash
pd-tms param_decomp_lab/experiments/tms/tms_5-2_config.yaml
pd-resid-mlp param_decomp_lab/experiments/resid_mlp/resid_mlp1_config.yaml
pd-lm param_decomp_lab/experiments/lm/pile_llama_simple_mlp-4L.yaml
pd-lm param_decomp_lab/experiments/lm/<wrapper>.yaml --nodes N
```

For a brand-new experiment, write your own `run.py` that builds the target model, the
train/eval dataloaders, the eval `Metric` list, the `PDConfig` and `RuntimeConfig`, a
`Cadence` (when to emit), and a `RunSink` (where output goes), then calls `optimize(...)`:

```python
from param_decomp.configs import Cadence, PDConfig, RuntimeConfig
from param_decomp.optimize import EvalLoop, optimize
from param_decomp_lab.batch_and_loss_fns import recon_loss_mse, run_batch_first_element
from param_decomp_lab.run_sink import RunSink

optimize(
target_model=my_target_module,
train_loader=train_loader,
run_batch=run_batch_first_element,
reconstruction_loss=recon_loss_mse,
pd_config=PDConfig(...),
runtime_config=RuntimeConfig(device=device),
cadence=Cadence(
train_log_every=100,
save_every=5000,
),
sink=RunSink.local(out_dir),
eval_loop=EvalLoop(
loader=eval_loader,
metrics=[...], # list of pre-instantiated Metric objects
n_steps=10,
every=1000,
slow_every=5000,
),
)
```
TMS and ResidualMLP now live only as JAX targets in `param_decomp/`
(`tms.py`, `resid_mlp.py`); the torch experiment dirs were deleted.

The three in-repo `run.py` files
([tms](param_decomp_lab/experiments/tms/run.py),
[resid_mlp](param_decomp_lab/experiments/resid_mlp/run.py),
[lm](param_decomp_lab/experiments/lm/run.py)) are reference examples.
Training is the JAX single-pool trainer: the generic engine
(`param_decomp.run.run_decomposition_training`, a pure library) driven by the lab-side
composition root (`python -m param_decomp_lab.experiments.lm.run`), launched via `pd-lm`. A
run is one self-contained YAML (the `param_decomp_lab.experiments.config.ExperimentConfig`
schema over the core `param_decomp.configs` pieces). The torch trainer (`optimize()`, the
torch `Metric` impls, `RunSink`) was retired and is preserved at git tag `torch-oracle`. See
`param_decomp/CLAUDE.md` and `SPEC.md` for the trainer.

## Metrics

Configure training losses in `pd.loss_metrics` as a list of `{type: "<ClassName>", ...}`
entries. The `type` literal dispatches to a `Metric` subclass via
`param_decomp.metrics.dispatch.LOSS_METRIC_CLASSES`. Loss metrics must set `coeff`; they
are evaluated automatically alongside dedicated eval metrics. New loss metrics are added
by defining the class in `param_decomp/metrics/`, appending the config to
`AnyLossMetricConfig` in `configs.py`, and appending the class to `LOSS_METRIC_CLASSES`.

Eval metrics are caller-supplied: instantiate `Metric` objects in your `run.py` and pass
them via `EvalLoop(metrics=...)`. The in-repo experiments validate the YAML
`eval.metrics` list via the `AnyEvalMetricConfig` discriminated union on `EvalConfig`,
then dispatch each entry through `EVAL_METRIC_CLASSES` (both in
`param_decomp_lab.eval_metrics`):

```python
eval_metrics = [EVAL_METRIC_CLASSES[m.type](m) for m in cfg.eval.metrics]
```
Training losses are configured in `pd.loss_metrics` as a list of `{type: "<ClassName>",
...}` entries; eval metrics in `eval.metrics`. Both are validated by the torch-free pydantic
schema in core (`param_decomp.configs`) and computed by the JAX trainer
(`param_decomp/losses.py`, `slow_eval.py`).

## Packaging

Expand Down
16 changes: 16 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,23 @@

def pytest_addoption(parser: Parser) -> None:
parser.addoption("--runslow", action="store_true", default=False, help="run slow tests")
parser.addoption(
"--runmultidevice",
action="store_true",
default=False,
help="run tests needing >1 jax device (requires XLA_FLAGS=--xla_force_host_platform_device_count>=2; "
"use `make test-multidevice`)",
)


def pytest_configure(config: Config) -> None:
config.addinivalue_line("markers", "slow: mark test as slow to run")
config.addinivalue_line("markers", "requires_wandb: mark test as requiring WANDB credentials")
config.addinivalue_line(
"markers",
"multidevice: needs >1 jax device; hangs at the default 1 device, so skipped unless "
"--runmultidevice (use `make test-multidevice`, which sets XLA_FLAGS for simulated CPU devices)",
)


def _wandb_host() -> str:
Expand Down Expand Up @@ -52,13 +64,17 @@ def _have_wandb_credentials() -> bool:

def pytest_collection_modifyitems(config: Config, items: Iterable[Item]) -> None:
runslow = config.getoption("--runslow")
runmultidevice = config.getoption("--runmultidevice")
have_wandb = _have_wandb_credentials()
skip_slow = pytest.mark.skip(reason="need --runslow option to run")
skip_multidevice = pytest.mark.skip(reason="needs >1 device; run via `make test-multidevice`")
skip_wandb = pytest.mark.skip(
reason="No WANDB credentials (set WANDB_API_KEY or login via CLI)"
)
for item in items:
if "slow" in item.keywords and not runslow:
item.add_marker(skip_slow)
if "multidevice" in item.keywords and not runmultidevice:
item.add_marker(skip_multidevice)
if "requires_wandb" in item.keywords and not have_wandb:
item.add_marker(skip_wandb)
Loading