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>
Add preserve= to concept interventions so the removed span is first
orthogonalised against protected directions (e.g. refusal), with
overlap metadata and export replay; a protected_direction repair step
gated on the collateral battery; CLI/recipe support including
--preserve refusal; and a D4 arm in the Appendix D script. Paths
without preserve are unchanged.
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>
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>
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>
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>
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>
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>
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>
Renew the five CUDA, bitsandbytes, MPS, MLX and remote-execution
waivers from 2026-10-17 for the 30-day maximum before the current
waivers lapse on 2026-10-20. Reasons and blocked claims are unchanged;
no gate, coverage or freshness rule is relaxed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finiteness checks use scalar reductions, and large embeddings and residual
writers are projected in bounded row chunks with CPU staging, so a faithful
edit including the embedding fits next to a model that nearly fills the
device. Coordinate-direction edits stay bit-exact; general chunked kernels
can differ by compute-dtype rounding.
Fixes#325
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>
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>
Concept orthogonalize/lora now remove the direction from what Gemma 2/3 and
OLMo 2 sandwich-norm layers write to the residual by folding the post-norm
scale into the projection, and fail closed on unrecognized post-norm layouts.
project_embeddings adds the input embedding edit, with an explicit
tied_embeddings choice (edit_both or untie) for tied models.
Fixes#318
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Concept Pack can now declare how to locate and activate its latent
representation, as schema v1.1 (v1 packs and refusal are unchanged):
- `entry_point.messages`: a system message and prior turns wrapping each
prompt, rendered with the chat template (plain-text fallback recorded).
- `entry_point.prefill`: assistant prefill so readout can happen at an
assistant position.
- `entry_point.readout`: final_token, mean_pool, span:<name> (a marked
span in the template) or last_k:<k>.
- `entry_point.template`: `{variable}` rendering over prompt record fields.
- `entry_point.group_by`: grouped CV folds and held-out validation, so
related samples never straddle folds.
Record annotations (person, split, group) now survive pack loading and
selectors. Unknown recipe and entry-point keys are rejected instead of
silently ignored. The entry point is part of activation identity, direction
metadata and provenance, so changing it invalidates cached activations and
saved directions. Generated-state readout is documented as not yet
supported.
Fixes#311
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`refusal_rate` and its callers counted empty, reasoning-only and degenerate
completions as non-refusals, so the Bayesian optimizer objective and
tourney and benchmark rankings could reward an edit that destroyed output.
- New `measure_refusals` returns a `RefusalMeasurement` (refused, valid,
invalid, total, rate over valid completions, invalid rate).
- `refusal_rate`, `refusal_rate_with_ci` and `heretic_eval.arditi_refusal_rate`
gain `exclude_invalid`. The default keeps the legacy all-response
denominator for a deprecation window; `refusal_rate_with_ci` adds
valid, invalid and total counts.
- Verification metadata adds invalid counts, the valid-only rate and a
refusal objective that counts invalid completions as refusals.
- The Bayesian optimizer, tourney and benchmark rankings use that objective
and record invalid rates; displayed refusal rates are unchanged.
- docs/refusal-metrics.md documents the denominators and the planned
default change.
Fixes#312
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Excluding the qwen-hybrid extra would have dropped causal-conv1d,
flash-linear-attention and fla-core from the release license inventory
without any failure. Instead, install causal-conv1d without CUDA kernels via
its own CAUSAL_CONV1D_SKIP_CUDA_BUILD switch in the operator-UI gate and the
supply-chain job.
The full inventory then needs two permissive SPDX expressions (MIT-0 for
cffi, Apache-2.0 OR BSD-3-Clause for cryptography, both via the mcp extra)
and a strict mechanism for packages whose metadata carries verbatim license
text: a text override binds one package version and the SHA-256 of the
exact text to an already allowed expression, and fails when unused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scheduled Conditional tests have failed since late August on two hosted
gates, which also blocks release certification:
- model-download-runtime: the operator-only Qwen3.8-27B BF16 regression
lived in the gate file and always skips on hosted runners; the gate
runner rejects any skip. Move it to tests/conditional/test_qwen38_runtime.py,
outside every hosted gate.
- operator-ui: `uv sync --all-extras` now pulls the qwen-hybrid extra,
whose causal-conv1d sdist builds only against a CUDA toolkit. Exclude
qwen-hybrid there and in the tag-only supply-chain job, which runs the
same sync and would fail the next release.
Policy tests pin both invariants.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
If the layout gather or record comparison raised, the exception skipped
AgreedTopologyRefusal, and execute_preflight then ran filesystem recovery.
Every layout-admission exception now becomes the terminal
AgreedTopologyRefusal. A local construction failure enters the gather with
an invalid record, so its peer is poisoned in the same exchange. Ordinary
failure evidence still runs only after successful admission. The docs now
place layout admission before lifecycle identity consensus.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The two-host refusal used local config fields, but lifecycle consensus binds
only the stored config digest, which a dataclasses.replace does not
recompute. One rank could refuse while its peer entered staging.
Every rank now gathers a fixed-size record of its actual layout (backend,
device kind, world and local sizes, observed launcher geometry) through the
poison-protected record gather before lifecycle consensus and staging. If
any rank refuses or the records differ, every rank raises the terminal
AgreedTopologyRefusal with no storage side effects. run_preflight,
execute_preflight and the live session share this single admission point.
Regressions cover the stale-digest counterexample, two-host refusal, and
unchanged one-host and CPU success and failure paths.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
execute_preflight caught the agreed two-host refusal as an ordinary failure
and then ran its filesystem recovery: the rank-0 attempt directory,
terminal receipts and shared evidence. On independent host storage that
produced asymmetric CLEANUP_INCOMPLETE and EVIDENCE_UNAVAILABLE outcomes.
A dedicated AgreedTopologyRefusal (LMS_TOPOLOGY_UNSUPPORTED) now passes
through execute_preflight, the CLI and the live model session without
touching attempt, receipt, evidence or cleanup storage. One-host and
CPU-protocol failure handling is unchanged. Tests drive both mocked ranks
through every wrapper, forbid the storage helpers, and keep the one-host
receipt and evidence path as a must-not-regress check.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
Route every direct UI load/reload (chat lazy reload, session switch,
A/B comparison, post-run chat reload) through one guarded attempt in the
new gradio-free obliteratus/ui_model_load.py. The attempt calls the same
phase_admission.admit_model_load the CLI loader uses, with the same
confidence-tiered semantics and no UI-specific bound, and on any failure
drops partially loaded models, clears traceback-held tensors, frees
allocator memory and releases the lifecycle once.
Model-slot ownership is exclusive and transactional: a failed switch
restores the previous session metadata (previous model cleanly unloaded,
lazily recoverable from a validated checkpoint) and never publishes
partial state. Fixes the same-model deadlock in load_bench_into_chat.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(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>
Source identities and EXCISE aggregates keep their merged bounded-record
encodings in this PR (tracked in #275 and #281). Correct the export doc and
risk-map descriptions that claimed otherwise.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings the ported canonical export up to the rules from parts 3 and 4:
- Every rank-local step that can raise is followed by a unanimous control
vote before the next collective. This covers reconstruction, file I/O,
safetensors write and reload, digests, validation, fault hooks and record
construction. EXPORT votes use [17_000_000, 24_000_000).
- Tensor, file and index aggregates use streamed, domain-separated,
length-prefixed digests (streamed_contract_digest), so every advertised
limit works. Oversized HF indexes are refused before any write.
- One combined, voted host admission covers reconstructed tensors, gather
buffers, serialization and reload copies, chunked digest and finite
checks, metadata and the still-live VERIFY state.
- VERIFIED revalidation uses the guarded #274 helpers and logical roots, and
requires the released journal.
- Cancellation and the deadline are rechecked before promotion and before
return. Files are rehashed at the final gate. Cleanup or confirmation
failure quarantines as LMS_EXPORT_STATE_UNCERTAIN, and strict backup
cleanup never restores a partially deleted backup.
- Single-tensor output uses indexed naming. The HF index payload helper
is shared with checkpoint_writer, with identical output.
- Docs use the upstream #244 framing and are marked EXPERIMENTAL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release the CUDA cache before sizing PROBE and spectral VERIFY collections,
resolve batch and truncation limits once, admit them and reuse the same
selection during execution, clearing it on completion or failure. Before,
cleanup inside admission could let execution pick far larger shapes than
were admitted. With admission off, sizing stays where upstream does it.
Refs #245
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(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>