lorapop / code /DECISIONS.md
bryan7264's picture
Add files using upload-large-folder tool
e74a2c0 verified
|
Raw History Blame Contribute Delete
48.9 kB
# DECISIONS
## Intake (2026-11-20)
- Topic (user-supplied, in the invoking message as a near-complete proposal): a population-genetics
study of public fine-tunes. Raw-weight similarity marks descent; activation-weighted ("expressed")
deltas mark function; association scans between weight directions and behavior are corrected for
linkage (mixed models, within-family, designed crosses) and calibrated against interventions
(transplants, knockouts, background dosing). Hypotheses H1-H7 as in the user's text.
- User answers: "you are allowed to utilize GPUs, go ahead, dont cut back on anything".
-> D-001: full scope of the user's proposal is the target. GPU partitions are authorized, including
billed priority partitions. Non-billed `gpu`/`gpu_devel` are used first; `priority_gpu` when the
queue blocks progress or a job needs H100/H200 memory. Every priority job is logged in TRAINING_LOG.md.
- D-002: the pasted text references NOVELTY_REPORT.md, novelty/refs_verified.md and a 71-adapter
TinyLlama probe that do not exist on this machine (searched ~ to depth 6). Under rule 1 none of its
numbers or its novelty verdict are reused. The text enters the novelty loop as iteration 1; the probe
is redone here. Parts of the paste were scrambled (Mistral / Lots-of-LoRAs rows of the base-model
table, phenotype-table header, E2/E3 rows); they are rebuilt from context and HF counts are re-read.
- D-003: Phases 1-2. The user supplied the idea, so the idea pool is built around it: the user's
proposal is idea 1; other ideas from the lenses are the reserve for pivots. Landscape and triage run
in full because recent preprints are where collisions hide.
## Environment (recorded 2026-11-20)
- Cluster: Yale Bouchet. Login node login2.bouchet (no GPU; driver absent). Compute via SLURM, account
pi_skr2. Partitions seen: day (CPU, 1 day), devel, agent, bigmem, gpu (A5000/L40S/A40/RTX5000Ada,
2-day limit; per sibling project notes), gpu_devel (6 h), priority_gpu (RTX Pro 6000 Blackwell,
B200, H200, L40S, A40, RTX 5000 Ada, H100; billed), priority, priority_long, priority_mpi.
- Login node: 64 cores, 251 GB visible but per-user limits are small; heavy work goes through sbatch.
- Storage: home quota 126 GB with ~101 GB used -> code in /home/bjc75/other/finetuning, data and HF
cache in /nfs/roberts/scratch/pi_skr2/bjc75/finetuning (data/raw and data/processed are symlinks).
Scratch is purged after 30 days without access; final artifacts are copied to project storage.
- Python: system 3.9.21 on login; project env /nfs/roberts/project/pi_skr2/bjc75/conda_envs/lorapop
(Python 3.12, torch 2.7.1+cu128, transformers, peft, statsmodels, lm_eval), built by slurm/make_env.sh.
- Tools: WebSearch (deferred, loaded via ToolSearch); no direct WebFetch, a web-fetch subagent exists;
Agent tool exists (subagents for adversarial search). Helper skills installed: anthropic-skills:review,
anthropic-skills:bibliography-verifier, dataviz.
- litscan test (novelty/test): reachable arxiv, openreview, europepmc, github (4 sources). s2 returned
HTTP 429 without a key; dblp returned non-JSON; openalex skipped (no key). >= 3 sources, so litscan
is used with WebSearch alongside in every round.
- D-004 (Nov 20): priority-tier partitions are refused for this account ("requires PI approval"), so the
GPU authorization in D-001 maps to the non-billed `gpu` (A5000/L40S/A40/RTX 5000 Ada, 2-day limit) and
`gpu_devel` partitions. `devel` was at the per-user submit limit (other projects' jobs).
- D-005 (Nov 20): hidden but open GPU partitions gpu_h100, gpu_h200, gpu_b200 (AllowAccounts=ALL, not priority
tier) are usable. Jobs go to a partition list (gpu_devel for <=6 h tests; gpu,gpu_h100,gpu_h200,gpu_b200 for
longer runs) so they start wherever capacity exists; each job logs its GPU.
- D-006 (Nov 20): login node has a 1 GB per-user cgroup memory cap shared with another Claude session (a command
was killed with exit 137; user: "dont crash server there is a certain limit"). Rules from here: no Python
compute, downloads or numpy on the login node; all work via sbatch (agent/day for CPU+network, GPU partitions
for models); at most one subagent at a time; litscan runs via sbatch too. The session restarted ~11:50 and the
two Phase-1 subagents were stopped; they are resumed one at a time.
- D-007 (Nov 20): queue reality. Group fairshare 0.027 (account 0.011). sbatch --test-only start estimates:
day Nov 27; gpu Nov 22; gpu_h100 Nov 25; gpu_h200 Nov 28; gpu_b200 Nov 25; gpu_rtx6000 (RTX Pro 6000
Blackwell 96 GB, 16 GPU/user) Nov 20 19:23; gpu_devel immediate but 1 job/user, 2 GPU, 6 h; devel 2 jobs/user,
4 CPU, 60 GB, 6 h. Lanes: gpu_devel (immediate, chained) + gpu_rtx6000 (bulk) + gpu (backfill).
## Feasibility probe outcome (Phase 2; results/probe/probe_feasibility.json, jobs 34033661 OOM -> fixed, 34033997)
- Data: HF index (data/raw/hf_index/summary.json, 2026-11-20 11:30) lists e.g. Qwen2.5-0.5B-Instruct 1,101 adapters /
1,195 fine-tunes / 47 merges; Qwen2.5-7B 2,942/3,279/170; Mistral-7B-v0.2 1,212/1,158/353; TinyLlama 1,631/589/32;
Phi-3-mini 872/1,122/13; Llama-3.1-8B 3,077/3,322/106 (gated). Random sample of 120 Qwen-0.5B adapter repos: 9 had no
safetensors adapter; of the downloaded ones 132 loaded and passed checks, 6 failed (2 zero update, 1 wrong base
shape, 3 deeper base). Configs: mostly r=16/alpha=32 or r=8/alpha=16, 51/67 target all 7 modules; no DoRA/rsLoRA in
the sample.
- Core computation: factor-based relatedness for 94 adapters x 168 modules took 1.2 s (raw) on an RTX 5000 Ada; base
input moments over 600 reference texts (163,567 tokens) and expressed relatedness ran in the same job.
Raw off-diagonal similarity: median 6e-5, 99th pct 0.0039; 22/4371 pairs > 0.01, 1 pair > 0.5 (random sample of
~10% of the population, so few relatives). Expressed similarity: median 0.0017, 95th pct 0.032, 99th pct 0.096;
corr(raw, expressed) over pairs 0.56.
- Similarity law (simulation with the real layer-12 attention-input C, 100 pairs per rank): raw cosine matches the law
within ~1 SE for ranks 4-64 (e.g. r=64: 0.0666 vs 0.0666); with gradient rows in the data span, C-weighted cosine
follows the law with d_C = 6.3 within ~3-6% (r=16: 0.719 vs 0.686; r=64: 0.919 vs 0.897), slightly above the law.
- Battery: works end to end; ~50 s per adapter on an RTX 5000 Ada for the reduced battery (750 refusal prompts x 24
openers, 790 TQA, 570 MMLU, 1,100 MWE, 158 generations). Refusal scoring dominates (22 s). Traits vary widely
across 8 adapters (refusal_harm log-odds -5.2 to +2.0; MMLU acc 0.24-0.46; JSON validity 0-1; markdown 0.02-0.47).
- Compute estimate (full battery ~3-4x the reduced one): ~2-3 GPU-min per 0.5B model on RTX Pro 6000 class; the Qwen-0.5B
population (~2,300 adapters + fine-tunes) ~ 100 GPU-h; 7B bases ~10x per model. Interventions need a cheaper
per-dose battery. Verdict: FEASIBLE for the 0.5B-1.5B bases at full scale; 7B bases are throughput-bound given the
queue (D-007) and are scheduled after the small-base pipeline is validated.
- D-008 (Nov 20, 14:05): user: "you are still going past the limit make sure dont crash the cluster". Login cgroup at
1,073,606,656 / 1,073,741,824 bytes, 13 oom_kills; 3 Claude sessions (~300/260/220 MB) + another project's pip install.
Changes: no subagents from this session (they run in-process); no python on the login node at all (parsing via
sbatch); only tiny shell commands. Phase 3D adversarial search is run by me under the same brief (deviation from
"fresh subagent", logged; the confirmation search 3H will also be by me with queries written without opening
iter_k/queries.txt/search/report.md). Reference verification stopped at [30] of 65 (31 VERIFIED, 1 MISMATCH,
1 NOT FOUND so far); remaining entries verified later in a SLURM job (curl) and by WebSearch.
Fetch of Qwen2.5-0.5B adapters finished: 955 ok, 157 repos without safetensors adapter, 9 failed downloads.
- D-009 (Nov 23): user: 'continue, use this partition'. All commands now run inside agent allocation 33891243 (c1106u13n03) via slurm/ag.sh; the Claude process itself remains on login2 (cannot be moved by me).
- D-010 (Nov 23): Phase 3 passed at iter_01 (user's proposal), confirmation passed. PROPOSAL.md and NOVELTY_REPORT.md
written. Battery deviation from the user's draft: MC emergent-misalignment questions [32] and the sycophancy set of
[31] are replaced by Anthropic model-written evaluations (sycophancy sets; advanced-AI-risk human-written propensities),
which are published A/B multiple-choice instruments (Perez et al. 2022, to be verified before citing). Reason: no
published MC form of [32]; [31] requires free-form judging, which conflicts with "all scoring automatic". The EM
free-form questions are kept on disk (data/raw/battery/em) but not scored.
- D-011 (Nov 23): throughput. Battery/updates support bank mode: several backgrounds (adapters, adapter+dose,
offspring) evaluated in one batch, each row with its own low-rank update (src/lorapop/deltas.py set_bank/set_rows).
Verified equal to single-update mode on a random tiny Qwen2 (tests/test_bank.py) and end to end (tiny CPU run, group
1 vs 2). Used by phenotype.py (group 8), intervene.py and cross.py. Data generation (phenotyping, controlled training)
was queued before the pre-training review because it involves no analysis choices; the review gates scans,
interventions and crosses.
- D-012 (Nov 23): gpu_devel was held by another project's job; the phenotyping array (34425996, 16 shards) and training
jobs (34426377, 34426378) are queued on gpu_rtx6000 (estimated start 2026-11-24 00:08). The genotype job runs on
devel CPU (fp32) to avoid the GPU queue.
- D-013 (Nov 23): pre-training review PASS WITH CONCERNS (REVIEW_REPORT_PRE_TRAINING.md). Fixed: rank-safe covariate
projection in scans; DoRA adapters excluded from analyses (plan 2.3 conversion not implemented; deviation); OOM groups
not recorded; requirements.txt. Intervention plans include c = 0 per background (doses_bg = [-1, 0, 1]), deviating
from plan 8.4's reuse of phenotyping-run values, so all doses share one measurement setting.
- D-014 (Nov 23): E1 wild Qwen2.5-0.5B (results/e1/wild_qwen05.json): 907 adapters genotyped (48 failed load/shape), 3 DoRA;
653 descent families, 36% with a relative, largest 77; n_eff 191 (descent) / 176 (function); ARI(family, author) 0.88.
Consequence: power at n_eff ~190 is limited to large-effect loci; replication populations and full fine-tunes matter.
- D-015 (Nov 23): Seed-sibling recipe deviates from plan 6.1 (1 epoch x 1,000 examples): the smallest no_robots
categories (Classify, Coding) have 334 examples, so every sibling run uses n = 300 for 3 epochs (900 example passes) to
keep the task set and data size equal across tasks. alpha = 2r, lr 2e-4 as planned. PEFT initialises A with
Kaiming-uniform (not Gaussian); the law's "+1" term assumes Gaussian fourth moments, a small effect against the
factor-of-two criterion; noted in the paper.
- D-016 (Nov 23): Analysis code for E3 written before any scan result: src/analysis/plan_interventions.py (8.1, 8.2, 8.5)
and src/analysis/calibrate.py (14.1, 14.2, 16.3-16.5). Knockout carriers are also measured at c = 0 in the same run.
If fewer than the planned loci pass FDR on D, the plan may be filled by round-robin rank on D p-values (--min_loci);
each locus records its source ("fdr:" or "fill:") and kappa is reported for the FDR-only subset too. Observational
variances in kappa use model-based SEs unless a family-bootstrap file is supplied (plan 14.1 asks for the bootstrap;
src/analysis/obs_boot.py, fixed-variance-component GLS, will provide it).
- D-017 (Nov 23): GPU pilot (34450508) found a silent routing bug: with one background in a bank (group size 1, or the
last group of a shard holding one adapter) Battery._rep returned no row owners, ROWS stayed unset and the update was
skipped, so that adapter was scored as the base (pilot: every group-1 adapter, and the lone adapter of the second
group-8 batch, equalled the base exactly). Fixed in src/lorapop/battery.py (owners [0]*n when nb == 1) with a
regression test (tests/test_bank.py); no population phenotype had been produced yet (arrays pending), so nothing is
affected. Equivalence re-checked by slurm/pilot_eq.sh. Full battery: 94.9 s per adapter (RTX PRO 6000, small group);
population phenotyping ~24 GPU-h. Full fine-tune reduction works (VIPO_SHP: ppl ratio 1.04, median rank-64 energy
share 0.54 per module, so fine-tune genotypes capture about half of each module's update energy; limitation);
architecture-mismatched repos are rejected by the shape check.
- D-018 (Nov 23): Timing (34454631): full battery 94.8 s/adapter at generation batch 256 and 88.6 s at 1024 (outputs within
0.055), so decoding batch size is not the bottleneck. The bank forward gathered per-row copies of every module's factors
(bV[idx], bU[idx]) at every step. Replaced by one masked matmul over the stacked factors of all backgrounds (row b keeps
only block b; exact zeros elsewhere). Same arithmetic per row up to bf16 accumulation order; tests/test_bank.py passes;
a GPU guard in slurm/pheno_devel.sh re-phenotypes the 16 timing adapters and aborts if any teacher-forced trait differs
by > 0.05 from the old implementation. No population phenotypes existed before the change.
- D-019 (Nov 23, 21:00): Measurement hardware and queue. The gpu_devel lane landed on an H200 node (a1122u02n01): all 252
primary-population records so far report "NVIDIA H200". Test-only start estimates for new GPU jobs were Dec 2-4
(gpu_h100/gpu_h200) and none for gpu_rtx6000. To keep the primary population on one hardware type, its remaining 8 shards
(7..0, base in shard 0) run on gpu_devel pinned to --gpus=h200:2 (job ph_dev2, submitted when ph_dev ends; the devel QOS
allows one submitted job); the pending gpu_rtx6000 array ph_q05 was cancelled. Secondary sets (fine-tunes, merges,
training) may start on gpu_rtx6000, gpu_h100 or gpu_h200 (plan 15.1 backfill). Every record stores its GPU name; any
measurement set that mixes hardware gets the GPU type as a fixed covariate in X, and a cross-hardware concordance check
(24 adapters re-measured on the second type) is reported. Interventional contrasts (dose c vs 0 on the same background)
are computed within one run, so hardware shifts cancel there.
- D-020 (Nov 23): Software smoke test of scan_run.py on the 212 phenotyped adapters available at 20:40 (job 34486421,
output results/scans/smoke_q05). Used only to find crashes and timing; its numbers are not reported and no decision
depends on them. The primary-trait list (16.2) is computed mechanically from reliability on the full population.
- D-021 (Nov 23): Forecast competitors (plan 11.3) implemented instead of skipped: src/run/forecast_competitors.py
(gradient kernel and representation directions on the Qwen base; definitions and smooth surrogates for accuracy/ECE
in its docstring; generation-trait gradients by the score-function estimator with K = 4 temperature-1 samples per
prompt, repetition penalty off so samples follow p; CountSketch D = 2^22) and cross-base spillover (MODE=tl_targeted
in slurm/train.sh trains the 54 targeted runs on TinyLlama-1.1B-Chat with the same data; phenotyped with
slurm/pheno_trained.sh). forecast.py adds grad_cos, grad_step, repr and spill, and paired bootstraps of
MSE(G_function) - MSE(X) for every X. Spillover needs the TinyLlama population phenotypes for its ECDF scale.
Jobs: tr_tl 34487003 (after tr_cd), ph_tr 34487005 (Qwen siblings/opposite/targeted, after tr_sib+tr_cd), ph_trtl
34487006 (after tr_tl). gpu_h200 caps 6 CPUs per GPU: ft/merge arrays set to 6 CPUs.
- D-022 (Nov 23): Direction-resolution crosses (plan 9.3) implemented: src/run/cross.py direction_pieces (output-side projection on the left singular vectors of the expressed delta; pieces sum to Delta exactly; unit tests in tests/test_cross.py), crosses.py layers emits the top-4 modules on a module design, analyze computes direction-piece locus projections from LoRA factors.
- D-023 (Nov 23): Negative controls (plan 7.5 names a "negative-control trait" without defining it). Kept: family-level
random effect with no within-family noise (__negative_control__). Added before any real scan, as diagnostics of the test
machinery: __null_iid__ (iid N(0,1); every estimator should give lambda_GC ~ 1) and __null_fam50__ (family effect +
equal-variance iid noise). Reason: in the smoke run (D-020) the pure family-level control drove the MM-fd residual
variance to its lower bound (V nearly singular), so its lambda reflects that degeneracy as well as confounding.
- D-024 (Nov 23): "Non-associated" same-module control locus (plan 8.1) operationalised as: not FDR-significant on D for any estimator, and min D p x (n primary traits x n estimators) > 0.5 (Bonferroni over the locus's own tests). The first implementation (min D p > 0.5 over ~350 tests) admitted no locus in the smoke plan. Also fixed numpy int64 JSON serialisation in plan_interventions.py.
- D-025 (Nov 23, 21:50): Queue reality. Fair-share of pi_skr2 is 0.014; test-only start estimates for 1-GPU jobs on gpu
(L40S/A40), gpu_rtx6000, gpu_h100 and gpu_h200 are Nov 29-Dec 4. The gpu_devel lane (1 job, 2 GPUs, 6 h) is the only GPU
capacity that starts promptly, so it runs production work back to back: slurm/lane.sh (bash loop: squeue + sbatch)
submits the lines of slurm/devel_queue.txt in order whenever the lane is free; submissions are logged in
slurm/devel_queue.done. Training moved to the lane (slurm/dv_train.sh: siblings on GPU 0, distillation + opposite +
targeted on GPU 1; slurm/dv_mix.sh: forecast competitors + TinyLlama targeted training on GPU 0, trained-set phenotypes
on GPU 1); the shared-queue jobs tr_sib, tr_cd, ph_tr, tr_tl, ph_trtl were cancelled (their dependency chains would
have waited for the shared queue). Independent resumable work stays queued on the shared partitions as backup
(ft_q05, mg_q05, fc_q05). Order follows plan 15.2: population phenotypes -> training -> scans (CPU) -> interventions.
- D-026 (Nov 23): Scan speed and robustness before the real scan: exact eigen fast path for one-kernel REML (MM-f; src/analysis/scan.py reml_eig1, kernel eigendecompositions cached across traits; same objective, start and bounds; unit test against reml() and Cholesky GLS); scan_run.py resumable (per-trait npz + <trait>.summary.json skipped if present) and shardable (--shard/--nshards; summary.json assembled from per-trait files, "complete" flag). Devel CPU lane (6 h, 4 CPUs, 60 GB per user): two 2-CPU shards, slurm/scan_devel.sh, which refuses to run on incomplete phenotypes.
- D-027 (Nov 23, 22:30): After ph_dev ended (8 shards, 475 records, all H200) the H200 devel node was fully allocated by
others (no start estimate); 4 B200 GPUs were free. The remaining shards 7..0 run on B200 (ph_dev2) rather than idle the
lane. Handling per D-019: GPU type enters the population design matrix X as a one-hot covariate when mixed
(population.py; also returned as P["gpu"]); shards interleave adapters (dirs[s::16]), so hardware is unrelated to
genotype by construction. Concordance: the same job re-measures 23 H200-measured adapters (every 18th ok record in
name order; data/raw/concord_q05 symlinks; 23 rather than 24 as built) plus the base on B200 ->
results/phenotypes/qwen05_concord; per-trait H200-vs-B200 correlation and mean shift are reported.
- D-028 (Nov 23): Plan 8.3 ("full battery per dose and background", doses -3..3) is implemented with all 7 doses on the
base but only c in {-1, 0, 1} on the 24 adapter backgrounds (the doses that gamma_do in 8.4 uses). Measuring 7 doses on
every background would need 175 instead of 79 battery runs per direction. Deviation from a tracked section (17); reported
in the paper. The primary-trait list (4.3) is also written to results/phenotypes/primary_traits_qwen05.json.
- D-029 (Nov 24, 00:00): Sensitivity (14.6) and ablations (14.7) implemented ahead of the main scan.
Scan-level, in scan_run.py:
- --n_pcs (5/10/20);
- --fam_mult (2/3/5 x law; population.build fam_mult);
- --ablate no_lob (the full function kernel for every block);
- --ablate no_func (MM with the descent kernel only; its mm_f column reads as MM-d; PCs then also come from K_desc);
- raw coordinates (--raw_coords).
Genotype-level, in genotypes.py:
- --kcap 128/256 (the capped k99 is saved into the variant's basecov.pt);
- --corpus wiki (1,500 wikitext paragraphs);
- --var_frac 0.8/0.95.
These run through slurm/geno_variant.sh into data/processed/qwen05_<var>; the original job peaked at 55 GB, so one
variant at a time.
The no-descent-layer ablation is MM-f itself. Selection and estimation on the same families is calibrate.py --subset D
(model-based SE; already present). The genotype variants change the loci, so their sensitivity is reported at the scan level (lambda_GC, hits,
overlap of discoveries with the primary scan); their kappa is not recomputed (no new interventions).
Devel-CPU lane runner slurm/lane_cpu.sh + slurm/cpu_queue.txt (<= 2 jobs, 4 CPUs, 60 GB per user).
- D-030 (Nov 24): Trait-targeted fine-tunes completed to the plan 6.3 list before any training ran:
- truthful: instruction distillation like the other conditions (TruthfulQA itself is the battery's test set and is not
used for training); focal trait tqa_mc1.p.
- mmlu_stem: one MMLU domain, trained on 1,200 SciQ train question/support/answer rows (allenai/sciq, real answers, not
distilled; data/raw/sciq); focal trait mmlu.acc_stem.
- casual: kept as an exploratory extra condition (not in 6.3; no focal trait).
Deviation: one data source per condition (instruction distillation; SciQ for mmlu_stem), not "2 data sources where
available". runs_targeted.jsonl now has 66 runs; runs_siblings.jsonl is byte-identical after regeneration.
forecast.py parses the condition as name[4:].rsplit("_", 2)[0]; split("_")[1] would have broken mmlu_stem.
- D-032 (Nov 24, 02:00): Spike-in measurement (plan 10) restricted to what the analysis uses. The analysis
(src/analysis/spikein.py) reads one trait per direction, its target (primary trait with the largest |ECDF-mapped
change| on the base at 1 SD). src/run/spikein.py --target_only:
- measures the base at 0 and 1 SD with the full battery;
- fixes the target by the same rule and writes it to target.json (the analysis uses it and reports any disagreement
with its own recomputation);
- measures carriers at the spike doses on the target's item set only;
- measures each carrier's c = 0 once per item set, shared across directions.
Why: about 600 carriers x 3 doses x 16 directions full-battery runs (~240 GPU-h) would exceed the devel-lane
capacity. The spike trait and its estimates are unchanged. Section 10 is not in the plan 17 tracked list; recorded
for transparency. phenotype.summarise_raw skips MMLU ECE when MMLU was not run.
- D-033 (Nov 24, 02:40; before any intervention): "non-associated" for the high-variance control (plan 8.1; D-024) is now
defined over the four population-level estimators (naive, PC, MM-f, MM-fd), not all seven. Reason: on the real
scan the within-group estimators are strongly inflated (median lambda_GC over 53 primary traits: WF-d 3.82, WF-r 1.68,
DUP-AFE 2.04; WF-d puts 4,780 of 5,191 loci in its FDR set). Under the 7-estimator rule only 1 locus in the genome
qualified and 0 of the 79 tested modules had a control. Under the 4-estimator rule 1,778 loci qualify and 78 of 79
tested modules have one (work/hv_candidates.py). plan_interventions.py --nonassoc_est (default naive,pc,mm_f,mm_fd).
- D-031 (Nov 24, 02:45): Intervention cost and execution.
- Plan (results/interventions/plan_qwen05.json): 150 tested loci (all FDR on D, round-robin over estimators; no fill),
150 random, 150 other-layer and 78 high-variance controls (528 directions); 24 backgrounds; 2,719 knockout runs on
276 distinct carriers.
- Measured cost of the plan as written: 47,150 full-battery runs. At the pilot's 53.5 s per run (RTX Pro 6000; plan
15.3 is in that GPU's hours) that is about 700 GPU-h against the 250 GPU-h budget.
- Measures, in order:
(1) c = 0 is measured once per background and per knockout carrier (reference units, intervene.py
--shared_zero) instead of inside every direction. This loses no information: c = 0 has zero weight in every OLS
dose slope (gamma_do, gamma_base), and knockout differences use the shared reference
(calibrate.py reads __ref__*.json). 31,532 runs.
(2) Control directions (random, other-layer, high-variance) are measured on the first 8 of the 24 backgrounds
(one per largest recipe cluster). Tested loci keep all 24 backgrounds, the 7 base doses and all knockouts, so
kappa and Delta (16.3-16.4) are unaffected. This deviates from 8.2 for controls only. 19,436 runs.
(3) Plan 4.5 trigger (measured cost > 15.3 budget): generation item sets use their fixed half h0
(intervene.py --gen_half 0). Expected about 200 RTX-class GPU-h in total.
- Execution: workers claim units through lock files (intervene.py --claim). Lanes:
- devel: slurm/iv_devel.sh, 2 GPUs, P0 + P1 workers;
- shared GPU queue and scavenge: slurm/iv_array.sh.
All lanes run the same plan and IVARGS="--shared_zero --gen_half 0". Each record stores seconds per item set.
- D-034 (Nov 24, 03:00): Cross parents (plan 9.1).
- Bug fixed before any cross ran: the eligibility check compared info["modules"] (module types) with layer.module
keys, so no adapter qualified. Eligibility now requires a nonzero expressed norm in all 24 x 7 modules (diagonal of
grams_exp); 610 adapters qualify.
- 30 parents chosen (results/crosses/parents_q05.json). Layer design: 5,760 offspring, seed 0
(results/crosses/q05_layer/design.json).
- cross.py run --claim shares fixed 8-offspring chunks between workers through lock files, as intervene.py does
(D-031); slurm/cx_devel.sh and slurm/cx_array.sh.
- D-035 (Nov 24, 03:40): Hardware-matched c = 0 references for interventions.
- Problem: gpu_devel mixes five GPU models (RTX Pro 6000 Blackwell, B200, H200, A40, RTX 5000 Ada), and the backup lane
adds H100. With D-031 shared references, a knockout difference or a base-curve point could compare a dosed combo on
one GPU model with its c = 0 measured on another. R3 bounds the hardware effect (median CCC 0.998, max |shift| 0.147
SD), but it is not zero.
- Fix, before any production intervention ran: reference units are tagged per hardware configuration,
__ref__<GPU model>_b<bs>g<gbs>__NNN. Every hardware type measures its own 301 c = 0 combos (base, 24 backgrounds,
276 knockout carriers) before taking directions: about 1.5% of the plan per type.
- Direction records store "hw". calibrate.py uses only same-hw, same-gen_half references, and counts the c = 0
points it could not match (n_zero_points_missing).
- Dose slopes are unaffected: c = 0 has zero weight, and every dose of a direction runs in one process.
- Also added:
- records store peak GPU memory;
- locks are released on exceptions (HELD and try/finally), not only on SIGTERM;
- cross records store the GPU model;
- job scripts run one worker per GPU when the GPU has < 60 GB.
- Smoke test (CPU, tiny battery, 3,600 s limit): reference unit and random control produced correct combos (no c = 0
in directions, per-direction backgrounds, gen_half 0, section_seconds). The locus unit was still running at the time
limit; its stale lock was removed. Tests: 28 pass.
- D-036 (Nov 24, 03:55): Resumable CPU analyses and use of idle CPUs in GPU jobs.
- Problem: scan_extras.py (1,000 family-block bootstrap resamples, MM-fd as fixed-V GLS on n = 884) takes about 14 min
per trait. 53 traits exceed the 6 h devel limit, and the script wrote only at the end. Job 34516948 was cancelled
after 1 h 20 min (6 traits, nothing saved).
- Fix: scan_extras.py and obs_boot.py write per-trait parts (<out>.parts/) and claim traits through lock files (as in
D-031). SIGTERM runs lock release. The final file is written when every trait has a part.
- RNG: seeded per trait by (seed, trait index), so results do not depend on which process takes which trait. Nothing
had been reported from the earlier sequential seeding.
- iv_devel.sh gains SIDE: claim-based CPU commands on the 12-CPU devel GPU job's idle cores. The job waits only for
its GPU workers.
- The day partition is not usable in practice: jobs have been pending on priority for > 9 h.
- D-037 (Nov 24, 04:05): Raw-coordinate interventions, for the plan 14.7 ablation of the whole pipeline.
- D-029 covered raw coordinates at the scan level only. Plan 14.7 asks for the whole pipeline, which includes kappa.
- Plan results/interventions/plan_qwen05_raw.json, from the raw scan (results/scans/qwen05_raw) with the same selection
rule: 150 loci, all FDR on D. No controls, no knockouts.
- Every direction runs on the first 8 of the same 24 backgrounds; these are the control backgrounds of D-031. The raw
allele is sum_i u_il Delta_i / sqrt(lam_l) (V = identity), dosed in raw-genotype SDs.
- Size: 3,309 battery runs (9 c = 0 references per hardware type).
- The matched comparison is kappa_raw against kappa_expressed on the same 8 backgrounds; calibrate.py will need a
background-subset option.
- Cost about 41 RTX-class GPU-h at gen_half 0. Total interventions: about 200 + 17 (D-035) + 41 = 258 GPU-h, against
the 250 target (plan 15.3, "budget targets").
- The raw plan runs after the main plan in the same jobs: iv_devel.sh and iv_array.sh take PLANS, a list of plan:out
pairs worked through in order.
- Reference units now cover only backgrounds that some direction uses. The main plan is unchanged: all 24 are used.
- E1 siblings: e1_siblings.py loaded all 8 task gradients (8 x 0.7 GB) at once and hit the 7 GB cap on the agent
node. Stopped; the gradients are now memory-mapped (torch.load mmap=True).
- D-038 (Nov 24, 04:15): Battery batch sizes capped by GPU memory.
- The devel lane landed on 2 x RTX 5000 Ada (32 GB), and three jobs failed within minutes with CUDA OOM at batch size
128 / generation 256: iv_dev1 34525397, iv_dev2 34525817, and dv_mix 34526392 (cancelled). The failing allocation
was in the bank-mode forward (deltas.py) on the long refusal prompts.
- batch_cap() in battery.py caps (scoring, generation) batch sizes:
- >= 70 GB (H100, H200, B200, RTX Pro 6000): none, 128 / 256 as in the population run;
- 40-70 GB (A40, L40S): 64 / 128;
- < 40 GB (RTX 5000 Ada, A5000): 32 / 64.
- Every runner gets the cap through Battery. Records store the batch sizes actually used. The intervention hardware
tag (D-035) uses them, so each (GPU model, batch sizes) configuration has its own c = 0 references.
- Two workers share a GPU only at >= 120 GB. Jobs set PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True (allocation
only; no numerical effect).
- Batch composition changes bf16 numerics only at the noise level (pilot group 1 vs 8, slurm/pilot_eq.sh; D-017), and every
comparison inside an intervention is within one configuration.
- The failed jobs were requeued first in the devel queue (iv_dev1b, dv_mix, iv_dev2b). The lane had already started
iv_dev3, which runs with the cap.
- D-039 (Nov 24, 04:30): Recipe-family threshold per plan 5.3.
- The primary scan (results/scans/qwen05) ran before the seed siblings were trained, so population.build used its
fallback cut: 1 - (99th percentile of K_func over all population pairs) = 0.874.
- Plan 5.3 pre-registers the cut at the 99th percentile of K_func between different-task, independent-init seed
siblings. E1 siblings (results/e1/siblings_qwen05.json) gives K_func p99 = 0.0639, so the distance cut is 0.9361.
- Only recipe families change. They feed the WF-r estimator (plan 7.1) and the background choice (8.2, one per recipe
cluster). Descent families, the D/E split and the other six estimators are unchanged.
- Action: re-run the expressed and raw scans with --recipe_threshold 0.9361427475490963
(results/scans/qwen05_rt, qwen05_raw_rt). Re-plan both intervention sets from them and compare with the plans now
running:
- If tested loci and backgrounds are unchanged, the running plans stay and only WF-r results and obs_boot are
recomputed.
- Otherwise the new plans replace them, and the hours of reference units already measured are reported as lost.
- All sensitivity and ablation scans in the CPU queue now carry the same threshold. The fallback-threshold scans are
kept as a sensitivity result.
- Outcome (Nov 24, 05:14): results/scans/qwen05_rt is complete.
- Recipe families: 401, against 488 at the fallback threshold. Every estimator except WF-r is identical.
- WF-r: median lambda 2.17 (fallback 1.68); FDR-on-D loci 4,107 (fallback 4,742).
- The re-planned set (plan_qwen05_rt.json) shares 129 of 150 tested loci and 17 of 24 backgrounds with the running
plan, so the new plan replaces it:
- plan_qwen05.json is now the 5.3 plan: 525 directions, 19,338 runs. The old plan is kept as plan_qwen05_fb.json.
- iv_dev3 34527957 (old plan, 1 h on 2 x RTX 5000 Ada, no unit finished) was cancelled. Its lock files are in
results/interventions/qwen05_fb_partial.
- obs_boot for the old plan is kept as results/scans/qwen05/obs_boot_fb.npz. It is recomputed for the new plan
(obs_boot_rt, CPU lane and side tasks) into results/scans/qwen05_rt/obs_boot.npz.
- Reference-unit ids now carry a content hash (__ref__<hw>__NNN_<sha1[:8]>), so a changed plan can never reuse a
reference file whose combos differ.
- scan_extras results (results/scans/qwen05/extras.json) do not use recipe families and stay valid.
- The raw plan is rebuilt when results/scans/qwen05_raw_rt completes; it runs second in PLANS, days from now.
- Addendum (Nov 24, 08:21): spikein.py analyze runs every scan estimator, so WF-r needs the cut too. It now takes
--recipe_threshold and warns without it. The other callers of population.build with the default cut (calibrate,
crosses, forecast, audit, admixture) do not use recipe families.
- D-040 (Nov 24, 05:30): GPU health check.
- In iv_dev1b 34531854 (node a1112u01n01, 2 x RTX Pro 6000), the worker on GPU 1 died at start with "CUDA error:
uncorrectable ECC error encountered". The job continues on GPU 0 only; its claimed unit was released.
- iv_devel.sh and cx_devel.sh now read ecc.errors.uncorrected.volatile.total per GPU and start no worker on a GPU with
a nonzero count. A job with no usable GPU exits at once, which frees the lane.
- Results from a GPU with ECC faults are never used: the failed worker wrote nothing.
- Raw plan (Nov 24, 06:05): rebuilt from results/scans/qwen05_raw_rt; the old one is kept as
plan_qwen05_raw_fb.json. 129 of 150 tested raw loci are shared. The first 8 backgrounds equal the main plan's
first 8, so the comparison stays matched. 3,309 runs. obs_boot for it is queued (obs_boot_raw).
- D-041 (Nov 24, 08:05): Gradient checkpointing in the forecast competitors (src/run/forecast_competitors.py).
- The first full-size refusal batch (2 prompts x all refusal and compliance continuations, fp32, with backward) held
93 GB of activations and ran out of memory on a 96 GB GPU (dv_mix 34535965).
- Fix: activation checkpointing (non-reentrant) during the gradient passes. It is active only in train mode. Qwen2 has
no dropout (attention_dropout = 0, asserted), so train-mode forward passes equal eval-mode ones.
- Sampling for the generation traits switches to eval mode with the KV cache and back afterwards. Checkpointing
preserves the RNG state, so the sampled responses do not change.
- Estimands, items, K, D and seeds are unchanged. Equivalence check:
- A CPU re-run of the smoke test (tiny sizes) was OOM-killed at 6.5 GB on the agent node.
- dv_mix2 therefore first runs tiny sizes (K 2, D 65536, seed 0) on its GPU twice, with and without checkpointing
(--no_ckpt).
- tools/check_ckpt_equiv.py requires R_grad and R_rep within 1e-3 and gradient norms within a relative 1e-3.
- The full run starts only if the check passes.
- D-042 (Nov 24, 08:14): Linkage-score regression (plan 7.4) in the standard LD-score-regression form.
- scan_extras.py computes l_j = sum_k r_jk^2 with plain r^2 and fits unweighted OLS of naive chi^2 on l. On traits with
large mean chi^2 the unweighted intercept is negative (gen.code -1.53, ife.code -7.6), which cannot be read as
confounding. The fit is dominated by a few high-l loci.
- src/analysis/lsr.py, run once on the primary scan (results/scans/qwen05_rt/lsr.json, agent node, about 10 min):
- bias-corrected r~^2 = r^2 - (1 - r^2) / (n - 2), as in LD-score regression;
- weighted fit with weights 1 / max(l, 1), LD-score regression's weighting;
- delete-one-module jackknife SEs;
- the ratio (intercept - 1) / (mean chi^2 - 1).
- Its plain-r^2 OLS fit reproduces the extras values (gen.code -1.53), which checks the input. The weighted, corrected
fit is the reported diagnostic; the scan_extras column is kept in the file.
- This adds no new test; it uses the plan's diagnostic in its standard form. Exploratory status is unchanged.
- D-043 (Nov 24, 08:16; before any kappa was computed): Direction of the calibration slope.
- PROPOSAL.md defines kappa as "a calibration slope of interventional on observational effects", and the paper's
methods say the same. calibrate.py regressed beta_obs on gamma_do, the reciprocal slope. Plan 14.1 names the
estimator (Deming through the origin) but not the direction.
- Fix: kappa = slope of gamma_do on beta_obs, in every call (pooled, bootstrap, per trait, FDR-only). Under the ML
errors-in-variables objective the swapped estimate is exactly 1 / the old one (unit test). The change matters for
|kappa - 1|, Delta and the [0.8, 1.2] criteria (H2, H3), which are now evaluated on the pre-registered scale.
Overestimation by an observational estimator now shows as kappa < 1.
- The search grid was [-10, 10] and could cap a slope. It is now k = tan(theta) over 801 angles, which covers every
slope, followed by the same golden-section refinement.
- Tests: 31 pass, including the new reciprocal and large-slope test. No intervention unit had been analysed.
- The same convention for the segment calibration of the crosses (H4; crosses.py analyze): measured alpha on alpha
predicted from each estimator, pooled and per trait. No offspring had been analysed.
- D-044 (Nov 24, 09:26): lambda_GC uncertainty by a family jackknife instead of the family bootstrap.
- scan_extras.py's family-block bootstrap (plan 7.4) resamples descent families with replacement. A family drawn twice
enters as distinct adapters. The naive scan counts the copies as independent, and MM-fd with fixed V does so through
its independent residual term. The bootstrap distribution of lambda is therefore shifted upward: the scan's point
lambda lies below the bootstrap 95% interval on 24 of 53 traits (naive) and 37 of 53 (MM-fd).
- These intervals are kept in extras.json but not used for inference.
- src/analysis/lambda_jk.py: delete-a-group jackknife. Descent families are dealt at random (seed 0) into 20 groups;
lambda is recomputed without each group (naive OLS; MM-fd GLS with the scan's own full-sample variance components).
It reports the SE and point +- 1.96 SE, and checks that the point estimate reproduces the scan's lambda.
- H2's lambda criterion (16.5) uses the point estimate and is not affected.
- Also: two lock files held by dead processes (from the cancelled jobs iv_dev3 and iv_dev1b) kept the last two extras
traits unclaimed. They were moved to work/stale_locks, and the traits ran on the agent node (EXTRASDONE 09:24).
- D-045 (Nov 24, 14:02): fine-tune phenotypes are compared with a base measured on the same hardware.
- dv_mix2 (34562952) landed on RTX 5000 Ada GPUs (32 GB, batch caps 32/64, D-038). At about 20 min per group of 8 the
targeted, opposite, TinyLlama-targeted and sibling sets do not finish in its 6 h. Continuations may land on other GPU
types in gpu_devel (H200, B200, RTX Pro 6000, A40).
- The forecast's fine-tune test set (plan 11.3) uses phenotype minus base. Each set had one base, measured in its first
run. slurm/dv_mix3.sh first measures the base on its own GPU and batch configuration into <set>/hwbase/<job>_<gpu>/,
then continues the set (finished adapters are skipped).
- forecast.py pairs each adapter with the base of the same (GPU model, batch sizes) and reports matched and unmatched
counts in its notes. This is the phenotype analogue of D-035. Battery code is unchanged.
- Also: dv_mix2's D-041 check passed on the GPU: R_grad max |diff| 7.3e-9, R_rep 0, gradient-norm relative difference
4.9e-9 (results/e6/ckpt_check.json). The full competitor run finished at 13:11 (results/e6/competitors_qwen05.json).
- D-046 (Nov 24, 14:05): genotype-variant scans, and the missing loci-per-module variant.
- Plan 14.6 lists loci per module among the sensitivity factors; D-029 did not implement it. genotypes.py already has
--max_loci (default 32, and the cap binds for most modules: 5,181 loci over 168 modules in the k128 variant). Variants
l16 and l64 are added (COPYCOV=1: the primary base covariance).
- Every genotype variant is scanned with slurm/scan_devel.sh (GENO=data/processed/qwen05_<var>) at the primary recipe
threshold (K_func distance 0.9361). It is not re-derived from siblings genotyped under each variant: that would need
the 240 siblings re-genotyped per variant. The descent kernel and families come from raw factors and do not depend on
the variant, so the discovery split is the primary one.
- scan_devel.sh now refuses to run unless <geno>/loci.pt exists (written last by genotypes.py), so a scan queued behind
an unfinished genotype job fails at once instead of reading partial files.
- Reported per variant: lambda_GC and hits by estimator, and overlap of discoveries with the primary scan at the
(trait, module) level, since the loci themselves differ between variants.
- Finding from sens_fam2/sens_fam5 (RESULTS R9): the discovery split is a function of the family partition, so these
scans also re-draw the split; FDR-on-D counts vary several-fold. Full-sample lambda_GC and Bonferroni counts are
reported alongside D-half counts from here on.
- D-047 (Nov 24, 14:08): intervention units are claimed loci first, in a fixed pseudo-random order.
- make_units sorted directions by module name, so units ran in the order 0.*, 1.*, 10.*-19.*, 2.*, 20.*-23.*, 3.*-9.*,
with locus and control units interleaved. The pre-registered interim calibration (at >= 50% of tested loci) would
then rest on the first half of the modules in string order: mostly layers 0, 1 and 10-19.
- New order: reference units, then the 150 tested loci (kind locus with a selection source), then the controls
(150 random, 150 other-layer, 75 high-variance non-associated loci, which also have kind locus but no source); within
each group, sha1 of the id. The order is a function of the ids only, so every worker and job agrees. On the real plan
the first 75 tested loci span layers 0-23.
- Measurement is unchanged. All 525 directions are still run; only the order changes. 30 directions done before the
change (7 tested loci, 6 high-variance controls, 17 other controls; all in layers 0-1) stay valid. The interim
kappa is reported with its module coverage.
- Rough budget (work/iv_progress.py, iv_dev2b logs): about 30 directions per 6 h gpu_devel job so far. A tested
locus is 78 runs (about 40 min on one H200 worker) and a control 22 runs. The interim (75 of 150 tested loci; 68
to go) needs about 45 H200 GPU-hours, about 4 devel jobs on H200s, against about 6 in module order (each tested
locus then brings about 55 runs of controls with it).
- tests/test_intervene_units.py updated for the new order, with a test that the order does not depend on plan order.
- D-048 (Nov 24, 14:24): replicated null traits for the scan's calibration diagnostics (src/analysis/null_reps.py).
- The scan draws one negative control, one iid null and one family-plus-noise null, all with seed 0. A single draw's
lambda_GC is noisy because loci are strongly correlated (M_eff 383 of 5,191). The first draws already show it: the
negative control's naive lambda is 1.56 at seed 0 and 0.84 at seed 1.
- null_reps.py repeats the same construction (same draw order as scan_run.main) for seeds 0-19 on the full population,
with the scan's kernels, left-out blocks and PCs. It reports the distribution of lambda_GC per estimator and checks
that seed 0 reproduces the scan's own values. Parts are resumable (results/scans/qwen05_rt/null_reps.json.parts).
- The table rows for the nulls (paper Table lambda; RESULTS R4) will report the median and 95% range over the 20 draws
in place of the single draw.
- Provenance: the script and its run (agent node, started 14:02, logs/null_reps_ag.log) came from a branch of this
session whose context was lost when the session restarted. Its docstring cited D-045, which by then had been written
for the hardware base; it is renumbered here. The run was launched twice by mistake (two identical srun steps, 1 s
apart). Slurm holds the second step until memory frees (6 GB each on the 8 GB allocation); it will skip the finished
parts.
- D-045 amendment: that branch had also queued ph_sets1 (slurm/pheno_sets.sh) to continue the trained sets. To avoid
duplicating dv_mix3, ph_sets1 now covers all four sets in H6 order (targeted, opposite, TinyLlama-targeted,
siblings), and pheno_sets.sh measures the hardware base (first worker on each GPU, <set>/hwbase/<job>_<gpu>/).
dv_mix3 was removed from the queue before submission (slurm/dv_mix3.sh is kept, marked superseded).
- D-049 (Nov 24, 15:57): forecast fine-tune set gets a cluster bootstrap over conditions (src/analysis/forecast.py).
- The 60 fine-tune cases are 10 conditions x 6 adapters (ranks 8 and 32 x 3 seeds). Adapters of one condition share
the focal trait and much of their side-effect vector, so the case bootstrap fixed in D-021 treats correlated cases as
independent and its intervals are too narrow.
- Added for the fine-tune set, as sensitivity analyses: a cluster bootstrap that resamples conditions (2,000 draws,
separate random stream seed+1, so the primary case-bootstrap intervals are unchanged), the number of conditions in
which G_function has the lower MSE, and per-condition MSEs for every forecaster. The case bootstrap stays the
primary H6 test; the paper reports both.
- Decided after seeing the first case-bootstrap result (15:55); recorded as a post hoc sensitivity analysis.
- D-050 (Nov 25, 01:50): all jobs stopped at the user's request, and code, data and adapters published.
- 2026-11-24 22:30: the user asked to stop all jobs. The lane runners on this login node were killed. A second pair
on another login node submitted geno_wiki and ph_sets1 at 22:31, so both queue files were moved aside
(slurm/devel_queue.txt.paused_20261124_2232, slurm/cpu_queue.txt.paused_20261124_2232); both runners then logged
"queue empty" at 22:33 and exited. scancel -u bjc75 cancelled every job of the account, including the two
interactive agent allocations and other projects' jobs; the job list at the time is in
work/cancelled_jobs_20261124_2230.txt. Restarting means restoring the two queue files and the runners and
resubmitting the agent allocation.
- Code, documents, paper and logs: private GitHub repository bryanc5864/lorapop (commit identity uses the GitHub
no-reply address).
- Data and results: public Hugging Face dataset bryan7264/lorapop. Trained adapters: public model repository
bryan7264/lorapop-adapters (tools/publish_hf.py, slurm/publish_hf.sh).
- Not published:
- the third-party adapters and reduced full fine-tunes (redistribution of other people's weights);
- the HarmBench behaviour list;
- the gradient files;
- any weight-space direction (responsible-conduct section of the plan).
- Tokens are kept outside the repositories; the upload job scans every text file for credentials and the owner's
e-mail address and withholds any file with a hit.