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>
Weights edited in place under the same model id and revision were not
detected, expired captures still loaded, and run stores could not be
pruned because reused steps reference earlier attempts.
- Fingerprint: a deterministic fingerprint of every parameter and
buffer (names, shapes, dtypes and a fixed strided sample of each
tensor, with an optional full digest) joins the capture identity and
the runner's model identity. Captures and steps from before the
fingerprint are refused or recomputed with a recorded reason. The
pipeline's entry-point cache identity is unchanged.
- Retention: load_capture refuses captures past expires_at unless
inspection is requested; comparison inspects stored captures
regardless of expiry.
- Pruning: `obliteratus experiments prune` (dry run by default) keeps
the latest complete attempt, the newest N, active attempts and every
attempt a kept one reuses, records a pruned event before deleting,
and finishes interrupted removals on the next applied prune.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add a shared observation spec, runner, run store and comparison so one
baseline observation can be specified once, run from the CLI or Python,
resumed after interruption and compared across runs.
- Spec: versioned JSON with a single schema file as authority. It
references a pack, dataset revision and role (locked test only with
acknowledgement), model id/revision/dtype, greedy decoding, registered
scorer tasks, optional activation capture and profiling, and a seed.
The canonical digest of the defaulted spec is the run identity.
- Runner: baseline only. It refuses models with forward/backward hooks,
global module hooks, an interrupted-surgery marker or active adapters
before any generation, then scores generation per task (single-arm,
descriptive scorecards with Wilson intervals) and optionally captures
activations and profile counters.
- Store: one directory per run identity, append-only attempt events,
pending/running/complete/failed/cancelled transitions under a lock.
Abandoned attempts are recorded as failed. A new attempt reuses a step
only when it is complete, identity-matched and its files still verify.
- Compare: exact equality for identities, counts and per-example
outcomes; explicit tolerances for rates and activations, reported per
field.
- CLI: `obliteratus experiments run|compare|history`, sharing one
Python code path a UI can call.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Finish the measurement-validity audit for the two remaining geometry
modules.
wasserstein_transfer:
- The Gaussian W2 paired sorted eigenvalues and underestimated the
distance for non-commuting covariances (0 for a 45-degree rotation of
diag(100, 1)). Compute the exact closed form with a stable PSD square
root, from each side's own mean and covariance.
- Mismatched widths gave a truncated value and failures gave 0; both are
now None with a reason. Failed map inversion no longer falls back to
the raw cross-covariance. Fidelity is exact Pearson correlation.
- The "transport map" is a ridge least-squares map, not a Gaussian Monge
map. Viability, fidelity and recommendations are labelled heuristics
and are None unless their inputs exist; refusal-removal estimates that
measured nothing are unsupported and always None.
bayesian_kernel_projection:
- Relabel as seeded random search with local perturbation over a
partial linear projection (no surrogate or kernel). The Pareto front
could keep a dominated trial on reduction ties; fixed. With no signal
or no input, best results are None with a reason instead of score 0.
Both modules now carry measurement evidence and catalog rows checked by
the registry test, and the app overview no longer claims a Monge map or
TPE optimization.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve additive conflicts with #442 in ci/test-risk-map.json and
docs/geometry-measurement-validity.md by keeping both sides.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Extend the measurement-validity treatment from riemannian_manifold.py
to concept_geometry, the LEACE paths, cross_layer and
wasserstein_optimal. Each audited result carries measurement evidence,
every reported field has a catalog entry, and a registry test fails
when either is missing.
- concept_geometry: the cone "solid angle" is a cap around the mean
axis, not a minimal enclosing cone; relabelled. Placeholder defaults
(cosine 1.0, specificity 1.0, linear/polyhedral flags, layer indices 0)
become None when there is too little data. The informed pipeline skips
unavailable flags; decisions on valid inputs are unchanged.
- cross_layer: persistence, adjacent cosine and angle path length are
None with fewer than two layers instead of 0.0/1.0; zero or non-finite
directions are rejected instead of reported as orthogonal.
- leace: the Fisher "erasure loss" is relabelled as variance along the
direction; exact and multiclass LEACE gain erasure oracles.
- wasserstein_optimal: a layer with no signal reported a cost ratio of 0
and could be chosen as best_layer; it is now None and excluded. The
W2 cost is exact for any direction (closed-form oracle), and the
comment calling it a bound is corrected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rank-k extraction stores a basis, but the gate validates only its
primary direction, so an informative first vector plus unrelated
dimensions could pass as a whole subspace.
Add a standalone, versioned subspace report (not wired into the gate):
spectrum and conditioning, PCA-threshold and entropy effective rank,
bootstrap principal-angle stability, held-out multivariate prediction
per rank, rank-matched random-subspace nulls, and joint/interaction
diagnostics for direction pairs. The verdict reports the supported rank
("supported_rank: s of k"), counting only consecutive ranks whose
held-out increment beats both their null and a minimum increment. The
report compares the primary-vector, PCA-threshold, entropy-rank and
prediction arms side by side.
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>
The behavioural battery treated any greedy-text difference as an effect,
so a punctuation-only edit looked like a change and nothing measured
task success.
Add a local, versioned scorer registry with deterministic exact-answer
and structured-output (JSON + declared schema) scorers. Each completion
yields separate endpoints: task success, invalid output and abstention;
raw text change is reported as descriptive only. Paired summaries use a
one-sided exact McNemar test and Wilson bounds against a declared
per-task margin; min_pairs defaults to the smallest sample that could
pass that margin, and untested or underpowered endpoints never aggregate
to PASS. Every aggregate keeps its per-example records.
EvaluationBattery(scorers=...) writes behavioural["scorecard"]; without
scorers nothing changes. Pipeline admission refuses batteries that carry
scorers until their generation is modelled. Dataset-built examples read
select/calibrate rows; locked test still needs explicit acknowledgement.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an on-disk activation capture built on observe_activations. Each run
writes one safetensors shard per batch under raw/ and a manifest binding
model id/revision and loaded dtype, tokenizer and chat template, special
tokens, adapter state, readout, layer sites, input digests and the
dataset revision. The manifest records running/complete/cancelled/failed
state, a labelled byte estimate, measured bytes and wall time, and
retention.
The loader refuses incomplete captures unless asked to inspect them, any
identity difference (naming the first differing field), unknown adapter
state, digest mismatches, and shard paths outside raw/. Capture refuses
meta, offloaded, quantized and non-CPU models, and runs nothing when the
estimate exceeds the budget.
Tokenizer and checkpoint identity move into a shared helper that the
pipeline's entry-point cache identity also uses, with identical keys and
values.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The concept-packs surface owns validation.py and the pack schema but did
not require tests/test_concept_token_policy.py, so a regression in those
tests passed PR CI.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prepare only locked dependencies in owned release environments before installing the exact project. Preserve verified wheel-supplied caches outside import paths, require zero caches before compilation, and bind generated cache bytes to source and retained diagnostics.
Keep project caches forbidden, preserve the no-write startup policy, sanitize inherited compilation settings, and retain bootstrap evidence separately without changing test selection or release gates.
Refs #306
Keep allocation failures terminal through quantized experts, adapter selection, Bayesian evaluation and refinement helpers. Route folded-writer errors and warnings promoted to errors through public cleanup before verification or export.
Exercise exact exception causes, failed-operation counts, rollback, cleanup and no-export behavior across recipe variants. Fixes#389.
Include local and global forward/pre-forward hook callbacks, ordering and behavior flags in reset verification. Retain callback references so identity checks cannot be defeated by equality overrides or object ID reuse.
Add 22 regressions including exported mismatch receipts and unchanged-hook controls. Refs #390.
Qualify all four Qwen scan and convolution fallbacks and reject Hub replacements on every model submodule. Keep unbounded compiled kernels unknown in strict mode and document the remaining source and hardware qualification gaps.
Refs #384
Compare the composite concept arm with an explicit CausalLM arm using the same recipe, inputs and seed. Keep checkpoint ownership, receipts, interrupted resumes and raw failed metrics separate.
Refs #383, #333
Propagate memory exhaustion through the public cleanup boundary and fail partial projection passes before verification or export. Exercise attention, FFN, SAE and module lookup failures with real tiny-model projections.
Update the rollback CPU-allocation guard to follow the bounded snapshot helper; the old Tensor.to spy failed on unchanged main.
Fixes#389