Commit Graph
45 Commits
Author SHA1 Message Date
Raja Mukerji 2d31d64857 fix(bayesian): surface skipped optimization and clamp warm start to search space 2026-09-07 00:36:39 -07:00
Joseph Magly 985c9e9363 feat: add safe distributed checkpoint intake and preflight 2026-09-04 19:43:53 -04:00
Pliny the YoungerandClaude Fable 5.1 89b63ce216 feat(abliteration): update offloaded fused MoE expert tensors in place (#115)
transformers 5 stores routed experts as fused 3D parameters
(experts.gate_up_proj / experts.down_proj) for Mixtral, Qwen3-MoE,
DeepSeek-V3, GLM-4 MoE, Llama 4, gpt-oss and OLMoE. When such a layer is
CPU- or disk-offloaded by Accelerate, EXCISE failed closed with
"offloaded fused expert tensors are not yet a supported surgery layout",
so every frontier MoE checkpoint large enough to need offload could not be
abliterated at all.

Route the three fused projections and the fused bias projection through the
existing LogicalParameterTransaction adapter: a meta-resident fused
parameter is resolved to a private copy of its authoritative backing value,
projected per expert, and committed atomically; the live parameter stays on
meta and quantized or unknown backing layouts still fail before mutation.
Thread offload_roots through the MoE dispatch call sites so parent-prefixed
Accelerate hooks resolve, and drop the preflight rejection of 3D meta
parameters (validate_offloaded_parameters already resolves them).

Tests: fused 3D, bias, granular and selective-inversion projections on
offloaded backing stores, bounded norm restoration, parent-prefixed hook
resolution, quantized fail-closed, commit-failure rollback, and a full
offline pipeline run on a disk-offloaded tiny Mixtral fixture that verifies
the saved checkpoint carries the updated experts with no meta tensors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 11:54:14 -04:00
Joseph Magly 95c0cd606d fix(eval): score full anchored completions 2026-08-29 19:00:51 -04:00
Joseph Magly 4b737cba64 feat(qwen38): add E03 coherence recovery candidate 2026-08-29 18:45:57 -04:00
Joseph Magly 941869d909 feat: add tune-only Qwen3.8 E02 candidate (#185) 2026-08-29 03:54:53 -04:00
Joseph Magly 9e149bf656 feat: add held-out Qwen3.8 experiment protocol (#185) 2026-08-29 00:17:41 -04:00
Joseph Magly 41654bdcdf fix: make spectral evidence fail inconclusive (#183) 2026-08-28 23:25:14 -04:00
Joseph Magly 1f428f60cf fix: make KL optimization measured and reversible (#182) 2026-08-28 23:11:26 -04:00
Joseph Magly 44f7842c9c fix(qwen): preserve validated runtime on checkpoint reload 2026-08-27 20:12:43 -04:00
Joseph Magly 270db39e27 fix(qwen): preserve checkpoint multi-EOS stops 2026-08-26 23:45:01 -04:00
Joseph Magly 5aa11828a1 feat(surgery): add validated Qwen3.8 output-writer contract 2026-08-26 22:32:14 -04:00
Joseph Magly 1c6c7a47ca fix(validation): use chat contract for deterministic probes 2026-08-26 22:20:09 -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 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 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
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
Joseph Magly acc6b3b254 test: close Gate 3 tiny-runtime semantics 2026-08-16 07:53:00 -04:00
Joseph Magly c74538a2be test: harden checkpoint transaction reliability 2026-08-16 00:28:15 -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
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 1240bf2adb test: enforce transactional persistence contracts 2026-08-14 23:32:30 -04:00
Joseph Magly 18c910b529 test: validate refusal token limits 2026-08-14 20:03:46 -04:00
Tokard 44473e5919 add configured max tokens for refusal test generation. Exposes --refusal-max-tokens via CLI and the abliterator constructor (default to 128, not changed). Better for resoning models like qwen3. :> 2026-08-14 20:03:46 -04:00
Joseph Magly 8bbb5f2926 test: add offline integration baseline 2026-08-14 13:15:32 -04:00
Aaron Meese e1a0fe59f0 fix: REBIRTH save crash for CPU-offloaded models
Replace the manual safetensors/dat file materialization in
_gather_state_dict with accelerate's get_state_dict_offloaded_model().
The old code only handled disk-offloaded weights but failed for the 398
CPU-offloaded meta tensors managed by accelerate's AlignDevicesHook.

Pre-move all GPU tensors to CPU before materialization to prevent CUDA
OOM when align_module_device restores non-hooked params to CUDA during
its __exit__ cleanup.

Update test to verify the safety net catches unmaterialized meta tensors
after the accelerate path (the old test checked for a missing offload
directory, which this codepath no longer uses).
2026-08-14 10:22:48 -04:00
Joseph Magly 13b13ef973 Make spectral certification sample-aware 2026-08-14 10:17:48 -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 526cfb8943 Add files via upload 2026-03-08 13:02:53 -07:00
pliny 69fa63ac43 Add files via upload 2026-03-08 12:07:56 -07:00
pliny ece134f870 Add files via upload 2026-03-07 17:53:42 -08:00
pliny 984ce14059 Add files via upload 2026-03-05 10:03:46 -08:00
pliny 66ea4a6f86 Add files via upload 2026-03-05 00:50:44 -08:00
pliny 0f6114fe87 Add files via upload 2026-03-04 12:38:18 -08:00