Review of 5a4835e: with no manifest global shape, a sharded head fell back
to mutable config.vocab_size, so 16-row shards with config vocab 16 passed
on both ranks. A vocab-sharded head now needs the manifest global row
extent corroborated by the live local weight shape and a complete even
shard layout (local rows x world size, per-rank start/end and rank
shards); config alone never establishes it, and anything else fails closed
with LMS_VERIFY_FORWARD_CONTRACT in baseline and post-edit revalidation.
Docs state the exact rule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of 579125a:
- For a vocab-sharded head the observed logits width was accepted as the
vocabulary, so identical shard-width outputs passed. The width must now
match the manifest global row extent (config as fallback); without a
trusted extent VERIFY fails closed with LMS_VERIFY_FORWARD_CONTRACT.
- Refusal decisions took argmax over the full padded width, so a model-only
column could win and hide a refusal. Selection is restricted to tokenizer
ids; full-width log_softmax and finiteness checks are unchanged.
- Adds real 2-process gloo cases (padded vocab, shard-width mismatch, rank
width disagreement) asserting identical exact codes and rollback, and
tightens the gloo code-agreement test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- tensor_digest streams the canonical bytes through 4 MiB CPU chunks in
C order. Digests are byte-identical to the previous whole-tensor
serialization for every dtype (BF16 included), shape and stride, and
numerical._tensor_digest reuses it. VERIFY reserves the bounded 8 MiB
digest working set explicitly.
- The live VERIFY wrapper performs one unanimous combined host admission
before EXCISE starts: retained baseline + EXCISE's own journal and
restoration working set + VERIFY's peak + margin, against a single
memory observation. It denies with LMS_EXCISE_RESOURCE_DENIED before
any mutation. Rollback releases post-edit snapshots before loading the
journal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Quality metrics are reduced in bounded 16-row chunks with float64
accumulators, so the KL intermediates no longer scale with the whole
snapshot. Padded log-probability batches are released inside the existing
voted steps. Host admission now budgets an explicit peak:
inputs + two retained snapshots + max(forward/log-prob batch, metric chunk)
+ margin. Tests cover the analytic peak, live allocation sizes, batch
lifetimes and numerical equivalence with the unchunked metrics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rollback after a VERIFY failure now proves the whole model against the
pristine baseline (voted, with consensus) before lifecycle emission or
journal deletion. EXCISE alone proves only its edited operations. A
failed proof keeps the journals, quarantines and reports
LMS_VERIFY_STATE_UNCERTAIN instead of a clean rollback.
- Inference-mode setup moved inside the preparation vote, so nothing
fallible sits between the vote and the TP forward. Failures inside
the forward are documented as the bounded timeout / rank-loss boundary
and tested with a real internal all_reduce.
- Retained logit rows are cloned out of the padded batch, so retained
storage equals the admitted bytes.
- The hardware evidence checker validates each attempt against its own
mount attestation while still requiring the same physical host and GPUs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adapt the ported VERIFY stage to the symmetric-failure consensus model
from part 3. Every rank-local step that can raise outside the consensus
primitives (plan/record preparation, tensor broadcasts and copies, forward
inputs, metrics, digests, evidence, summary and result construction) is
followed by a unanimous control-group vote before the next collective, and
raw records go straight into the symmetric primitives. VERIFY votes use a
dedicated sequence range disjoint from EXCISE.
Rollback now requires unanimous committed eligibility and goes through the
hardened EXCISE restoration. Journal cleanup or lifecycle failure after
acceptance quarantines with LMS_VERIFY_STATE_UNCERTAIN, and cancellation
and the deadline are rechecked before the journal is deleted and before
VERIFIED is returned. Docs use the upstream #244 framing and are marked
EXPERIMENTAL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 2fbc38cd512f1130b4931ba5a7ffaf2e666d3008)
Ported for #244 (part 4/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Doc conflicts keep upstream wording and add only the VERIFY 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>