Codex review r5 for #605 (3 x Medium):
- Ownership covers sparse model components (COO indices/values and the
compressed layouts' index and value tensors). When the storage of a
result or a model tensor cannot be identified, the result is cleared
(fail closed) instead of copied.
- The sweep holds no per-field locals across iterations, and traceback
frames along the original interrupt's cause/context chain are cleared
before re-raising and before resource release, so interrupted results
are collectable before accelerator memory is released. The original
exception object is still raised.
- A further interrupt during the fail-closed clearing pass retries the
field instead of aborting the pass; the first interrupt propagates.
Fourteen regressions fail on the previous head; GPU-marked tests cover
CUDA sparse buffer components and CUDA result lifetime at release.
Codex review r4 for #605 (2 x Medium):
- Tensors that share storage with any model parameter or buffer (views,
slices, detached aliases, .data) are recognized as model-owned from
storage metadata only, with no content transfer, and are cleared
instead of copied to the host.
- A KeyboardInterrupt/SystemExit during the result sweep is recorded:
the remaining fields are cleared without conversion, offload-directory
removal and accelerator memory release still run, and the original
interrupt is then re-raised.
Regressions fail on the previous head; GPU-marked coverage for real
parameter/buffer views and a parameter .data alias alongside an
independent result that is still converted.
Codex review r3 for #605 (5 x Medium):
- The release sweep never detaches or copies model parameters or
model-owned buffers (for example a preserved output head); such
references are cleared.
- Memo entries are committed per field, so a failed nested transfer
cannot leave partial copies for later aliases.
- A field is cleared before logging, logging is guarded so callbacks or
cancellation cannot mask the original failure, and KeyboardInterrupt/
SystemExit propagate after the field is cleared.
- Fail closed: only supported result shapes are converted; fields with
unsupported shapes (plain or slots objects, tensor dict keys), cycles
that cannot be rebuilt faithfully, or conversion errors are cleared.
Eleven regressions fail on the previous head; GPU-marked coverage for
model-owned tensors and unsupported results on real CUDA tensors.
Codex review r2 for #605 (2 x Medium):
- Failed-run cleanup now sweeps every pipeline attribute (excluding the
model handle and modules) and moves any accelerator tensor to the host,
covering LoRA adapter factors (_lora_adapters) and other retained
fields. One memo spans all fields so aliases stay shared; a field that
cannot be converted is logged and cleared, so cleanup never raises
over the original failure.
- _tensors_to_cpu is memoized (id -> copy), never mutates its input,
returns CPU-only values unchanged, and rebuilds named tuples
(_make), list/tuple/dict/set subclasses and dataclasses including
init=False and frozen fields.
Tests: namedtuple, init=False and frozen dataclasses, aliasing across
calls, CPU identity, conversion-failure fallback, and (GPU-marked) LoRA
factors and cross-field aliases moved off CUDA.
The r1 cleanup fix cleared concept_directions, concept_subspaces and the
validated concept direction after a failed run, breaking the contract
that callers can inspect results, reports and metadata after failure
(test_excise_adjacent_failures, test_concept_gate_pipeline). Results are
now retained and moved to the CPU, which still releases all accelerator
memory; collection intermediates stay cleared. _tensors_to_cpu moves
tensors nested in dicts, sequences and dataclasses. Tests cover the
corrected cleanup contract, the helper, and (GPU-marked) CUDA tensors
ending on the host.
When the model is on CUDA or MPS, activation stacks and the analysis
math (difference means, winsorizing, whitening, per-layer SVD in
float32, refinement and KL logits) now stay on that device instead of
being copied to the host, where they used about 10 host cores per edit.
A new analysis_device setting (auto | model | cpu) is a v2 projection
parameter: auto, the default for v2 recipes, uses the model's device and
falls back to the CPU with a logged reason for offloaded, split or meta
models or when the pre-collection memory estimate exceeds free device
memory. The device actually used is recorded in resolution records and
checkpoint metadata. v1-migrated recipes and the shipped recipes pin
cpu so confirmations made with CPU-extracted directions re-apply
exactly; direct pipeline calls keep their CPU default. CPU results are
unchanged.
Fixes#590
The REBIRTH save stage only checked that files exist and parse, so a
save that dropped or mangled the edit passed silently (#525).
- `obliterate --record-reference` records greedy outputs of the
in-memory edited model on the pinned obliteratus-verify-v1 prompt set
(8 harmful + 8 harmless, 32 tokens) into a sidecar with digests of the
files the reload reads.
- `obliteratus verify-checkpoint` reloads the checkpoint from local
safetensors only, regenerates greedily and compares token ids: exact
match, prefix agreement and harmful refusal-rate change against
per-reload tolerances (strict for full precision, provisional for
bitsandbytes 8/4-bit, overridable and recorded).
- Fails with named reasons for no or empty reference, files changed
since the reference, tokenizer mismatch, divergence, invalid outputs
and, with --stock-model, an edit that was not persisted. A
structural-only check can never pass.
- Versioned report bound to checkpoint digests, prompt-set digest and
runtime; exit 0 pass, 2 input error, 3 verification failed.
- CPU tests use a tiny local GPT-2 through the real REBIRTH; a CUDA and
bitsandbytes test runs in the conditional gates.
Add a bounded evaluation of whether shifting a known predictive mean
preserves a known non-target spread (#511), producing reproducible
evidence and negative results rather than a universal steering claim.
- Whole sequences are split into fit, calibration and held-out
partitions per seed block before any activation is collected.
Geometry is fitted on fit rows only, matched-mean scales are found on
calibration rows only, and the preregistration (tolerances, arm
choices, scales) is frozen by digest before any held-out pass.
- Seven arms with exposed choices and reversible, restoration-checked
hooks; matched-displacement and matched-mean comparisons are reported
separately, and PCA-plane proximity can never establish preservation.
- Paired intervals over seed blocks, separate AdamW and L-BFGS probe
fits (optimizer-dependent outcomes flagged conditional), explicit
zero handling, separate costs, and exploratory labels for
extrapolated cells. Curvature stays null.
- Golden synthetic arc fixtures with known answers: a spread-preserving
variant and a radius-dependent variant the chord arm distorts.
- Every attempted cell, arm and comparison is logged; synthetic runs are
rated hypothesis and never claim pretrained reproduction. The opt-in
pretrained campaign refuses until both model revisions are pinned and
runs only behind an explicit environment flag.
- `obliteratus experiments numeric-geometry`, catalog rows and a new
documentation section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend backend qualification so precision-induced changes in reasoning
outcomes are separated from intervention effects (#512).
- Precision declarations record weight, activation and KV-cache
precision, quantizer and calibration identity; incomplete or
inconsistent declarations are refused.
- A bounded, preregistered pilot protocol fixes candidate, dataset,
decoding, output budget, seed blocks, final-answer parser, margins,
drift limit, resource objective and disjoint splits.
- The pilot loads four fresh cells on the same rows: the unedited parent
and the saved candidate at the CPU float32 reference and at the
declared precision.
- Per-row outcomes separate final-answer correctness from reasoning and
total tokens and termination; truncated or unparsable outputs count
as wrong.
- Paired bootstraps give precision effects within each artifact,
intervention effects within each precision and their interaction.
Gates apply per task and pooled, and expose harm hidden by a pooled
pass. Shared-prefix KL is reported apart from free-running
disagreement.
- Token cost never gates; an efficiency claim needs every gate to pass
and the preregistered resource to improve.
- Support matrix schema 2 carries precision fields and pilot attempts;
pilots never add qualified pairs, and schema 1 records still load.
- `obliteratus experiments qualify reasoning`; CUDA path in the
conditional gate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start milestone 5 (F20): qualify each saved artifact on an explicit
backend against the CPU float32 reference of the same artifact, and
record exactly which pairs qualify.
- Only fully verified persistent candidates are accepted; each run
loads the saved artifact fresh from disk on the reference and on the
declared backend after checking digests.
- Backend descriptors make device, dtype, quantization, attention,
tokenizer and cache mode explicit; their digest is the backend id, so
native and quantized results are separate rows.
- Paired evaluation on independent rows checks realized settings,
target rate, completion agreement, logit and site-activation drift and
collateral endpoints. Latency and memory stay outside the digest.
- Unsupported combinations are recorded unsupported without loading or
falling back; unavailable hardware is refused and leaves the pair
untested. Failures are permanent and block broader claims.
- A versioned support matrix lists exactly the qualified pairs. CUDA
tests run in the cuda-runtime conditional gate.
- `obliteratus experiments qualify run|matrix`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Integrate the weight fingerprint from #451 with CUDA execution:
- model_identity is now device-aware (require_dense_device) and always
includes the weight fingerprint, so CUDA runs carry it too;
execution_identity simply delegates. The fingerprint is
device-independent: the same weights give the same digest on CPU and
CUDA.
- New optional spec setting model.fingerprint ("sampled" default,
"full"), dropped from the filled spec at its default so existing
digests are unchanged. It applies to the run's model identity and
therefore every step's reuse check; capture manifests keep a sampled
fingerprint.
- Resolve additive conflicts in capture_identity.py, inputs.py, the risk
map and OBSERVATION_RUNS.md by keeping both sides.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Remove the observation runner's execution limits.
- Chat templates: an optional prompt section renders each prompt
through the tokenizer's chat template (optional system message,
generation prompt), tokenized without extra special tokens. The
rendered-prompt digest joins the generation step identity and each
record; capture uses the same rendered prompts.
- Decoding: seeded sampling (temperature, top-p, top-k) alongside
greedy, with a per-example seed derived from the spec seed and example
id. Comparison treats sampled outcomes as exact only when strategy,
device, dtype and seed match, and says why otherwise.
- Batching: optional left-padded greedy batches with an explicit,
recorded pad token; rows are cut at their first eos so batched and
unbatched outcomes agree. Sampling with batches is refused because
per-example seeds cannot hold.
- Devices: dense CUDA for the runner and capture, with shards written
from CPU copies and device/dtype recorded. Quantized, offloaded,
dispatched, meta, split-device and MPS models are refused with
explicit reasons.
The schema stays additive within version 1; options at their defaults
are dropped from the filled spec, so existing spec digests are
unchanged (pinned in tests).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Baseline profiles reported unique examples, token presentations,
forwards, generated tokens and tensor bytes as null. Count them from
load completion through cleanup with pass-through observers: a forward
pre-hook on the loaded model and instance-level wrappers on generate and
activation collection, all removed on exit and after failures.
Counters are recorded per stage and totalled. A counter that cannot be
observed stays null with a reason (stages before load, calls without an
attention mask or input ids, batched generation, forwards outside
activation collection, or embedding calls that bypass the watched
model). Changes are additive within profile schema version 1; default
baseline artifacts are unchanged, profiled or not.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
frobenius_norm_bounded added each chunk's CUDA result into a CPU
float64 tensor, which raises a device-mismatch RuntimeError for any
weight not on the CPU. Norm capture and restoration run whenever
norm_preserve is on, so every GPU run would have failed.
Accumulate into a Python float instead. That keeps float64
accumulation and works on CUDA and MPS (which has no float64). Widen
chunks straight to contiguous memory so a transposed chunk is not
copied a second time by reshape, and run the reduction under no_grad.
Add a CUDA conditional test that fails on the previous head and covers
the helper and the real capture/restore path on a CUDA layer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add browser-local spatial activation replay with orbit, zoom, token travel, paused/reduced motion, and model-layer destinations. Render measured signed values faithfully with illustrative depth, and clean up retained-node listeners and detached scenes. Add runtime lifecycle, navigation, payload, and real Gradio regression coverage.
Add a responsive amber control rack, signed activity chart and token map, ordered intervention cards, and measured comparison outputs. Preserve editor selection and one-sided clamp bounds across recipe changes; cover display escaping and callback flows.
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.
Review of 9eabacc: lstat/O_NOFOLLOW only protected the final path
component, so a symlinked ancestor (e.g. /var/run) was accepted and
mkdir(parents=True) followed ancestors before validation. The opt-in log
directory is now walked from "/" one component at a time with
O_DIRECTORY|O_NOFOLLOW relative to the parent fd, missing components are
created 0700 relative to that fd, relative paths and ".." are rejected,
and ownership/permissions are checked on the final opened fd.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of e3ab98d: OBLITERATUS_TP_WORKER_LOG_DIR accepted existing
world-writable or symlinked directories. It must now be a private
(owner-only, no group/other write) non-symlink directory owned by the
current user, and log files are created relative to an O_NOFOLLOW
directory fd with O_EXCL and mode 0600; anything else fails closed. The
launch/wait fd test now tracks each launch's descriptors separately so it
no longer depends on fd number reuse.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On torch 2.13 the c10d backend gives workers MASTER_ADDR=getfqdn() and a
fresh MASTER_PORT from the shared TCPStore (launcher.api returns no
master endpoint for non-static backends), which the launcher contract
rejects. local_tp2 now uses --rdzv-backend=static with the profiled
--master-addr/--master-port and --node-rank=0; the is_host approach is
dropped. two_host_tp2 keeps c10d. Allow ROLE_NAME and
TORCHELASTIC_SIGNALS_TO_HANDLE (set by torchrun 2.13) and LC_CTYPE (PEP
538 locale coercion) in the worker environment. Verified on 2x A100.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The llama-tp-local-gpu gate failed on a 2x A100 host with
"DistNetworkError: The client socket has timed out ... connect to
(172.27.0.1, ...)". torch's c10d rendezvous only hosts the TCPStore when
_matches_machine_hostname(host) is true; on hosts whose hostname resolves
only to 127.0.1.1 no private IP matches, so every agent acts as a client.
The harness also picked a Docker bridge (br-*) because it took the first
RFC1918 address in sorted interface order.
- local_tp2 passes --rdzv-conf=is_host=1 (two-host shape unchanged).
- Interface ranking prefers non-virtual interfaces (docker, br-, veth,
virbr, cni, flannel, tailscale, lo deprioritized) with the old rule as
fallback; optional OBLITERATUS_TP_INTERFACE exact override.
- Opt-in worker log capture via OBLITERATUS_TP_WORKER_LOG_DIR (0600,
O_EXCL); default stays DEVNULL.
Helpers move to tests/conditional/_llama_tp_harness.py with CPU tests.
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>
Failures before the previous model is unloaded restore metadata and status
without touching the resident model or lifecycle. Timeout and unstarted
worker paths transfer cleanup before the terminal yield so the slot is
never retained by a suspended generator.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Release lifecycle, drop references and free allocator memory before a
failed attempt's claim is rolled back, and roll back before obliterate's
terminal error yields when no worker remains.
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>