Commit Graph
83 Commits
Author SHA1 Message Date
Joseph Magly 31ceb7041c fix: gate GPU allocation on supervisor admission 2026-08-24 21:02:58 -04:00
Joseph Magly 4b677be612 feat: publish GPU model lifecycle events 2026-08-24 20:27:21 -04:00
Joseph Magly b8b7a12493 fix(pipeline): tolerate missing cancellation state 2026-08-24 14:36:39 -04:00
Joseph Magly ccba4f5d85 fix(surgery): guard unvalidated Qwen hybrid layouts 2026-08-24 13:54:31 -04:00
Joseph Magly d8d0a76231 fix(pipeline): fail closed on invalid output 2026-08-24 13:42:13 -04:00
Joseph Magly f354effc72 fix(ui): refresh GPU memory gauge periodically 2026-08-24 12:51:02 -04:00
Joseph Magly 8c4c68760d feat: make UI model loading configurable 2026-08-24 11:53:18 -04:00
Joseph Magly f6ee663e1b fix(device): fall back when psutil memory query fails 2026-08-23 21:48:06 -04:00
Joseph Magly 34218cf6f7 feat(models): add Qwen3.8 27B preset 2026-08-23 20:43:23 -04:00
Joseph Magly 3aaa7e563c test(ui): keep VRAM renderer dependency-light 2026-08-23 20:13:16 -04:00
Joseph Magly 5ce65e8193 fix(ui): show VRAM for every visible GPU 2026-08-23 20:06:08 -04:00
Joseph Magly cad100dd70 feat: refresh model catalog and shared-host guidance 2026-08-23 18:57:13 -04:00
Joseph Magly 6b6a0fe3d8 test(device): restore release branch coverage 2026-08-23 11:46:39 -04:00
Joseph Magly ad883cef0b feat: harden local runtime and verification 2026-08-23 11:16:10 -04:00
Joseph Magly 3390fe551b feat(secrets): add provider-neutral credential hooks 2026-08-22 10:02:49 -04:00
Joseph Magly 3c0f83ac4b feat: add Mistral 3 and 4 architecture contracts 2026-08-21 18:55:10 -04:00
Joseph Magly 306d12c925 fix(abliteration): propagate offload integrity failures 2026-08-21 18:39:07 -04:00
Joseph Magly d1c0ee664d feat(abliteration): support safe offloaded weight surgery 2026-08-21 18:36:18 -04:00
Joseph Magly cf2b5ae869 test: cover single-prompt flattened routing 2026-08-21 14:43:00 -04:00
Joseph Magly f2446f68a7 fix: preserve per-prompt MoE router observations 2026-08-21 14:33:13 -04:00
Joseph Magly b746a87a00 fix: harden checkpoint blending contracts 2026-08-21 12:12:14 -04:00
faber 17f1d5eb59 feat: add complementary abliteration blending
Carry the coherent blending contribution and research summary from PR #127 while splitting the capacity and recovery proposals into issues #132 and #133.
2026-08-21 11:58:11 -04:00
faber 522b2111dc capability-check CLI + risk map 2026-08-19 22:25:38 -04:00
faber cd09c259c0 restore-multimodal CLI + risk map 2026-08-19 21:06:06 -04:00
faber 482dfed8c0 2026-08-19 11:33:45 -04:00
Joseph Magly b25b3f3b66 fix: harden quantized checkpoint integration 2026-08-16 12:57:17 -04:00
Brian Bell 62b006f6c4 feat: FP8 and NVFP4 checkpoint support (dequantize, surgery in float, BF16 output)
Point obliteratus at an FP8 or NVFP4 checkpoint and it just works:
the loader detects the format from config.json + safetensors metadata
(no weight loads), dequantizes shard-by-shard to a temporary BF16 copy,
then runs the normal float pipeline and saves BF16.

Supported layouts:
- FP8 DeepSeek-style block-wise (weight_scale_inv + weight_block_size)
- FP8 per-channel / per-tensor (compressed-tensors, ModelOpt)
- NVFP4 ModelOpt (uint8 nibbles + FP8 group scales + FP32 global),
  including MIXED_PRECISION checkpoints (FP8 mixer + NVFP4 experts)
- NVFP4 compressed-tensors (reciprocal scales)

Design:
- New pure-torch obliteratus/models/quant_dequant.py; no new deps.
  NVFP4 unpack uses torch.float4_e2m1fn_x2 when a runtime probe proves
  it works, else a chunked nibble LUT (bounds transient int64 index
  memory; a naive implementation OOMed at 96GB on a 30B model).
- Scale keys are dropped only when their base weight exists in the
  same shard, so legitimate params ending in _scale (logit_scale et al.)
  survive.
- Unsupported schemes (fbgemm, quanto, W4A4, ...) fail loudly at load,
  naming the scheme.
- Surgery guards: float8 or packed uint8 reaching _dequantize_weight or
  any fused-MoE path raises RuntimeError instead of silently upcasting
  (bitsandbytes quant_state params are explicitly excluded).
- Save path strips quantization metadata and logs that output is BF16;
  re-quantization for serving is out of scope (llm-compressor/modelopt).
- CLI: new --trust-remote-code flag; help text documents auto-detection.

Validated end-to-end on 1x A100-80GB (see PR description):
Nemotron-3-Nano-Omni-30B NVFP4 (mixed) and FP8, Qwen3-8B-FP8
(block-wise) vs Qwen3-8B BF16 baseline (perplexity 4.23 vs 4.33).
2026-08-16 12:11:07 -04:00
Brian Bell 84b97f6620 compat: transformers 5.x + custom-architecture loader shims, nemotron_h support
Loading custom-architecture checkpoints (Nemotron Omni family) against
transformers 5.14 surfaced API drift and wrapper mismatches:

- flash_attention_2 pinned in config but flash-attn not installed:
  recursively fall back to eager attention, incl. nested sub-configs
  (multimodal llm_config).
- all_tied_weights_keys shim: expected by the accelerate device-map
  integration and assigned by 5.x post_init, but absent on older remote
  code. Settable property aggregating legacy _tied_weights_keys,
  filtering keys that don't resolve on multimodal wrappers.
- prepare_inputs_for_generation: 5.x may pass cache_position=None;
  older remote code assumes a tensor. Wrap and synthesize it.
- Legacy list-style _tied_weights_keys normalized post-load so
  save_pretrained works (emptied when tie_word_embeddings is false).
- Multimodal wrappers whose forward() requires media inputs are
  unwrapped to their language_model submodule for text-only surgery.
- Register nemotron_h architecture (hybrid Mamba/attention/MoE, all
  layer content under layer.mixer) in strategies/utils.py.
2026-08-16 12:09:36 -04:00
Joseph Magly acc6b3b254 test: close Gate 3 tiny-runtime semantics 2026-08-16 07:53:00 -04:00
Joseph Magly d299deb3a3 fix: contain Watchtower result downloads 2026-08-16 06:18:45 -04:00
Joseph Magly bb84e55f77 test: cover tournament and operator UI contracts 2026-08-16 06:18:45 -04:00
Joseph Magly a1ec50ff77 fix: serialize watchtower state saves 2026-08-16 03:06:46 -04:00
Joseph Magly 4026a6a118 test: close service boundary gaps 2026-08-16 03:06:46 -04:00
Joseph Magly a377ceefbd test: add service orchestration contracts 2026-08-16 03:06:46 -04:00
Joseph Magly 3d2285be86 fix: use flushable checkpoint handles on Windows 2026-08-16 00:28:15 -04:00
Joseph Magly c74538a2be test: harden checkpoint transaction reliability 2026-08-16 00:28:15 -04:00
Joseph Magly 41cb341405 test: close runtime decision mutation gaps 2026-08-15 22:03:22 -04:00
Joseph Magly 10685a53c2 test: enforce loader and weight decision contracts 2026-08-15 22:03:22 -04:00
Joseph Magly 51529ad1d7 test: add Gate 3 numerical oracle contracts 2026-08-15 20:09:21 -04:00
Rachitt Shah 6c21ee243d Add a POSIX sysconf fallback for local RAM detection
Retain the unsuperseded macOS RAM-detection contribution from PR #13 while making every optional probe fail closed. The shared MPS device, loader, cache, and dtype work is already present on current main and is intentionally not duplicated.
2026-08-15 03:31:17 -04:00
Roxue88 f82518ea13 Make local console and runtime paths portable
Salvage the still-relevant functional work from PR #48: add non-UTF-8 console fallbacks, use platform temporary directories, make pipeline log output encoding-safe, and defer heavyweight analysis imports. The obsolete contributed CI workflow and already-corrected remote URL are intentionally excluded.
2026-08-15 03:13:27 -04:00
Joseph Magly c642cb3297 test: harden GPU memory utilization contract 2026-08-15 02:47:28 -04:00
Aaron Meese 67d9ef79d9 feat: add --gpu-memory-utilization CLI flag
Add a --gpu-memory-utilization flag (0.0-1.0, default 0.85) that controls
the fraction of GPU VRAM available for model loading. Plumbed from CLI
through AbliterationPipeline to load_model's max_memory calculation.

Useful on dedicated GPU setups where the default 15% reserve is wasteful
and causes unnecessary CPU offloading on models that would otherwise fit.
2026-08-15 02:47:28 -04:00
Joseph Magly 37d008d462 test: establish Gate 1 quality baseline (#90)
Establishes the mandatory testing, coverage, repeatability, mutation, packaging, supply-chain, and AIWG workspace baseline before feature integration.
2026-08-15 01:07:47 -04:00
Joseph Magly 62a480fd6a Harden remote execution contracts and tests 2026-08-15 00:13:26 -04:00
Joseph Magly 1240bf2adb test: enforce transactional persistence contracts 2026-08-14 23:32:30 -04:00
Joseph Magly 2c5dc5442c test: enforce runtime boundary contracts 2026-08-14 22:50:37 -04:00
Joseph Magly c14efe8aca test: enforce whitened direction contracts 2026-08-14 22:09:25 -04:00
Joseph Magly 340173e203 test: harden quantized model loading 2026-08-14 20:31:50 -04:00
Jpatching e922126405 fix: enable 4-bit quantized models on single 16GB GPUs
Four bugs prevented bitsandbytes 4-bit quantized models from completing
ablation studies on GPUs with 16GB VRAM:

1. runner.py: quantization parameter was never passed from StudyConfig
   to load_model(), so the loader had no idea quantization was enabled.

2. loader.py (max_memory): GPU memory budget was calculated against the
   unquantized model size, causing accelerate to offload layers to meta
   device even though the quantized model fits comfortably.
   Now divides estimate by 4 (4-bit) or 2 (8-bit) before deciding.

3. evaluator.py: empty strings in wikitext dataset caused zero-length
   tensors that crashed the forward pass with a reshape error.
   Now filters empty/whitespace-only texts and skips empty batches.

4. loader.py (snapshot/restore): snapshot skip decision used unquantized
   size estimate, and restore used strict=True which rejects bitsandbytes
   metadata keys (.absmax, .quant_map, .quant_state). Now uses quantized
   estimate and strict=False.

Tested on RTX 5060 Ti (16GB) with Qwen2.5-Coder-7B-Instruct in 4-bit.
Quick Scan (layer_removal + ffn_ablation) completes all 56 specs.
2026-08-14 20:31:50 -04:00