Commit Graph
10 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 Magly e795df746b Merge remote-tracking branch 'upstream/main' into feat/331-pinned-extraction-layer
# Conflicts:
#	README.md
#	docs/CONCEPT_PACKS.md
#	obliteratus/cli.py
#	obliteratus/concepts/cli.py
#	obliteratus/concepts/direction.py
#	obliteratus/concepts/geometry.py
#	obliteratus/concepts/intervention.py
#	obliteratus/concepts/target.py
#	tests/fixtures/refusal_golden.md
2026-10-17 19:08:09 -04:00
Joseph MaglyandClaude Opus 5.5 a4a2eb4961 Merge upstream/main into feat/310-moe-expert-concepts
Resolve the risk-map conflict with #133 by keeping both new contract
surfaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 16:05:27 -04:00
Joseph MaglyandClaude Opus 5.5 6b3acf21bb Merge upstream/main into feat/331-pinned-extraction-layer
Resolve ExtractionRecipe conflicts with #329/#330: keep
collateral_margin and extraction_layer, and keep the entry-point
special_token_policy pop before the extraction_layer pop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:37:59 -04:00
Joseph MaglyandClaude Opus 5.5 8e3d01b37e feat(concepts): per-expert concept targeting for MoE models (#310)
Lift the dense-only restriction for supported OLMoE, Qwen2-MoE and
Qwen3-MoE layouts: routing-aware extraction readout, per-expert
down-projection edits through the fused/ModuleList MoE paths, optional
router orthogonalization, expert gate checks, and routing-drift and
expert-load reports. Unsupported MoE layouts still fail closed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:33 -04:00
Joseph MaglyandClaude Opus 5.5 10e01101fe feat(concepts): pinned extraction layers and grouped CV (#331)
Allow packs and the CLI to pin per-model extraction layers, recorded as
pinned or selected, and add grouped layer CV. The pain pack pins the
paper's layers for Qwen2.5-7B-Instruct, Gemma-2-2B-it and Gemma-2-9B-it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:11 -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 bbb2721f42 fix(concepts): reject MoE concept runs from config before loading weights (#310)
Non-refusal concepts on MoE models were rejected only after the full model
had loaded, so an MoE run allocated every weight before failing.
`load_model` now accepts a config-only `config_validator` that runs before
conversion or weight loading. The pipeline passes its concept architecture
check for non-refusal concepts, and the post-load check remains as a
backstop. Architecture detection also recognises MoE model classes named
only in `architectures`. The error names #310, which tracks per-expert
concept targeting.

Refs #310

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:43:23 -04:00
Joseph MaglyandClaude Opus 5.5 3b0bf33b3d feat(concepts): add generalized extraction recipe and saved directions
Non-refusal concepts now extract directions through a declarative recipe,
implemented as pure tensor functions in obliteratus/concepts/extraction.py
and wired into the pipeline:

- pooled control sets with no pairing or truncation (mean of means);
- control principal-component denoising by variance fraction;
- final-token readout with an optional suffix, or masked mean pooling,
  correct under left and right padding;
- seeded k-fold layer selection on projection AUC (rank-based), using cached
  activations with no extra forward passes;
- an intervention-layer rule (same, norm_ratio, explicit), separate from
  the extraction layer.

ConceptDirection save/load carries the recipe, layer choice, CV scores and
seed in safetensors plus JSON, with no pickle. Explicit n_directions or
direction_method values that conflict with the recipe are rejected. Preset
defaults superseded by the recipe are logged, and invalid recipes fail
before probing.

The refusal path is unchanged: the golden test passes for every CPU preset.
Refusal metadata keeps its historical pooling value, because refusal does
not pool.

Closes #227

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:25:57 -04:00
Joseph MaglyandClaude Opus 5.5 4a8a1e7eac feat(concepts): add ConceptTarget and registry with refusal built in
Introduce obliteratus.concepts: ConceptTarget, ExtractionRecipe,
ConceptDirection (safetensors persistence plus a JSON sidecar; no pickle)
and an offline ConceptRegistry with refusal as the built-in core concept.

AbliterationPipeline gains concept= (a name, or a ConceptTarget, deep-copied)
and concept_registry=. concept=None and concept="refusal" build the refusal
target exactly as before: same prompt pairing, truncation and METHODS
resolution. Internal storage uses neutral concept_directions /
concept_subspaces names, with refusal_* aliases kept for every caller.
Metadata keeps the refusal technique and adds a concept block that records
the seed.

Non-refusal concepts reject refusal-only options (jailbreak contrast,
refusal-head and safety-expert identification, inversion), reject preset
extraction settings that conflict with the concept recipe after resolution,
and are dense-only for now; MoE refusal behaviour is unchanged.

A golden test checks that default and concept="refusal" runs match exactly
(config and direction tensors) for every CPU-runnable METHODS key on the
tiny offline fixture, and that both match a baseline captured from the base
commit (provenance in tests/fixtures/refusal_golden.md).

Refs #224

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