Files
OBLITERATUS/docs/distributed-probe-distill.md
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

4.3 KiB

EXPERIMENTAL distributed PROBE and DISTILL candidate

OBLITERATUS contains an EXPERIMENTAL stage adapter over the exact live model capability described in the model-load candidate. This experimental TP2 stack was accepted in issue #244. It is not a supported user workflow. It cannot load a broader model family, mutate weights, execute EXCISE, or establish physical multi-host or over-one-host-capacity support.

The candidate has two entry layers:

  • prepare_probe_corpus() is a rank-zero-only pure preparation boundary. It fixes corpus order, sample IDs, tokenizer/chat-template identity, right-padded token rows, batching limits, and content commitments without returning raw prompt text.
  • run_live_probe_distill() narrows a validated LiveModelSession, broadcasts identical bounded inputs, captures the manifest's complete replicated model.layers.N hook set, and advances only through PROBED and DISTILLED.

Rank 0 is the sole decision owner. It computes class means, layer scores, difference-of-means or SVD directions, deterministic sign canonicalization, and selected-layer order exactly once. Other ranks only verify the bounded records and tensors. Each direction must be finite, normalized, exact-shape float32, and digest-identical on every rank.

The stage is fail closed. Changed rank/config/model identity, raw inputs on a non-coordinator, missing or unequal samples, invalid tokenization, partial or unknown hooks, activation disagreement, non-finite values, resource denial, rank failure, cancellation, timeout, or coordinator computation failure cannot produce a DISTILLED result. No fallback runs an independent selector per rank.

PROBE refreshes the local host RAM observation at resource admission, after the model and tokenizer have loaded. Every rank votes using the smaller of that fresh observation and its preflight inventory; a stale high preflight reading cannot admit a host that has since lost its headroom. An unavailable or invalid reading vetoes the stage. A stale low inventory remains a conservative cap; restart preflight after deliberately freeing memory to refresh that cap.

ProbeDistillConfig.max_activation_bytes bounds a conservative tensor working set allowance, including retained batch tensors alongside concatenated matrices, captured batches and activation-reference/error scratch, input source and broadcast tensors, float64 DISTILL temporaries, SVD reduced outputs/workspace, and original plus received mean/direction artifacts. The full allowance is charged on every rank, including the worker, and must fit within half the smaller RAM reading. This also reserves room for two colocated ranks. Model allocations already reduce the fresh available RAM; they are not subtracted a second time. Allocator and vendor-library overhead are covered by reserved headroom, not a claim of an exact peak or a reservation against concurrent processes.

Operator tips: reduce paired sample counts first to reduce retained activation matrices; reduce batch size and token width to reduce transient input/capture overlap; choose difference-of-means when SVD workspace is unnecessary. Increasing max_activation_bytes cannot bypass the fresh-RAM check. Memory contention after admission can still fail the stage, and these CPU/synthetic checks do not qualify physical two-host or over-one-host execution.

The default test suite uses no downloads or accelerators. Its E1 oracle runs a project-owned tiny Llama-shaped module in two CPU/Gloo processes and compares both supported direction methods with a single-process reference. The existing conditional llama-tp-local-gpu lane additionally exercises the exact native TP adapter and retains only closed digests, counts, booleans, and aggregate errors. That lane is currently not_qualified; missing hardware or a skipped test is noncoverage, not a pass.

The EXPERIMENTAL transactional EXCISE and rollback adapter consumes this candidate through its internal live capability, followed by the EXPERIMENTAL collective VERIFY candidate. A support claim requires all applicable gates to pass on one signed exact head, including physical multi-host and over-one-host-capacity evidence (E3/E4).