Repository navigation
Add PAN2 quantization metaharness, Vast GPU trials and Rust WSP workflow - #20
Merged
Merged
Conversation
…N 2 simulated-rollout provider, merged in #19) Co-Authored-By: claude-flow <ruv@ruv.net>
…ness (six variants, measured peaks, rollback verified) Co-Authored-By: claude-flow <ruv@ruv.net>
ruvnet
marked this pull request as ready for review
November 12, 2026 13:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an optional PAN2 GPU experiment kit and quantization metaharness under tools/pan2-vast. A separately operated Vast machine can now run original and WSP edited checkpoints at BF16, INT8 and INT4, including quantized only trials on hardware that cannot fit the BF16 control. This follows the physical hypothesis adapter merged in #18.
The metaharness schedules six unique variants rather than two matrices with eight launches, shuffles order with a fixed seed, binds checkpoint and workload identity, reserves estimated runtime cost before launch, kills timed out worker process groups, stops on failure and verifies source integrity. Resume reuses only completed trials with unchanged plan, inputs, trial and video hashes. Actual billed cost and output bound reviews drive a paired decision: at least 30% lower cost per accepted output, zero additional critical failures and a conservative quality regression bound. Insufficient samples return inconclusive. Local estimates do not cap an independently billing rental; operator supplied invoices, reviews and receipts are not remote attestations.
Quantization targets native raw block matrices using INT8 or packed INT4 storage with dense BF16 reconstruction for existing fused kernels. Packed values and scales are now preallocated in chunks, and target discovery releases original matrix references after conversion. This removes concatenation copies and unnecessary source retention. Six rather than eight launches removes 25% of scheduled jobs, not a measured 25% speed or cost improvement. Worker receipts separate checkpoint loading, CPU quantization, synchronized full pipeline time, total time, allocator memory peaks and host RSS. Strict packed Safetensors export and reload remain available.
Includes pinned PAN2 setup and conversion, explicit model downloads, the pinned Rust ruv-FANN WSP editor, source hash checks and exact rollback instructions, a bounded example config, CPU CI, cost plan, usage guide, new ADR 208 and an ADR 207 boundary update. No weights or generated videos are committed.
Validation: 14 tests passed in clean GitHub CPU CI on the final implementation commit 0d726fe, with torch 2.11.0+cpu, safetensors 0.8.0 and explicitly declared NumPy. Thirteen tests also passed together on ruOS. Eight metaharness tests cover quantized only scheduling, budget refusal, worker failure and timeout cleanup, immutable input and cached artifact checks, a paired 100 case cost and quality fixture, critical failure and expensive candidate rejection, small sample inconclusiveness, and offline encoder revision mismatch rejection. Python compilation and shell syntax passed. All eight metaharness tests passed again locally after the final source and encoder checks.
Draft pending the user's real GPU run. Full native PAN2 CUDA compatibility, VRAM fit, peak CPU savings, inference speed and dollar savings remain unmeasured. NVML total device memory, independent hardware inventory, exact WSP rollback evidence, actual invoices and blinded quality review remain required. The controller never promotes a model; physical promotion is always false pending calibrated extraction and ground truth. No observed graph mutation, actuator, public endpoint or rental provisioning path is added.
Start with tools/pan2-vast/METAHARNESS.md. Acceptance is reproducible held out evidence with at least 30% lower actual cost per accepted output, the quality bound satisfied, independent hardware and integrity gates passing, and canonical BF16 rollback retained.
Implementation and decision: ADR 208. Reproducible usage: quantization metaharness. The encoder cache is now checked against its declared snapshot before inference. Clean CPU CI: https://github.com/ruvnet/worldgraph/actions/runs/43137014166.
USD 200 execution authorization: the user authorized a GPU E2E run with a USD 200 total ceiling. Added the budget200 template, read only Vast admission check and execution record. The preflight actually ran on Software Factory and exited 2 before any Vast API call because VAST_API_KEY was absent from the execution environment despite its name being present in the ruOS vault. No instance was rented or changed; new Vast spend initiated is USD 0, existing billing unknown. GPU E2E has not started. Existing key injection into Software Factory, authorized SSH access, actual instance pricing and a verified billing/lifecycle stop remain admission prerequisites. Four new local CPU tests pass for credential refusal, sanitized inventory, redirect refusal and nonleaking errors. The budget ceiling remains authorized and is not being requested again.