Commit Graph
23 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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 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 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 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 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 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 d9d42e8a1d fix(gsq): drop dotenv overrides and verify assembled output contents
- Remove GSQ's load_dotenv() call so a .env file cannot re-inject
  override variables after the launcher sanitizes the environment.
- Read base-model shapes from the same top-level safetensors files the
  assembler reads, and fail closed when the index points elsewhere.
- Open the assembled shards to check every packed, scale, and shape
  tensor, and require every retained base tensor in the output.
- Detect Qwen3.5 linear attention from the declared model type when
  layer_types is omitted, so MLP-only assembly ignores it correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 14:17:48 -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 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 786eb98b14 fix(gsq): tighten validator prefix and topology certification
- Absolutize interpreter paths containing a separator (./python) without
  following symlinks.
- Reject MoE model types even when layer_types is supplied.
- Derive Qwen3.5 layer_types from the merged text_config scope.
- Match the adapter's prefix choice when both layouts exist.
- Require --module-prefix when no base-model weights are available
  instead of guessing from config nesting.
- Document dispatch and topology limitations.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:40:36 -04:00
Joseph MaglyandClaude Opus 5.5 10bb04c891 fix(gsq): close review gaps in adapter, coverage, and numerics guard
- Resolve checkout, config, interpreter, and output paths before
  launching GSQ so relative invocations work from any directory.
- Pass the resolved run directory to save_model.py (--run-dir) and
  refuse partial assembly before any output is written.
- Dispatch Qwen3.5 dense models from the declared config model type,
  falling back to name dispatch when the config cannot load.
- Verify complete per-file patch states in memory before writing; a
  half-applied tree fails closed.
- Certify only dense and Qwen3.5/3.8 hybrid topologies; reject MoE and
  mlp_only_layers configs; derive missing layer_types from
  full_attention_interval; detect the tensor prefix from checkpoint keys.
- Check finiteness after damping and of the Cholesky factor.
- Reject malformed or empty topology input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 12:00:39 -04:00
Joseph MaglyandClaude Opus 5.5 e9a6a43c36 feat(gsq): add portable 2-bit GSQ quantization workflow
Add obliteratus.gsq: a pinned external GSQ source record (repository,
commit, prepared-tree SHA-256, calibration dataset revision), a
fail-closed textual adapter, a generic projection-coverage validator
(Qwen3.5/3.8 hybrid linear attention including in_proj_a/in_proj_b;
Qwen3.8 resolves to 496 projections), a standalone finite-Hessian /
damping / Cholesky-diagnostic guard that runs verbatim inside GSQ, and a
plain-environment fetch/prepare/config/run/validate/assemble CLI.

Rendered configs use num_workers 0 and keep activation capture in RAM;
the adapter asserts every capture batch was filled. No deployment
services, launcher identities, or GPU brokers are involved.

CPU tests cover coverage rejection and non-finite Hessian failure; a
gpu/download/slow conditional gate runs Qwen3.5-0.8B end to end.

Closes #248

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