Add bounded GGUF v2/v3 parsing, transactional metadata and tensor edits,
split-file handling, provenance manifests, exact GGML storage typing, and
measurement-gated quantization planning. Preserve unmodified payloads
byte-for-byte and expose the toolkit through `obliteratus gguf`.
Verification:
- 57 focused tests on each of Python 3.11, 3.12, and 3.14.
- 377 combined focused, CLI, risk-map, CI-policy, package-export, and
CLI-boundary tests on Python 3.14.
- 2,000 randomized exact-DP comparisons against brute force.
- Real single-file and three-shard GGUF metadata edits with tensor hashes
preserved; independent GGUF reader opened every output.
- Ruff, risk-map validation, wheel/sdist build, and isolated wheel CLI smoke.
No real Qwen4 conversion or inference was run; runtime and quality
qualification remain separate gates.
Shard-at-a-time output-side projection W <- W - s r (r^T W) (row-space for embeddings) in float32,
cast back to the source dtype; orientation verified from shapes; quantized (U8/MXFP4) tensors refused.
Writes a new checkpoint: edited shards rewritten in original tensor order and metadata, untouched shards
hard-linked (copy fallback), non-shard files copied, edit_manifest.json with per-key norms and projection
norms before/after, resumable progress bound to source and directions hashes. Dry-run lists matches.
Entry point: python -m obliteratus.offline_edit.
Validates the obliteratus.engine_capture.v1 artifact (schema, digest, shapes, finite values, positive
counts), computes per-row difference-in-means directions in float64 without loading a model, selects
rows (explicit, top-k, min strength; layer 0 excluded by default) and writes obliteratus.directions.v1
with manifest-bound provenance. Normalized captures (representation attn_input_normalized, e.g. the
RMSNorm-ed attention input of AttnRes models such as Kimi-K3.1) carry norm_weight and are mapped back
to residual space by dividing by it. Entry point: python -m obliteratus.external_directions.
Adds a vLLM worker extension and driver that record the last-token attention input per layer. Tensors cross the engine RPC as explicit dtype, shape and bytes, because vLLM's untyped msgpack decode does not restore them.
Resolve ci/test-quality-policy.json by keeping both owned slow-test
budgets: the E4 Gloo agreement test from #698 and the CLI dispatch help
test from this PR.
On this PR's shard layout, tests.test_cli.TestCLIDispatch::
test_verification_help_explains_invalid_denominator is the first CLI
dispatch test in its worker and pays the cold CLI import: 20.6 s and
16.3 s on hosted runners against about 3.5 s locally (unchanged by this
PR; the identity-security CLI module imports in 12 ms). It failed the
15 s default twice, so it gets an owned 25 s budget.
Resolve the vocab_surgery_discovery.py conflict with #699: keep the batched
discovery structure, render discovery prompts through the pinned-date
chat-template helper, and record chat_template_date in the generation block.
The first two-rank Gloo test in the E4 module pays the cold torch import in
both spawned ranks and took 15.5 s on the hosted PR runner, above the 15 s
default (about 5 s locally). Give it an owned 25 s budget, matching the
other two-rank Gloo tests.
Ship as accepted v2 data the nine recipes that passed the protocol final
test and were accepted by the operator on 2026-11-27: Granite 4.1 8B,
Llama-3.2-1B, Llama-3.2-3B, OLMoE-1B-7B, Phi-4-mini, Qwen3.5-0.8B,
Qwen3.5-9B, Llama-3.1-8B-Instruct-abliterated and DeepSeek-R1-Distill-
Qwen-7B. Each ships a KL-advisory evaluation profile and value-only
confirmation and verify-edit evidence bound by SHA-256, following the two
recipes accepted in 134bd2c.
The Llama-3.2 results predate the chat-template date pin (#690) and are not
comparable with later measurements. Two recipes were confirmed with
analysis_device auto (resolved to cuda:0) and ship as confirmed; the shipped
CPU-extraction test now names them explicitly.
Templates that call strftime_now (the Llama-3.2 family) rendered the run date into the system header, so stock refusal moved 0.650 -> 0.557 between two days. Every apply_chat_template render in obliteratus/ and app.py goes through obliteratus.chat_template_date, which passes a fixed date_string and strftime_now (default 26 Jul 2024) only to templates that use them. verify-edit takes the date from spec generation.date_string, records it in the report, and appends --default-chat-template-kwargs to vLLM servers it launches; reused endpoints and scripts/ stay unpinned (documented).
Fixes#690
Adds the two-host E4 workload path. A bounded streaming reference is built from the immutable source with one layer resident at a time, so it works for models larger than any single host. run_rank_local_qualification.py admits a fully bound E4 job only when its workload exceeds the local host's physical RAM, and the worker requires both ranks to agree over Gloo before PROBE. Registry and final qualification checks are unchanged; the stack stays not_qualified. The PROBE RAM refresh was already delivered in 002e6e5.
Refs #287
Adds 'obliteratus identity-security', an opt-in research evaluation excluded from every default gate: identity-only paired prompts with commit-pinned generation settings, generated apps run only in a fail-closed, no-network Bubblewrap sandbox with resource limits, functional checks and executable exploits scored separately, and denominators, exclusions, intervals, Fisher/McNemar tests and Holm adjustment reported. Paired activation capture reuses capture_activations. Real-sandbox tests live in tests/conditional/; third-party results are documented as unverified claims. The weight-intervention arm is a follow-up.
Refs #427
Phase admission gives a conservative estimated workspace for the exact FLA 0.5.2 chunk scan and causal-conv1d 1.7.0 forwards that Transformers selects for Qwen3-Next/3.5/3.8 hybrid models, after verifying package versions, wrapper chains back to the module's own file and FLA's alternative backends without importing anything. The estimate counts every inventoried kernel allocation at FP32 width, never drops below the torch-fallback estimate and adds 512 MiB per device. It is estimated, not calibrated: fail-closed still refuses; other compiled paths stay unknown.
Refs #384
Discovery generates prompts in left-padded greedy batches with explicit attention masks (--batch-size, default 8). Each row is cut at its first stop token, matching the unbatched call. Responses, counts, scores, ranking and prompt_audit (per-prompt input_ids, rendered digests, chat-template digest) are identical to --batch-size 1, which keeps the original path byte-for-byte. CPU tests on tiny GPT-2 and Llama models cover EOS and varied prompt lengths.
Fixes#689
Grok review r1 for #685: the concept_pack budget (65 s) came from one sample
of a heap-sensitive test and was already exceeded (83.89 s). Owned budgets
are re-derived from the slowest of all five hosted release samples
(45678651612 both lanes; 45696135376 py3.11 head, py3.12 head and base):
concept_pack 105 s and recipe_application v2 35 s, the rest unchanged.
smaller_change low_variance and failing_collateral are owned at 20 s. The
CONTRIBUTING owned-tests section covers all 24 and states the rule.
Rebaselines the release suite and marker duration budgets to the slowest
measured hosted release time + 25% (run 45678651612; suite 3910 s on py3.11
and 5340 s on py3.12; cpu 2010, integration 700, unmarked 2460) and owns every
test whose time + 25% exceeds 15 s under #679 with a 90-day review (follow-up
#684). Speeds up test_smaller_change rank1 (geometry environments built lazily)
and the recipe-search fake edit step (a light helper module). The PR core gate
now enforces per-test budgets on each shard's JUnit with a new
--testcase-budgets-only mode; suite and marker totals stay release-only.
Refs #679
Section D of #675: the neuron lab's load() drops the previous handle and its
state even when its cleanup fails (the failure is raised and nothing new is
loaded); `experiments trace` cleans up its handle on success and failure
without masking the trace error; default_model_factory cleans up the handle
when .to(device) fails, keeping the move error; a snapshot error raised
through a handle names the restore-point path once. Adds tests for the
sequence refusal branch and write_step(changed=False), and registers the
cleanup-site tests for inputs.py and trace_cli.py in the risk map.
Refs #675
Moves cleanup_on_exit/cleanup_during_error to the light
obliteratus.handle_cleanup module (re-exported from the loader) and imports
them at module top, so no import runs after a handle exists. Stores the closed
policy before detaching the restore point, names the path to remove in
handle-surfaced SnapshotErrors, guards post-load work in candidate,
smaller_change and the sequence loaders, keeps observer-close and neuron-lab
cleanup failures from replacing the primary error or skipping state reset, and
adds failure-plus-failing-close tests for every listed site.
Fixes#669
Gemma 3 4B/12B/27B checkpoints load as Gemma3ForConditionalGeneration with the
text decoder at model.language_model.layers; get_layer_modules now falls back
to that path (model.layers stays primary), and text-only gemma3_text is mapped
explicitly. A non-finite stock baseline on float16 weights now suggests
--dtype bfloat16. The default dtype is unchanged.
Fixes#643
Codex review r2 for #618: the results viewer reads uploaded files with an
order-preserving JSON reader so metric selection walks baseline keys in file
order like Python (integer-like keys included), and the viewer and
report._metric_value share one strict numeric-string grammar (ASCII digits,
sign, decimal point, exponent; ASCII whitespace only; finite).
Codex review r1 for #618: the results viewer builds its stats, chart and
table with DOM nodes and text only (no innerHTML), so a crafted results.json
cannot inject markup; its impact-metric selection mirrors save_plots exactly
(string primary only, measured baseline plus at least one measured ablation);
every render clears all result regions. Plots are written to a temp file and
moved into place only on success, figures are always closed, and a fallback
metric is labelled on the chart. A node-based test exercises the viewer.
Resolve against #593 (quick-check settings) and #591 (tied-head
migration) by keeping both sides: the pipeline gains analysis_device
alongside refusal_check_mode/confidence; migration and the shipped
recipes emit allow_tied_head_edit and the analysis_device cpu pin;
_structured relaxes both the refusal-check settings and
analysis_device for historical resolution records; both sides' tests
are kept.
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