issue-621: rank-1 LoRA read/write vector implants#456
Draft
superkaiba wants to merge 9 commits into
Draft
Conversation
…2 deltas - experiments/issue_621 pkg: r=1/α=8, PLACEMENT_ARMS (read/write/bridge), band [5,12], cap 16, UNIFIED_NEGATIVE_PANEL with realized-disjointness hard assert, EXPECTED_SHA256 pins (21 R_persona + union pool) - sft.py: opt-in TrainLoraConfig.save_initial_adapter (step-0 A-init snapshot) - train driver: unified smoke=sweep, A-init verify, shard support, trajectory - eval driver: per-question deltas, raw_completions persistence, gauge+rank asserts - preflight: pinned-input sha gate + composition gate (mix byte-gate repointed per §14) - bank extractor: 3 positions × 5 taps incl. o_proj/down_proj pre-hooks - smoke gate (parity ±1 nat + full-cap wall re-projection), uploads, card sentinel - analyzer (§4.5 + §14 duties) + figures
…moke driver - persona_registry: git-tracked provenance bank candidates (data/ is gitignored; fresh GCP clones have no data/issue_472) + issue-owned copy - eval driver: save shift .pt as torch tensor (raw numpy is rejected by the analyzer's weights_only=True load — caught by the CPU smoke) - shift_extract: dims from model config (tiny-model CPU smoke capable; 7B still asserted at 3584) - sentinel writer: --skip-hub-verify smoke flag - i621_cpu_smoke.py: checked-in CPU smoke driver (tiny 26-layer Qwen2 + real tokenizer; a-init callback, shift_extract, bank capture w/ o/down pre-hooks, analyze + figures via the production CLIs)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…de slot stats, atomic mix write, duty-4 full panel Four round-forcing concerns (reconciler Must-Fix union): - analysis-fetch-missing-shifts: fetch-artifacts now pulls shift json/pt, emission JSONs + train meta (new uploader classes 5/6) into the local layout `run` requires; complete-listing API throughout; CPU smoke gains a stub-hub fetch phase that re-runs analyze on the FETCHED layout. - duty12-split-half-inputs-missing: shift_extract persists the four-float contract (+margin) PER QUESTION PER SIDE in the shift JSON. - mix-write-race-cross-shard: write_rows_jsonl tmp+os.replace atomic. - duty4-h1-null-excludes-2-of-4: H1 null sensitivity excludes the full UNIFIED_NEGATIVE_PANEL. Opportunistic minors: sentinel uses list_repo_files_complete + re-uploads missing adapters from local cells before aborting; n_eval_jsons split into shift/emission counts; eval gauge assert unfenced; analyze run asserts full 30-cell coverage (--allow-partial escape); band-stop recorder 0.0 falsy nit. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…12 split-half/paired-diff, bank verifier complete listing - issue621_analyze.py: duty-10 a(t) rotation trajectory over the 10-step checkpoint ladder (per-cell a_trajectory__<slug>.json + summary table, unflipped loads, terminal-point dedup, still-growing-at-stop rule); duty-12(a) split-half base check from per-question per-side slot stats (both split directions, firing race partner) + duty-12(b) paired firing-vs-comparator rho diffs clustered on source (sign test + t-CI); fetch-artifacts logs checkpoint-ladder coverage. - i621_cpu_smoke.py: synthetic 3-step ladders per cell (one cell exercises the terminal-point dedup); asserts duty-10/12 outputs on both the direct and the fetched (stub-hub) layouts; stub-hub copy mirrors the recursive adapter upload (ladder included). - issue621_extract_context_bank.py: upload verifier uses list_repo_files_complete (concern context-bank-upload-verify-truncation). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…auge The W_U sign fix mutated (a,b) before _a_init_reads and the a_init-firing comparator, so write-arm slots with W_U[marker]·b < 0 compared a flipped a_t against the unflipped a_init (rel_delta_a ≈ 2, sign-inverted cos(Δâ, v̂_c)). Snapshot the unflipped pairs before the flip, route every a_init-referenced read through them, and record a_init_gauge: unflipped-pair in meta + per cell. New smoke_a_init_gauge drives analyze_cell on a controlled all-flipped write cell (frozen-A rel == 0, eps-rotated cos(Δâ, v̂_src) ≈ +1). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ry.json, not on_log MarkerBandStopCallback emits its band metrics via direct wandb.log(), which never flows through the trainer log pipeline, so the recorder's TrainerCallback.on_log subscription read nothing and unconditionally classified a FALSE band miss (cap-16 AND cap-32 smokes both stopped IN BAND per WandB: 5.08 / 5.36 nat). The recorder now only captures state.global_step + state.max_steps at on_train_end; the band outcome is derived post-train from the callback's authoritative band_trajectory.json (fired = stopped-early AND final >= band_low; in-band classification stays in _smoke_summarize so an overshoot still reads not-in-band). marker_band_stop_result.json keeps its schema (+ source/planned_max_steps provenance). New CPU-smoke phase smoke_band_stop_derivation covers in-band stop / overshoot / full-cap miss on synthetic trajectories. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…, fix '1°' to ~9°) + h5 (plain-English labels) Both round-1 critics flagged h2_a_init_check panel (b) for the 30/30 overclaim (actual 23/30 below 0.15) and the 'within 1°' angle claim (cos=0.988 → θ≈8.9°, not 1°). Codex also flagged h5_cross_seed.png for code-style y-axis labels (write__police_officer). This regenerates both figures from the cached analysis JSONs at .claude/cache/issue621_analysis/out/.
superkaiba
added a commit
that referenced
this pull request
Jun 16, 2026
…ment Always report BOTH a judge-scored on-policy rate (primary behavioral construct) AND a continuous completion-probability DV (secondary, non-saturating companion) for content-behavior leakage/implantation evals — the binary rate censors install/dose-matched comparisons at ceilings (#608), the probability DV keeps dynamic range but needs validation against the rate (Spearman) to avoid the teacher-forcing trap (#432->#456). Mirrors the marker three-space recipe, judge-primary. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
superkaiba
added a commit
that referenced
this pull request
Jul 1, 2026
…ed fixed +/- margin (preferred); logp_pos_mean is selection-confounded opt-in Per #722: the teacher-forced fixed positive-vs-negative completion margin (FIXED answer pools across all contexts => no selection-on-outcome bias) PASSES the rho(DV, rate) > 0 validation gate (refusal +0.56, sycophancy +0.40, broad_em +0.31; all-positive). The judged-positive-conditional-mean log-P (logp_pos_mean) is a conditional mean over an outcome-selected subset (selection bias) and FAILS the validation for 3 of 4 behaviors (rho ~= -0.3). Flip the PREFERRED/OPT-IN polarity in CLAUDE.md § Measurement validity + 5 enforcer agent files; add the recipe + failure-mode subsection to .claude/rules/llm-judging.md; add a pure additive cross-reference note to .claude/rules/marker-leakage-measurement.md (the marker three-space recipe is NOT touched). Invariants preserved: on-policy rate PRIMARY, rho(DV, rate) > 0 validation gate verbatim, #432->#456 teacher-forcing caution, graded-score-primary ranking/regression extension, marker three-space recipe. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes task #621.