Commit Graph
81 Commits
Author SHA1 Message Date
Pliny the Younger 3873d0b2ba feat: add reversible Neuron Lab to Concept Lab
Add scoped native MLP channel controls, strict versioned recipes, and isolated Neuron Lab sessions with inspection, ordered editing, comparison, cancellation, and immutable exports. Cover arithmetic, lifecycle, real offline model forwards and Gradio callbacks; document the CPU reference boundary.
2026-10-27 16:11:54 -04: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 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 Magly 79b44be065 Merge remote-tracking branch 'upstream/main' into feat/310-moe-expert-concepts
# Conflicts:
#	ci/test-risk-map.json
2026-10-17 18:53:52 -04:00
Joseph Magly a0e07bde37 Merge remote-tracking branch 'upstream/main' into feat/328-raw-steering 2026-10-17 18:11:16 -04:00
Joseph Magly 7dffffa00c Merge remote-tracking branch 'upstream/main' into feat/331-pinned-extraction-layer
# Conflicts:
#	obliteratus/concepts/direction.py
#	tests/test_concept_intervention.py
2026-10-17 17:51:22 -04:00
Joseph Magly 7b772196f0 Merge remote-tracking branch 'upstream/main' into feat/310-moe-expert-concepts
# Conflicts:
#	README.md
#	ci/test-risk-map.json
#	obliteratus/concepts/direction.py
#	obliteratus/concepts/evaluation_model.py
#	obliteratus/concepts/intervention.py
#	obliteratus/concepts/repair_model.py
2026-10-17 17:51:22 -04:00
Joseph Magly 749075f08d Merge remote-tracking branch 'upstream/main' into feat/328-raw-steering
# Conflicts:
#	ci/test-risk-map.json
#	docs/CONCEPT_INTERVENTIONS.md
#	docs/CONCEPT_WORKFLOW.md
#	obliteratus/concepts/intervention.py
2026-10-17 17:48:03 -04:00
Joseph Magly 4b415576fd Merge remote-tracking branch 'upstream/main' into feat/332-exclude-invalid-default 2026-10-17 17:44:19 -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 Magly 41ad16ed08 Merge remote-tracking branch 'upstream/main' into feat/332-exclude-invalid-default 2026-10-17 15:17:37 -04:00
Joseph MaglyandClaude Opus 5.5 05c0857128 Merge upstream/main into feat/328-raw-steering
Resolve ExtractionRecipe conflict with #329: keep collateral_margin and
steering_scale and validate both in __post_init__.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:39:03 -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 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 6e6f97291c Merge upstream/main into feat/329-collateral-margin
Resolve additive README and risk-map conflicts with #330.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:18:40 -04:00
Joseph MaglyandClaude Opus 5.5 74e0e74322 fix: address review findings for #310
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 14:11:42 -04:00
Joseph MaglyandClaude Opus 5.5 e284526632 Merge upstream/main into feat/328-raw-steering
Resolve additive conflicts with #330 in concepts/target.py and the
risk map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:59:23 -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 d1504faf88 feat(concepts): rank-k subspace and affine (LEACE / mean-centred) erasure (#335)
Remove whole per-layer subspaces in project, orthogonalize and lora
modes; add mean-centred orthogonal and LEACE erasure at inference time
and, where a native bias exists, as a permanent edit with recorded
reference provenance. k=1 zero-origin paths are unchanged. Adds the
Pain Axis Appendix D script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:11 -04:00
Joseph MaglyandClaude Opus 5.5 a831d72b7c feat(eval): exclude invalid completions from refusal rates by default (#332)
Default exclude_invalid to True for refusal metrics, verification and the
optimizer objective, with a one-release warning for implicit legacy use,
invalid counts in metadata and reports, and a changelog note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:11 -04:00
Joseph MaglyandClaude Opus 5.5 2eb8a1d16d feat(concepts): record and check entry-point special-token policy (#330)
Add an optional BOS policy to pack entry points (schema 1.2), warn or
fail on EOS-as-BOS and policy mismatches, and persist resolved special
tokens through extraction, run and export provenance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:10 -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 83ac05aead feat(concepts): fixed-magnitude steering scale modes (#328)
Add scale=residual_norm|raw|vector to concept steering across the API,
CLI, recipes and run metadata, recording effective vector norms. The
default residual-norm path is unchanged. The Pain Axis resteer stage now
uses the concept API with identical arithmetic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 13:07:10 -04:00
Joseph MaglyandClaude Opus 5.5 a6bfc7ad9e Merge upstream/main into feat/300-pinned-layers
Resolve RemoteRunner._build_command conflict with #297: keep
max_seq_length (already released on main) before layers so positional
callers stay compatible.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 20:50:16 -04:00
Joseph Magly 1986878d30 Merge pull request #297 from rattusrattus/fix/296-max-seq-length-provenance
fix(cli): expose --max-seq-length and record probe sizing in metadata (#296)
2026-10-16 20:49:32 -04:00
Joseph Magly 5acb6e55f6 Merge pull request #299 from rattusrattus/feat/298-checkpoint-provenance
feat(provenance): record tool and source-model revision in checkpoint metadata (#298)
2026-10-16 20:49:13 -04:00
Joseph Magly 125fa3576b Merge pull request #295 from shitcoinsherpa/feat/qwen35-finetune-support
feat(loader): support Qwen3.5 architecture and structural-only contract validation
2026-10-16 20:48:55 -04:00
Joseph MaglyandClaude Opus 5.5 19751022cd fix: record collection sizing only for completed collections
Record activation-collection sizing after a collection finishes, keep
RemoteRunner positional compatibility, clarify --max-seq-length help,
and extend validation, fallback and remote parity tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:49:20 -04:00
Joseph MaglyandClaude Opus 5.5 6e90332208 fix(provenance): harden git parsing and keep resolved source revision
Bound git file reads, validate symlinks and ref names, isolate the git
environment, never fail a run on provenance errors, and preserve the
resolved source commit through local snapshots and dequantization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:49:20 -04:00
Joseph MaglyandClaude Opus 5.5 a93d2df9d9 fix(qwen35): pin topology structurally and keep text-only routing
Without the model-id allowlist, require a dense qwen3_5_text backbone,
reject MoE modules, biased writers and residual writers outside the
manifest. Keep explicit text-only qwen3_5 exports on the causal-LM
loader, fix the loading log, and document topology-based support.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:49:20 -04:00
Joseph MaglyandClaude Opus 5.5 b87cebd42f fix: validate concept-neutral steering directions
Validate from_direction() inputs (real, finite, nonzero, 1-D), keep
from_refusal_direction() numerics unchanged, document the API and add
edge-case coverage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:49:20 -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 Magly 7eb61a10d1 Merge remote-tracking branch 'upstream/main' into pr-297 2026-10-16 14:40:26 -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 d664199cc7 Fold post-sublayer norms in pipeline excise
AbliterationPipeline now folds Gemma 2/3 and OLMo 2 post-attention and
post-feedforward RMSNorm scales into residual-writer projections across
excise, Bayesian, SAE, LoRA-ablation and repair paths, sharing the
recognition rules with the concept API. fold_post_norms=False
(--no-fold-post-norms) reproduces the previous numerics and is recorded in
run metadata. Combinations that cannot be folded fail explicitly.

Fixes #320

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 22:42:35 -04:00
rattusrattusandClaude Opus 5.5 18d138babf fix(provenance): record activation sizing per collection, not only the last call
Sizing is resolved on every _collect_activations call, and certification
re-sizes after surgery, so the single record could describe cert_harmless
instead of the probe. method_config.activation_collection is now keyed by
collection label (harmful, harmless, jailbreak, cert_harmful, ...), which
also exposes harmful and harmless being truncated to different lengths.
Drops the redundant requested_max_seq_length (method_config.max_seq_length
already records it) and tidies the README example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 00:36:50 -06:00
rattusrattusandClaude Opus 5.5 4e2dc9ff72 fix(cli): expose --max-seq-length and record probe sizing in metadata (#296)
The free-memory heuristic in _activation_collection_limits shortens probe
sequences (256 -> 128/64) and lowers the batch size. The Python API's
max_seq_length already prevents the length reduction, but the CLI had no
flag for it, and the checkpoint recorded neither the requested nor the
effective sizing.

- obliterate/abliterate: --max-seq-length (positive int), passed through.
- AbliterationPipeline validates max_seq_length as a positive integer.
- method_config records max_seq_length and activation_collection: the
  batch size and max length actually used, the requested value, and the
  memory-heuristic reduction message when one applied.

Closes #296.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 22:43:48 -06:00
Joseph MaglyandClaude Opus 5.5 4eb1a4cd4b fix(distributed): refuse live two-host stages that need shared storage
The archived topology commits predate the merged EXCISE, VERIFY and
EXPORT stages. A cross-stage audit for the one-GPU-per-host layout found:
- Live preflight and LOADED evidence use attempt storage shared by the
  ranks (rank-0 directory, nonce file, file receipts). They now refuse the
  two-host GPU layout after configuration consensus and before any
  staging access (LMS_TOPOLOGY_UNSUPPORTED; the model session reports
  LMS_TP_PLAN_UNSUPPORTED).
- Canonical EXPORT assumes one shared destination tree across writer
  ranks. It now refuses the layout with a voted
  LMS_EXPORT_TOPOLOGY_UNSUPPORTED before any resource or filesystem work.
- PROBE admitted host memory only on rank 0. Each rank now admits its own
  working set through the existing unanimous vote.
- The evidence checker reconstructs each attempt's topology from
  fixed-size redacted records. EXPORT's attempt hash binds the VERIFY
  binding set, and part 5's per-attempt hardware and mount checks are kept.
EXCISE, rank journals, VERIFY and the launcher are code-level compatible
and are covered by new mocked tests. Docs describe the refusals.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:51:24 -04:00
Joseph MaglyandClaude Opus 5.5 0492ebaa35 feat(distributed): admit closed two-host TP2 topology
(cherry picked from commit 37f407850916ebe76575d73112c4d26fe08bf421)

Ported for #244 (part 6/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc and test conflicts keep upstream wording and add only the topology
references; internal tracker numbers were replaced with upstream framing.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 18:22:31 -04:00
Joseph MaglyandClaude Opus 5.5 4c6a5c46f6 feat(distributed): add bounded distributed canonical export
(cherry picked from commit de990f633e151f329ef5e844ed55f60a9a0b247c)

Ported for #244 (part 5/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc and policy conflicts keep upstream wording and add only the export
references. The new Gloo test file carries the gloo marker and a
duration entry. Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:28:40 -04:00
Joseph MaglyandClaude Opus 5.5 2ef2a76792 feat(distributed): verify collective edits fail closed
(cherry picked from commit 2fbc38cd512f1130b4931ba5a7ffaf2e666d3008)

Ported for #244 (part 4/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc conflicts keep upstream wording and add only the VERIFY references.
The new Gloo test file carries the gloo marker and a duration entry.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:53:55 -04:00
Joseph MaglyandClaude Opus 5.5 8066e59c73 feat(distributed): add exact Llama native TP loader
(cherry picked from commit 4caf45b04a8faa55f191b22c069f58714236689b)

Ported for #244 (part 1/6). Internal-only content from the archived
commit was dropped: .aiwg records, internal runner-policy routing, and the
internal security-docs test. Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 11:23:27 -04:00
Joseph MaglyandClaude Opus 5.5 d531158d30 docs(concepts): add concept workflow and interpretation guide
docs/CONCEPT_WORKFLOW.md walks a concept from definition to export
(define, extract, validate, intervene, evaluate, repair, compare/export),
with offline CLI examples. Its interpretation guide covers what
validation, ablation and steering do and do not show: behavioural nulls
as first-class results, hidden KV-cache channels, steering fragility, and
why "direction removed" is not "experience removed". A responsible-use
section covers user-defined concepts.

Every literature claim is cited by arXiv id or DOI. The existing concept
docs link to the guide, and the README gains a short "Concept vectors
beyond refusal" section. A test runs the outcome-language lint over the
concept docs, resolves local links and anchors, checks that every
documented `obliteratus` command parses, and checks the required
citations.

Closes #235

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 23:50:49 -04:00
Brian 73601bb13d packaging: stop exact-pinning build backends
Exact setuptools/wheel pins block platform-specific backend patches and
make isolated pip installs fail on Android/Termux Python. Keep a setuptools
lower bound only, drop the unused wheel backend pin, keep requirements.txt
aligned with core package deps, and install the Spaces extra in Docker
instead of pulling bitsandbytes by default.

Android/Termux is still not a supported runtime; the new platform note
documents host wheels, ANDROID_API_LEVEL, and --no-build-isolation so
pip does not isolate a second setuptools or compile manylinux-only
extensions.
2026-09-20 06:25:34 -07:00
Joseph Magly 707e762904 fix(packaging): install and validate the Bayesian optimizer by default 2026-09-07 16:23:48 -04:00
Joseph Magly 985c9e9363 feat: add safe distributed checkpoint intake and preflight 2026-09-04 19:43:53 -04:00
Joseph Magly 131a4a8b55 docs: align fused offload claims with test contract 2026-09-02 14:32:29 -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 1f428f60cf fix: make KL optimization measured and reversible (#182) 2026-08-28 23:11:26 -04:00