Commit Graph
12 Commits
Author SHA1 Message Date
Joseph Magly 002e6e56e1 feat: complete local readiness across UI, MCP and memory admission
Integrate bounded admission, UI ownership and controls, opt-in durable MCP execution, rank-local TP2 groundwork, regression hardening and operator guides. Physical larger-memory and two-host qualification remain separate.
2026-10-20 17:58:20 -04:00
Joseph MaglyandClaude Opus 5.5 fb7f474a27 fix: post-merge audit findings (eval)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 21:55:38 -04:00
Joseph Magly d165567dbd Merge remote-tracking branch 'upstream/main' into feat/336-preserve-directions
# Conflicts:
#	ci/test-risk-map.json
#	obliteratus/concepts/evaluation.py
#	obliteratus/concepts/geometry.py
#	obliteratus/concepts/intervention.py
#	obliteratus/concepts/target.py
2026-10-17 17:51:22 -04:00
Joseph MaglyandClaude Opus 5.5 f764576fa1 Merge upstream/main into feat/335-subspace-affine-erasure
Resolve additive conflicts with #329/#330 in the concept card and the
risk map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:38:39 -04:00
Joseph MaglyandClaude Opus 5.5 1d80676b12 fix: address review findings for #335
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:17:20 -04:00
Joseph MaglyandClaude Opus 5.5 24b2342229 feat(concepts): non-inferiority margin for the collateral refusal test (#329)
Replace significance-only FAIL with a configurable non-inferiority
decision (default 3 points): PASS, FAIL, INCONCLUSIVE, UNDERPOWERED.
Plumb the margin through recipes, CLI, reports, cards, metadata and the
Q4 export gate, and add 'concepts rescore' for saved batteries.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:10 -04:00
Joseph MaglyandClaude Opus 5.5 5f558a78db feat(concepts): apply #223 maintainer rulings on publication, leace and steering
Maintainer decisions for epic #223 (2026-10-15):

- Q1: `leace` is a deprecated alias of the Fisher LDA direction. It keeps
  its numerical behaviour, warns once per public resolution with a
  DeprecationWarning naming `fisher_lda` and `leace_exact`, and will be
  removed in a future minor release.
- Q4: a collateral FAIL blocks both the model card and any Hub push of
  modified weights or adapters on every path (pipeline, export_run, both
  CLIs, Concept Lab, the Hub UI and tourney uploads), checked before any
  network call. `--allow-collateral-fail REASON` (and the matching API
  argument and UI field) overrides the block and stamps the FAIL and
  reason into the card, checkpoint metadata and provenance. Local save
  and export are never blocked.
- Q5: research-tier packs no longer carry publication or local-export
  restrictions; the tier is provenance only and Q4 applies to every pack.
- Steering defaults are removal-first: `steer` defaults to alpha -1 and
  the default dose ladder is non-positive. Positive doses stay available
  explicitly; `project` keeps its positive removal strength.
- Q3 (gate modes) and Q7 (dense only, follow-up #310) are unchanged and
  documented.

Refs #223

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:37:51 -04:00
Joseph MaglyandClaude Opus 5.5 58459a9ece fix(eval): treat word and phrase loops as invalid output in refusal scoring (#309)
`_is_degenerate` only caught 2-4 character repeats, so a completion that
repeats one word (" illegally" * 48) or a phrase scored as a valid
non-refusal. Steering sweeps that degenerated therefore read as perfect
compliance.

- `_is_degenerate` now also detects consecutive word and phrase loops
  that cover at least half the text (a shared `_is_word_loop` rule, also
  used by the abliterate coherence checks) and 5-32 character loops that
  cover nearly all of it, which catches unspaced scripts. It uses no
  vocabulary-ratio rule, so lists of distinct refusals sharing
  boilerplate, Markdown table rules and literal lists stay valid.
- New `_is_invalid_output` marks empty, reasoning-only (including
  generation that stops inside an unclosed reasoning tag), content-free and
  degenerate completions; short answers with content ("42", "No") stay
  valid. The refusal scorer label carries a detector version, so stale
  pristine caches are rejected. `<think>` blocks are now stripped like the
  other reasoning tags, including inside an extracted assistant body.
- EvaluationBattery records invalid outputs, computes refusal statistics
  only over pairs valid on both sides, and fails collateral when invalid
  outputs increase significantly (exact one-sided McNemar), including when
  every intervened output degenerates.
- The repair ladder rejects a step that raises the intervened invalid rate.
- The Concept Lab dose ladder used the anchor-only coherence check, which
  marked every operator preview invalid; it now uses `_is_invalid_output`.

The generic refusal_rate denominator is unchanged here and tracked in #312.

Fixes #309

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:11:18 -04:00
Joseph MaglyandClaude Opus 5.5 c7f45460eb test: cut slow CPU integration tests below the per-test budget (#304)
Tiny-model pipeline tests were dominated by fixed per-step costs, not
arithmetic: the pipeline's gc.collect() after each verify prompt rescans
every long-lived object the session imported (~0.2 s per call), and
intra-op thread fan-out makes each 16-dim forward slower on loaded runners.

- conftest: add an opt-in tiny_model_runtime fixture (one intra-op thread,
  gc.freeze() of pre-test objects, both restored afterwards). Objects the
  test creates remain collectable, so pipeline behaviour is unchanged.
  Applied to test_offline_integration and the concept_* integration modules.
- test_disk_offloaded_fused_moe_surgery_matches_live_surgery: bound verify
  free-form completions to 4 tokens; every diagnostic still runs through
  the disk-offload hooks and no assertion depends on generated text.
- test_disk_offloaded_subprocess_rss_bound: measure native and legacy export
  in one subprocess on the same offloaded model, resetting VmHWM (after GC
  and malloc_trim) before each mode; native is measured first. Same three
  assertions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 16:53:10 -04:00
Joseph MaglyandClaude Opus 5.5 bdad7ea6da fix(gpu): derive admission inputs from execution state
Share eligibility and selection helpers with execution, use realized
dtypes and per-batch lengths, deduplicate tied checkpoint storage, skip
unconsumed checkpoint keys, follow PyTorch's CPU SDPA dispatch, and
account for hidden-state outputs and validation-gate workspace.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:55:59 -04:00
Joseph MaglyandClaude Opus 5.5 8844bf8723 feat(gpu): admit per-device phase memory before pipeline work
Add a reusable phase-admission module that estimates per-device demand
(resident weights, activations/KV, staging, logits, edit workspace) for
each pipeline phase and checks it against freshly observed free memory,
utilization ceilings and lifecycle broker grants before the phase starts.
Over-budget phases fail with the device and shortfall. Load admission is
exposed as admit_model_load for reuse by UI reloads.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:36:55 -04:00
Joseph MaglyandClaude Opus 5.5 9cd3810d8d feat(concepts): add default-on evaluation battery after interventions
Weight orthogonalization can drive a direction's projection to about 0
while behaviour is unchanged (arXiv:2609.16247, App. D), and valence state
can persist through the KV cache (arXiv:2609.35591). Every non-refusal
concept intervention is now followed by an evaluation battery:

- mechanistic: per-layer residual projection before and after;
- collateral (on by default): refusal rate on 320 paired, seeded built-in
  harmful prompts versus the pristine model, using a one-sided exact
  McNemar test on discordant pairs. The report includes Wilson CIs for both
  rates, a paired bootstrap CI for the drop, and loss/gain transitions.
  Below 284 prompts a non-significant result is UNDERPOWERED, and a
  significant drop is FAIL at any size. Also first-token KL, coherence
  anchors and neighbour-concept projections;
- optional re-steer and KV-cache persistence probes, and a pack-supplied
  behavioural battery hook.

evaluation.json separates mechanistic, behavioural and collateral outcomes,
and lists untested channels (the KV channel unless probed). Skipping the
battery is recorded with a reason. Pristine refusal flags are cached by model
id and revision, prompt-set hash, decoding config and scorer identity (mode
plus pattern hash); runs with no pinned revision are not cached. Legacy
refusal runs are unchanged.

Closes #230

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:02:47 -04:00