Commit Graph
21 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 abae042774 feat(analysis): architecture adapters, MoE coverage and transfer dossiers
Add F21: architecture adapters that record tensor semantics and staged
support levels, MoE observation with explicit coverage, and transfer
dossiers compared against within-model baselines.

- Adapters record site meaning, block order, norm placement and module
  roles (attention, MLP, router, routed and shared experts) and check
  residual semantics on a real forward. Support is staged:
  observation, then reversible intervention, then persistent editing.
  Dense decoders support all three; sparse MoE decoders support
  observation and residual intervention and refuse persistent editing.
- MoE observation reports per-expert routed tokens and rows with
  intervals; experts below the coverage floor are insufficient coverage
  with null effects, never no effect. Route and load changes, shared
  expert contributions and routing restoration are measured.
- Transfer needs its own alignment-fit and test rows (refused on
  overlap), the same row budget for a direction fitted directly on the
  target, and must beat that baseline and random directions with
  bootstrap intervals. Tested and untested conditions are listed;
  experts listed as tested must be covered on the test rows; new
  modalities need their own targets and scoring tasks.
- `obliteratus experiments transfer run` and `arch-profile`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:31:08 -05:00
Joseph MaglyandClaude Opus 5.5 ae9d774609 feat(concepts): require pack schema 2.0 for dataset declarations
Releases that read only 1.x manifests ignore the dataset declaration and
each row's role, so they extract from select, calibrate and locked test
rows. Gating dataset packs on a new major version makes those releases
reject the pack ("Unsupported schema_version") instead.

- Accept schema majors 1 and 2; 2.x keeps every 1.x field.
- manifest.dataset now requires schema_version 2.0+ (was 1.3+, never
  released). 1.x packs without a dataset are unchanged.
- Compare versions as (major, minor) tuples. The selector gate in
  pack.py compared only the minor number and would have rejected 2.0.
- Unknown-major tests now use 3.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 20:46:10 -05:00
Joseph Magly acae9d3a01 feat(concepts): version datasets and isolate independent partitions 2026-11-04 21:59:43 -05:00
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 63b24bfa3e fix: reconcile merged Pain Axis scripts with both test suites (#364)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 15:15:47 -04:00
Joseph MaglyandClaude Opus 5.5 97d042c71c feat(gpu): 72B capacity planner and bounded export for split runs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 20:17:47 -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 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 a4c097bc5f fix: keep pinned layers through informed and concept paths
Preserve layer pins through informed selection and refinement, validate
pins against model depth, honour pins in concept extraction, record
pinning honestly in metadata, plumb --layers through self-improve and
remote runs, and keep positional API compatibility.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:49:20 -04:00
Joseph MaglyandClaude Opus 5.5 7fa2ae87e8 Forward fold_post_norms to remote runs and record it in golden metadata
Remote obliterate commands accept the folding opt-out, folded repair
candidates are validated after storage-dtype conversion, the refusal golden
fixtures record the new provenance key (numeric values unchanged), and the
risk map registers the shared post-norm module.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 23:22:29 -04:00
Joseph MaglyandClaude Opus 5.5 86982b8a5e fix(concepts): harden the pain pack and record GPU baselines
Review follow-ups for the pain pack:

- The no-upstream-sentence guarantee now runs in CI without the pinned
  checkout. A committed fingerprint fixture (SHA-256 only) covers
  pain-specific upstream sentences of at least eight words: positives,
  confounds/neighbours and the referenced batteries, but not generic neutral
  controls. A repository-wide scan checks every tracked text file against it.
  Manifest hashes are checked against the committed hash manifest of the
  pinned commit.
- The pain pack loads lazily, so a broken pain pack warns and is excluded
  while refusal and other packs stay usable.
- Selectors type-check their fields and fail closed with PackError.
- concepts baseline gains --cache-dir.

The GPU-lane baselines (RTX 4090, bf16, seed 232) are recorded under
.aiwg/testing/baselines/pain/ and summarised in the dataset card:

- Qwen2.5-7B-Instruct: CV layer 24, held-out AUC 0.980, cosine 0.9998 to
  the authors' S2 vector at L24;
- Qwen3-8B-Base: CV layer 34, held-out AUC 0.994, cosine 0.9001 at L34.

Both verdicts are warn, because each upstream control set has 20 prompts.
These are representational baselines only, with no behavioural claim.

Closes #232

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 22:42:46 -04:00
Joseph Magly a8460b5f54 Merge remote-tracking branch 'upstream/main' into feat/225-concept-pack
# Conflicts:
#	ci/test-risk-map.json
2026-10-05 19:15:11 -04:00
Joseph MaglyandClaude Opus 5.5 88e8ceeb57 feat(concepts): add Concept Pack format v1 with pinned remote references
Concept Packs are data-only directories or byte-deterministic .cvpack zips:
manifest.yaml, positive.jsonl, controls/*.jsonl, and optional neighbours,
battery, baseline and reference files, plus a dataset card. Every file
carries a SHA-256 and an SPDX licence. A packaged JSON Schema and built-in
validation gate the schema_version major. Tiers: core (refusal only),
research, and user (namespaced user/<id>).

Loading treats packs as untrusted. It rejects hash mismatches, missing
licences, executable content, symlinks, hardlinks, special files, nested
archives, path traversal, duplicate and colliding names, unsafe YAML,
control characters in decoded text, oversized members and unknown major
versions.

A data file may instead be a pinned remote reference (https repository,
40-hex commit, path, sha256). It is fetched only by an explicit fetch step,
cached atomically and verified, and a mismatch fails closed; lint works
before fetch. URL import requires --sha256, and installs are exclusive.

The built-in refusal pack is generated from the built-in harmful and
harmless sets and equals the #224 refusal target. New CLI group: concepts
list | show | init | lint | pack | import | fetch. Ids resolve before paths,
and corrupt cache entries are skipped with a warning. DatasetSource gains an
optional licence field. No new runtime dependencies.

Closes #225

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 19:14:54 -04:00
Joseph Magly 62e54f2c3e Merge remote-tracking branch 'upstream/main' into feat/224-concept-registry
# Conflicts:
#	ci/test-risk-map.json
#	obliteratus/abliterate.py
2026-10-05 18:45:06 -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
Joseph Magly 2fef041be6 fix: resolve composite Qwen text layers for qualification
(cherry picked from commit 0106e6ca601399048b0232b64bb15015bb92db4f)

Adapted for upstream: dropped docs/qualification/pristine-qwen-95/README.md and docs/qualification/pristine-qwen-95/inference-reconciliation.json (internal qualification README/receipts; the README conflicts with upstream where docs/qualification/ does not exist). Kept the qwen3_5 text-layer fallback in obliteratus/strategies/utils.py, the tests/fixtures/qwen38/config.json fixture (verified: no hostnames, paths, or URLs), and the regression test.
2026-10-05 18:08:18 -04:00
Joseph Magly 985c9e9363 feat: add safe distributed checkpoint intake and preflight 2026-09-04 19:43:53 -04:00
Pliny the YoungerandClaude Fable 5.1 89b63ce216 feat(abliteration): update offloaded fused MoE expert tensors in place (#115)
transformers 5 stores routed experts as fused 3D parameters
(experts.gate_up_proj / experts.down_proj) for Mixtral, Qwen3-MoE,
DeepSeek-V3, GLM-4 MoE, Llama 4, gpt-oss and OLMoE. When such a layer is
CPU- or disk-offloaded by Accelerate, EXCISE failed closed with
"offloaded fused expert tensors are not yet a supported surgery layout",
so every frontier MoE checkpoint large enough to need offload could not be
abliterated at all.

Route the three fused projections and the fused bias projection through the
existing LogicalParameterTransaction adapter: a meta-resident fused
parameter is resolved to a private copy of its authoritative backing value,
projected per expert, and committed atomically; the live parameter stays on
meta and quantized or unknown backing layouts still fail before mutation.
Thread offload_roots through the MoE dispatch call sites so parent-prefixed
Accelerate hooks resolve, and drop the preflight rejection of 3D meta
parameters (validate_offloaded_parameters already resolves them).

Tests: fused 3D, bias, granular and selective-inversion projections on
offloaded backing stores, bounded norm restoration, parent-prefixed hook
resolution, quantized fail-closed, commit-failure rollback, and a full
offline pipeline run on a disk-offloaded tiny Mixtral fixture that verifies
the saved checkpoint carries the updated experts with no meta tensors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 11:54:14 -04:00
Joseph Magly b25b3f3b66 fix: harden quantized checkpoint integration 2026-08-16 12:57:17 -04:00
Joseph Magly 8bbb5f2926 test: add offline integration baseline 2026-08-14 13:15:32 -04:00