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>
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>
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>
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>
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>
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>
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>
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>
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>
(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.
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>