Commit Graph
381 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 1569e8115a fix(gpu): keep optional diagnostics and cached CUDA memory out of rejections
Admit OOM-tolerant generation diagnostics and KL capture separately from
mandatory work; when their admission fails, the existing diagnostic-skip
path runs instead of failing the phase. Mandatory demand is unchanged and
still rejects in default and strict mode.

Release unused allocator cache before observing CUDA memory at every
boundary, as the main pipeline already did, so the informed and benchmark
transitions cannot reject work the cache would serve. Resolve an explicit
unindexed "cuda" device map to the current CUDA device in admit_model_load.

Shrink the warning-scope tests by stubbing model work they do not test.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 16:04:12 -04:00
Joseph MaglyandClaude Opus 5.5 e5db2ed089 test(gpu): fit admission tests in the PR core budget
Run real-peak admission tests at four CPU threads in the PR suite, with the
one- and eight-thread variants marked slow, and shrink their geometry to
the smallest size that still discriminates the modelled workspace terms.
Evaluate the differential matrix per handle so every combination keeps its
invariant at a fraction of the cost. The PR core selection had grown past
its ten-minute limit.

The smaller geometries exposed CPU estimate gaps, now modelled: autocast
parameter-copy staging, SDPA operand casts under CPU autocast and per-worker
reduced-precision GEMM scratch. These stay estimate-only; CUDA calibrated
numbers are unchanged.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 15:27:38 -04:00
Joseph Magly 94c8a8974e Merge remote-tracking branch 'upstream/main' into feat/248-portable-gsq 2026-10-08 14:11:32 -04:00
Joseph MaglyandClaude Opus 5.5 f50e75aa64 fix(gsq): cast-check retained tensors at load dtype; recheck source around assembly
- Require retained and overwritten floating tensors to stay finite after
  casting to every bound load dtype, checked in bounded chunks, in run
  validation and assembled verification.
- Recompute the GSQ revision and prepared digest immediately before
  spawning save_model.py and after it exits; drift refuses the spawn or
  fails assembly before the output is certified.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:04:32 -04:00
Joseph MaglyandClaude Opus 5.5 cb77f5e535 fix(gsq): recheck training source around launch; certify load-dtype decode and group divisibility
- Recompute the GSQ revision and prepared digest immediately before
  spawning the child and after it exits (success, failure, interrupt);
  any drift refuses the launch or binds the run as unverified source.
- Require scales to stay finite after casting to the bound load dtype,
  and decoded products to be finite in that dtype, in both run-shard
  validation and assembled-output verification; record run_dtype in the
  manifest.
- Require every packed projection's input dimension to be divisible by
  the group size, as the loader has no padding path for group strategy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:50:33 -04:00
Joseph MaglyandClaude Opus 5.5 6db084a4f2 fix(gpu): admit only the work that follows and warn once per invocation
Refinement admits the validation gate alone, not the evaluation capture it
never runs, so default mode cannot reject a run for forwards that do not
happen. Repeated admissions inside one benchmark method, Concept Lab
action, informed/Ouroboros loop or concept evaluation share a warning
scope: each boundary still observes memory afresh, but a phase/device
warns once per invocation.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:47:35 -04:00
Joseph MaglyandClaude Opus 5.5 5c4b9cf9c5 fix(distributed): stream tensor digests and admit combined stage peaks
- 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>
2026-10-08 13:34:46 -04:00
Joseph MaglyandClaude Opus 5.5 69d4282f51 fix(gsq): close nested quantization_config keys; roll back read-only files safely
- Require the exact config-group and weights key sets the pinned
  assembler writes, with exact JSON types, so per-group format overrides,
  block_structure, and unknown nested keys fail closed.
- Restore and back up prepared files via staged temp files and
  os.replace with the recorded mode, so read-only originals roll back
  cleanly and retries are not blocked by retained backups.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:25:58 -04:00
Joseph MaglyandClaude Opus 5.5 d0bf5c31f6 fix(distributed): admit VERIFY peak working memory
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>
2026-10-08 13:14:48 -04:00
Joseph MaglyandClaude Opus 5.5 05df30fa15 fix(gsq): bind training source to runs, close quantization_config keys
- Record the launch-time GSQ revision and prepared-tree digest (and any
  unrecorded-digest opt-in) in the launch record, run binding, and
  manifest; prepared_tree_verified requires the launch-time source to
  match the pin. assemble refuses an unverified training source unless
  --allow-unverified-training-source is passed.
- Fail closed on unknown top-level quantization_config keys and require
  kv_cache_scheme, global_compression_ratio, and run_compressed to be
  absent or null.
- Hash canonical POSIX relative paths in both tree digests (unchanged
  on POSIX).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 13:12:59 -04:00
Joseph MaglyandClaude Opus 5.5 aa9ec452cd fix(gsq): derive run dtype from base weights, keep file modes, isolate e2e download
- Render model.dtype and quantization.logits_dtype from the base
  checkpoint's unanimous float weight dtype (safetensors headers), with a
  validated --dtype override; run, validate, and assemble refuse a config
  whose dtype disagrees with the base. A bf16 base renders exactly as
  before.
- Preserve original permission bits across atomic prepare, backups, and
  rollback; new files honor the umask.
- Download the e2e snapshot in a GSQ-interpreter subprocess so no HF
  client sockets outlive the call inside pytest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:54:05 -04:00
Joseph MaglyandClaude Opus 5.5 79344856c8 fix(distributed): prove whole-model rollback and bound VERIFY memory
- 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>
2026-10-08 12:47:50 -04:00
Joseph MaglyandClaude Opus 5.5 06d20c7015 fix(gpu): admit refinement validation and split-layer forwards honestly
Admit VALIDATE before the iterative-refinement gate, and re-admit EXCISE
afterwards, so strict mode can reject the gate before it materialises.
Treat forward workspace as estimate-only when a decoder layer is split
across devices, since the estimator would charge every participant with
the whole layer; unsplit single- and multi-GPU numbers are unchanged.

Admit the stages that informed/Ouroboros loops, Concept Lab, concept
baseline and evaluation, checkpoint verification and the benchmark script
run outside the main pipeline. Work without a qualified bound is
unmodelled: default mode warns and proceeds, strict mode rejects.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:43:01 -04:00
Joseph MaglyandClaude Opus 5.5 e18fd1c219 fix(distributed): keep VERIFY collectives symmetric on local failure
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>
2026-10-08 12:24:35 -04:00
Joseph MaglyandClaude Opus 5.5 1f0d4f9cc6 fix(gsq): preserve and bind chat templates and processor metadata
- Patch the pinned assembler to also copy chat_template.jinja,
  chat_template.json, chat_templates/*.jinja, added_tokens.json,
  processor_config.json, and video_preprocessor_config.json; the
  prepared tree digest is updated accordingly.
- Bind those files in the base-model hash set so drift before or during
  assembly is refused.
- Require each such base file to appear byte-identical in the assembled
  output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:10:43 -04:00
Joseph MaglyandClaude Opus 5.5 dde2bcde4a fix(gpu): keep dequantized and retained-score demand estimate-only
Carry dequantization provenance into the post-conversion load check so
converted weights keep their estimated tier without charging conversion
workspace twice; admit_model_load gains an additive `dequantized` keyword.
Charge generation scores and logits retained by output_scores or
output_logits as a separate estimated component instead of inflating the
calibrated forward demand, which is unchanged when they are off.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:07:16 -04:00
Joseph MaglyandClaude Opus 5.5 af8eb6e10b fix(gsq): match class-name ignores and certify decoded-weight finiteness
- Mirror compressed-tensors ignore matching for packed Linear modules,
  including plain class-name entries ("Linear", "Module"), so a
  class-wide ignore that would skip packed projections is rejected.
- Require every packed group's decoded weights (unpacked codes times
  scale, in the scale dtype) to be finite in both run-shard validation
  and assembled-output verification, checked in bounded row chunks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:54:11 -04:00
Joseph MaglyandClaude Opus 5.5 2ef2a76792 feat(distributed): verify collective edits fail closed
(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>
2026-10-08 11:53:55 -04:00
Joseph MaglyandClaude Opus 5.5 5ee711aace fix(distributed): make consensus primitives fail symmetrically
A rank-local preparation failure in gloo_all_gather_records,
require_consensus_digest or unanimous_vote now still joins the same
fixed-shape all_gather with a poison payload; the failing rank re-raises its
own error and every peer raises ContractError, so no rank can leave for a
different collective. The fixed-buffer/identical-bytes boundary is documented
as the process-fault limit handled by the bounded timeout and rank-loss path.

EXCISE now checks cancellation and the deadline after the final operation
before returning COMMITTED, and public rollback's ABORTING/ABORTED lifecycle
emissions are covered by quarantine handling.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:45:37 -04:00
Joseph MaglyandClaude Opus 5.5 3be8c5c1a4 fix(gpu): keep calibrated tiers and make CPU peak bounds thread-robust
Keep basic distillation calibrated when the pipeline carries inactive SAE
metadata, and keep the ordinary-edit component calibrated when optional
operations add work on top of surgery. Emit one admission warning per
phase and device across a whole SUMMON invocation (dequantization and
load), while still running both capacity checks.

Model per-thread CPU Flash attention packing and LoRA GEMM workspace plus
allocator granularity, and pin torch threads (1/4/8) in every real-peak
test through shared helpers so the bounds hold on multi-core CI runners.
Shrink the slow admission peak tests below five seconds.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:43:31 -04:00
Joseph MaglyandClaude Opus 5.5 8f3e76a623 fix(gsq): recheck inputs after assembly, validate loader metadata, contain shard refs
- Re-verify consumed shards, progress.json, base-model files, and the
  GSQ/model configs after save_model.py returns; refuse if any changed
  during assembly.
- Require quantization_status "compressed", no input/output activation
  schemes, and the static, non-reordered weight scheme the pinned
  assembler writes.
- Require assembled index references to be plain top-level
  assembler-named shards contained in the output directory.
- Map the GSQ source pin, CLI entrypoint, and docs to the GSQ tests, and
  let mapped non-production paths select their surface tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:35:14 -04:00
Joseph MaglyandClaude Opus 5.5 c63b40a869 fix(gsq): serialize launches and guarantee in-RAM activation capture
- Hold an exclusive launch lock in the checkpoint directory for the
  snapshot-launch-bind sequence; never overwrite a run binding and refuse
  run directories that predate the launch.
- Refuse configs whose activation buffers would reach the disk-backed
  mmap threshold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 18:04:55 -04:00
Joseph MaglyandClaude Opus 5.5 d761ad1c88 fix(gsq): enforce the 2-bit method contract and exact loader semantics
- Require explicit 2-bit symmetric GPTQ+GSQ settings, matching group
  sizes, num_workers 0, and the in-RAM activation threshold at launch,
  validation, and assembly.
- Require the base index key set to equal the top-level shard keys.
- Match ignore entries with compressed-tensors semantics (re.match).
- Apply digest exclusions to checkout-relative path components.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:36:12 -04:00
Joseph MaglyandClaude Opus 5.5 52e42cc181 feat(distributed): add transactional excise rollback
(cherry picked from commit ba6e1bb45a964dd0980b2e1440debd93cf94da45)

Ported for #244 (part 3/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
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>
2026-10-07 17:35:33 -04:00
Joseph MaglyandClaude Opus 5.5 a4fcfb004a feat(gpu): tier admission by calibration confidence
Tag each demand component calibrated or estimated. Default mode rejects
only when calibrated demand exceeds free memory and warns once per phase
and device about estimated or unmodelled overage. OBLITERATUS_PHASE_ADMISSION
gains strict (reject on the total) next to off. A data-driven matrix test
checks that default mode never rejects runs main can complete.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:30:11 -04:00
Joseph MaglyandClaude Opus 5.5 d677551ff7 fix(gsq): check the prepared digest before promotion; refuse mixed indexed layouts
- Compute the prospective prepared-tree digest from staged contents and
  refuse before writing anything when it does not match the record.
- Refuse a standalone model.safetensors beside an assembled index, even
  when the index references it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:21:01 -04:00
Joseph Magly ea31ac953b Merge remote-tracking branch 'upstream/main' into feat/248-portable-gsq 2026-10-07 17:07:09 -04:00
Joseph MaglyandClaude Opus 5.5 99d2639299 fix(gsq): require base index agreement, bind interrupted runs, require loadable layout
- Require the base weight index to reference exactly the top-level
  shards and map each key to the file that holds it; include the index
  in the launch hash set.
- Bind the single new run directory when the GSQ child is interrupted,
  recording the interruption, then re-raise.
- Require assembled output to be a single model.safetensors or an index
  covering exactly the shards present.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 17:07:09 -04:00
Joseph MaglyandClaude Opus 5.5 5c11f9d476 fix(gsq): bind runs to pre-launch inputs and keep failed-run prefixes certifiable
- Copy the pre-launch config and base-model hashes into the run binding
  and refuse to bind if either changed during training.
- Bind a single new run directory even after a non-zero exit, recording
  the exit status and completed layer, so validate --allow-partial can
  certify the prefix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:46:39 -04:00
Joseph MaglyandClaude Opus 5.5 0516260459 fix(gpu): model mixed-dtype SDPA, Mamba2 fallback and LoRA merges
Resolve attention compute dtype per projection, account for Mamba2
torch-fallback scan intermediates and the LoRA construct/merge path, and
flag Bayesian optimization as unmodelled before optimizer work.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:43:25 -04:00
Joseph MaglyandClaude Opus 5.5 a9d983b342 fix(gsq): bind runs to their launch, refuse resume, pin single-process env
- Refuse --resume; record a launch binding (config and base-model
  hashes) in the single run directory a launch creates, and require it
  when validating against a GSQ config.
- Refuse unindexed tensors inside assembled shards.
- Pin WORLD_SIZE/RANK/LOCAL_RANK for the GSQ child and drop inherited
  torch.distributed launcher variables.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:37:17 -04:00
Joseph MaglyandClaude Opus 5.5 82b9423965 fix(gsq): refuse duplicate base tensors, multi-GPU runs, and incomplete pack metadata
- Fail closed on any tensor key present in more than one base shard.
- Restrict the workflow to single-GPU runs; the pinned distributed
  Qwen3.5 lookup is not prefix-safe and is unvalidated.
- Require the assembled compressed-tensors metadata to declare the exact
  4-bit symmetric group pack container with the validated group size.
- Fail the opted-in e2e gate when the checkout variable is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:19:24 -04:00
Joseph MaglyandClaude Opus 5.5 7d012a17d3 fix(gsq): never let explicit shapes bypass base weights; fail opted-in e2e prerequisites
- Default the base model directory to the config's directory when
  weights exist there, always derive assembly shapes from base weights,
  and compare packed weight_shape with the base in the output verifier.
- Once the e2e gate is explicitly enabled, fail (not skip) on missing
  checkout, unrunnable interpreter, or failed CUDA probe; the decision
  logic is covered by CPU tests in the default gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 16:00:35 -04:00
Joseph Magly 3eca37095f Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission 2026-10-07 15:55:59 -04:00
Joseph MaglyandClaude Opus 5.5 bdad7ea6da fix(gpu): derive admission inputs from execution state
Share eligibility and selection helpers with execution, use realized
dtypes and per-batch lengths, deduplicate tied checkpoint storage, skip
unconsumed checkpoint keys, follow PyTorch's CPU SDPA dispatch, and
account for hidden-state outputs and validation-gate workspace.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:55:59 -04:00
Joseph MaglyandClaude Opus 5.5 3a39083053 fix(gsq): refuse stale outputs, orphan metadata, and shape overrides
- Require a new or empty assembly output directory and refuse weight
  files the loader could prefer over the assembled index.
- Require complete packed/scale/shape trios and an exact match between
  assembled packed modules and the validated projection set.
- Cross-check explicit projection shapes against base weights.
- Let validate --allow-partial certify genuinely interrupted runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:44:47 -04:00
Joseph MaglyandClaude Opus 5.5 4c537eb640 fix(gsq): dispatch by config type, bind config to base, reject optional quant tensors
- Dispatch llama, qwen3, and qwen3.5 models from the declared config
  model type regardless of the path name.
- Require --model-config to be the base model's own config.json and
  reject configs whose topology disagrees with the base weights;
  partial assembly requires a matching partial validation.
- Reject zero-point and group-index tensors for the symmetric packed
  container in validation and post-assembly verification.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:27:50 -04:00
Joseph MaglyandClaude Opus 5.5 0c57ed3377 fix(gpu): model effective dtypes, sliding and SDPA attention, and repair
Use the loader's effective dtype for native quantized loads, follow the
executed sliding-window cache and full-input eager prefill scores, charge
SDPA math-backend scores when that backend may run, admit repair
snapshots and workspaces before their phases, and resolve remote code
with the loader's revision, token and offline constraints.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 15:17:31 -04:00
Joseph MaglyandClaude Opus 5.5 b5b67ddf85 fix(gsq): patch Qwen3 packing, certify non-projection tensors, close prepare interrupt window
- Switch GSQ's Qwen3 dense save path to the current compressed-tensors
  packing helper, matching the Qwen3.5 patch.
- Require run-shard tensors that overwrite base weights to exist in the
  base model with matching dtype/shape and finite, non-empty contents;
  check every retained tensor in the assembled output the same way.
- Record promotion intent before os.replace so a post-rename interrupt
  is rolled back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:55:59 -04:00
Joseph MaglyandClaude Opus 5.5 011cae474c fix(gsq): bind base-model files to assembly and make prepare interrupt-safe
- Record SHA-256 of every base-model file the assembler reads or copies
  and refuse assembly if any is added, removed, or changed.
- Roll back staged adapter promotions on KeyboardInterrupt/SystemExit.
- Document --no-cov for the single conditional e2e test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:29:21 -04:00
Joseph Magly b95ec3bea6 Merge pull request #271 from jmagly/feat/244-tp2-probe-distill
feat(distributed): add experimental deterministic TP2 PROBE and DISTILL stages (2/6, #244)
2026-10-07 14:27:05 -04:00
Joseph Magly b255918e8f Merge remote-tracking branch 'upstream/main' into fix/245-phase-admission 2026-10-07 14:22:14 -04:00
Joseph MaglyandClaude Opus 5.5 7d41ad2bae fix(gpu): stop admission from rejecting runs main accepts
Charge native pre-quantized checkpoints at their stored sizes, treat
disk-offloaded weights as streaming workspace, model distillation demand
per method, apply the loader's FlashAttention fallback before admission
builds the model, and follow Falcon's executed KV-cache geometry. Paths
that cannot be modelled reject explicitly and name the opt-out.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:22:13 -04:00
Joseph MaglyandClaude Opus 5.5 1b936c1dfc feat(distributed): add deterministic probe distill stages
(cherry picked from commit f9a289e267889c297cefcdc67eea92c4b8eb8d4d)

Ported for #244 (part 2/6). Internal-only content from the archived
commit was dropped: .aiwg records and the internal security-docs test.
Marked experimental in user docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:00:29 -04:00
Joseph MaglyandClaude Opus 5.5 aa7deef652 fix(gsq): sanitize GSQ env, bind local snapshots, verify assembled ignore list
- Launch GSQ without GSQ_* / WANDB_* override variables and refuse
  configs with environment placeholders.
- Resolve models to local snapshots at config time (Hub ids require a
  revision) and require run/validate/assemble to use the same directory.
- Exclude Qwen3.5 vision and MTP modules from the assembled
  quantization ignore list, and verify every dense 2-D weight in the
  assembled output is ignored and every packed module is not.
- Enforce the assembler's 4-bit pack container width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:58:59 -04:00
Joseph MaglyandClaude Opus 5.5 f28f0a15f1 fix(snapshot): derive default staging budget from available host memory
DiskSnapshot admitted six largest-tensor copies against a fixed 1 GiB
default, so any model with a tensor over ~179 MB (e.g. a large-vocabulary
embedding) could not create a restore point regardless of free memory.

staging_bytes now defaults to None, which admits half of currently
available host memory (DEFAULT_STAGING_HOST_FRACTION). Explicit values keep
their existing hard-cap semantics, min(staging_bytes, available). Rejection
stays fail-closed and names required bytes, admitted bytes, the budget
source and the snapshot.staging_bytes / staging_bytes= knob.

Closes #269

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:58:57 -04:00
Joseph MaglyandClaude Opus 5.5 a16b246f4a fix(gpu): harden admission against review findings
Bound unrecognised integer tensors conservatively instead of rejecting
them, wait briefly for the lifecycle grant lock and report contention
explicitly, restore export preparation state when REBIRTH is rejected,
and assert every phase's real entry work in the boundary tests.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:35:02 -04:00
Joseph MaglyandClaude Opus 5.5 98d806f346 fix(gsq): bind assembly to fresh validation and certify shard contents
- Record per-file SHA-256 of consumed shards and progress.json plus the
  validation settings and GSQ config hash in the manifest; assemble
  re-verifies hashes and re-runs validation before save_model.py.
- Cross-check attention/MLP, group size, and model identity between the
  validation settings and the GSQ config.
- Require every shard key to belong to its file's layer and reject
  quantization metadata for non-target modules (e.g. lm_head).
- Require finite scales and positive recorded shapes.
- Absolutize local model paths when rendering configs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:34:48 -04:00
Joseph MaglyandClaude Opus 5.5 6a04802a4d fix(gsq): certify assembler-visible shards, tensor shapes, and run binding
- Validate exactly the shard files the pinned assembler consumes
  (layers_N filenames); reject stray or renamed shards and filename/key
  layer mismatches.
- Check packed tensor dtypes, non-empty contents, and shapes against the
  base model's projection shapes; fail closed without base weights.
- Record prepared_tree_verified only when the pin and tree digest both
  match; refuse a manifest on digest mismatch.
- Render absolute checkpoint/log/cache paths, refuse relative
  checkpoint_dir at run time, and bind assembly to the run's validated
  manifest.
- Stage adapter patches and promote them atomically with rollback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:16:17 -04:00
Joseph MaglyandClaude Opus 5.5 a8f0b7db51 fix(gpu): admit native export demand and default generation cache
Use plan_native_export/native_export_host_demand as the REBIRTH host
demand when a native plan exists and the full-model accounting
otherwise. Treat an unset generation use_cache as the model default, and
surface demand-modelling failures as phase admission errors.

Refs #245

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 13:06:33 -04:00