Commit Graph
29 Commits
Author SHA1 Message Date
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
Joseph Magly c90240f1e9 test: govern unavailable conditional environments 2026-08-16 09:05:41 -04:00
Joseph Magly acc6b3b254 test: close Gate 3 tiny-runtime semantics 2026-08-16 07:53:00 -04:00
Joseph Magly bb84e55f77 test: cover tournament and operator UI contracts 2026-08-16 06:18:45 -04:00
Joseph Magly 3574800094 ci: enforce Ruff across all scripts 2026-08-16 03:49:09 -04:00
Joseph Magly a377ceefbd test: add service orchestration contracts 2026-08-16 03:06:46 -04:00
Joseph Magly c74538a2be test: harden checkpoint transaction reliability 2026-08-16 00:28:15 -04:00
Joseph Magly 51529ad1d7 test: add Gate 3 numerical oracle contracts 2026-08-15 20:09:21 -04:00
Joseph Magly 753c53d07f Enforce Gate 3 test quality budgets 2026-08-15 04:33:15 -04:00
Joseph Magly fa99d5a424 fix: bound conditional evidence waivers 2026-08-15 02:00:50 -04:00
Joseph Magly ba749c68b9 test: enforce gate 2 coverage and vertical contracts 2026-08-15 02:00:50 -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 7d0c02cd34 ci: expand and raise mutation gate 2026-08-14 22:09:25 -04:00
Joseph Magly 7a2a49b435 test: constrain risk overlays to measured coverage 2026-08-14 21:19:38 -04:00
Joseph Magly 53b37108af test: require exhaustive contract ownership 2026-08-14 21:19:38 -04:00
Joseph Magly 9746c21b63 test: enforce Wave A quality lock 2026-08-14 19:47:46 -04:00
Joseph Magly c1a1275291 ci: add conditional environment test gates 2026-08-14 14:29:14 -04:00
Joseph Magly 951700a285 test: add quality-depth gates and mature CPU coverage 2026-08-14 14:08:23 -04:00
Joseph Magly 6add02edd0 test: enforce model and CLI boundary contracts 2026-08-14 12:51:09 -04:00
Joseph Magly e7b658c0c8 ci: add reproducible supply-chain gates 2026-08-14 12:27:15 -04:00
Joseph Magly d5a02bd748 test: reject malformed coverage metrics 2026-08-14 11:44:12 -04:00
Joseph Magly 66c47249df ci: add strict test evidence gates 2026-08-14 11:44:12 -04:00
Joseph Magly 548092d5ca ci: establish green validation baseline (#59) 2026-08-14 09:55:49 -04:00
faberandClaude Opus 4.6 04b8ec60cb Add ASPA framework, AutoObliterator, Watchtower, expanded eval corpus
New core modules:
- auto_obliterate.py: Automated multi-iteration obliteration pipeline
- watchtower.py: HF Hub model discovery and tracking
- ui_watchtower.py: Gradio tabs for Watchtower (ready for app.py wiring)
- hard_negative.py: Residue mining from refusal audits
- model_profile.py: Parameter profiling from safetensors/config
- bestiary_sync.py: Sync models from PlinyOS BESTIARY registry
- models_client.py: Lightweight HF model list client

Framework enhancements:
- abliterate.py: ASPA source-tethering, step gradient blending, hard-negative residue support
- cli.py: self-improve command, model profiling, hard-negative flags
- prompts.py: Expanded 842-prompt refusal eval corpus across 10 categories
- __init__.py: New exports (Watchtower, AutoObliterator)

Reference implementations (14 scripts):
- ASPA sweep, gradient search, coherence eval, MMLU benchmarks
- Pareto controller, refusal sniper, stock comparisons

Documentation:
- README: Research framing, responsible use section, comprehensive disclaimer
- docs/beyond_sota_roadmap.md, docs/recursive_self_improvement.md

Tests: 4 new test files (354 lines)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 03:54:38 -04:00
pliny 26e1c5b13b Add files via upload 2026-03-08 12:09:27 -07:00
pliny 984ce14059 Add files via upload 2026-03-05 10:03:46 -08:00
pliny 0f6114fe87 Add files via upload 2026-03-04 12:38:18 -08:00