mirror of
https://github.com/elder-plinius/OBLITERATUS.git
synced 2026-12-05 02:24:12 +01:00
The hybrid surgery contract accepted only the Qwen3.8-27B text backbone (48/16 layers, hidden 5120). It now validates any dense qwen3_5_text backbone, deriving the expected residual-writer shapes from the model's own text_config (linear_attn.out_proj, self_attn.o_proj, mlp.down_proj) and keeping every fail-closed check: no MoE config or modules, a repeating linear/full pattern consistent with full_attention_interval, a layer count matching layer_types, no writer biases, and Linear writers whose shapes match the config. The CUDA fast-path and pristine-logit requirements are unchanged, tied embeddings follow the existing tied-head rules, and the validated topology is recorded in metadata. The old 27B entry point remains as a compatible wrapper. Fixes #583
365 lines
21 KiB
Markdown
365 lines
21 KiB
Markdown
# Conditional test operations
|
|
|
|
The mandatory pull-request workflow remains CPU-only, offline, and credential-free.
|
|
Environment-bound contracts run through `Conditional tests` on manual dispatch,
|
|
weekly at 06:17 UTC Sunday, and for published releases. OBLITERATUS maintainers own
|
|
the workflow, policy, runner labels, credentials, and evidence review.
|
|
|
|
The canonical machine-readable policy is `ci/conditional-test-policy.json`. It maps
|
|
every environment-bound mature-coverage exclusion to a runnable gate, defines the
|
|
pinned tiny model, records prerequisites and expected cost, retains evidence for 30
|
|
days, and treats evidence older than eight days as stale. Every workflow run publishes
|
|
a summary showing selected, successful, failed, and not-selected/no-fresh-evidence
|
|
gates.
|
|
|
|
For a release, maintainers run the applicable hosted software gates manually against
|
|
the exact signed tag before publication. Publishing the release triggers the same
|
|
workflow again, and that release-event run is retained as the final freshness record.
|
|
Unselected hardware or credential-bound jobs remain explicit non-evidence. See
|
|
[`RELEASE_PROCESS.md`](RELEASE_PROCESS.md) for their place in the release sequence.
|
|
|
|
A tag-free readiness rehearsal can instead select a fixed branch commit and pass
|
|
its full SHA through the `candidate_sha` input. The workflow ref and that expected
|
|
SHA must agree. Retain the run ID, attempt and selected-gate summary, and keep
|
|
unavailable hardware gates pending with their tracking issues and blocked claims.
|
|
This does not create a release or turn unselected gates into passing evidence.
|
|
|
|
Unavailable hardware or credential-bound gates may use a committed environment
|
|
waiver for at most 30 days. Each waiver names one gate, a canonical tracking issue,
|
|
the reason, its opening and expiry dates, and the support claim it blocks. Invalid,
|
|
duplicate, future-dated, overlong, or expired waivers fail the policy job. The current
|
|
waivers are tracked by [issue #110](https://github.com/elder-plinius/OBLITERATUS/issues/110)
|
|
and expire on 2026-11-16; they are not evidence that any waived backend works.
|
|
They block support, compatibility, correctness, and performance claims for the
|
|
waived environment.
|
|
|
|
The current accelerator waivers cover missing GitHub runner registration, not
|
|
missing hardware. Titan has an RTX 4090 behind Gitea runners, and Mutsu is a 16 GB
|
|
Apple M4 builder. Exact-head operator probes may be attached to issue #110, but
|
|
they do not make the scheduled GitHub lanes runnable or establish a broad backend
|
|
support claim.
|
|
|
|
### November 2026 waiver renewal
|
|
|
|
The five no-support waivers are renewed from 2026-11-16 through 2026-11-30,
|
|
within the 30-day maximum, on the day the October renewal expired. Review and
|
|
merge of the PR is the renewal decision; issue #110 remains open.
|
|
|
|
Runner state is unchanged since the October renewal: no GitHub self-hosted
|
|
CUDA, bitsandbytes, MPS, MLX, or remote lane is registered or selectable, and no
|
|
gate-enabling repository variables or remote-lane secrets are configured. Ad hoc
|
|
operator runs on local hardware do not establish scheduled coverage or validate
|
|
Apple and remote environments, so the reasons and blocked claims are preserved
|
|
unchanged.
|
|
|
|
Before 2026-11-30, maintainers must configure and verify the affected lanes or
|
|
review another bounded renewal. Real-clock policy checks still reject expired
|
|
waivers. Structural unit tests use explicit dates so unrelated assertions do not
|
|
change with the calendar; separate tests assert that expired waivers fail closed.
|
|
No coverage thresholds, gate-selection requirements, or evidence-freshness rules
|
|
are relaxed by this renewal.
|
|
|
|
## Hosted gates
|
|
|
|
The model gate downloads only
|
|
`hf-internal-testing/tiny-random-gpt2@71034c5d8bde858ff824298bdedc65515b97d2b9`
|
|
with `trust_remote_code=False`. Its cache key includes the model revision, Python
|
|
version, and runner OS. The gate performs a forward pass, reopens the cache with Hub
|
|
and Transformers offline modes enabled, asserts an uncached model fails offline, and
|
|
runs the evaluator on two tiny samples. Its timeout is 25 minutes and its expected
|
|
download is below 100 MB.
|
|
|
|
The network-service gate uses a disposable loopback HTTP server and no credentials.
|
|
The operator-UI gate installs the locked `spaces` extra and constructs the Gradio
|
|
application without launching a listener. It collects every `operator_ui`-marked
|
|
test under `tests/`, including app model lifecycle tests outside `tests/conditional/`.
|
|
An empty selection, skipped test, or failing lifecycle test fails the gate.
|
|
These gates cost less than ten hosted
|
|
runner-minutes each under normal conditions.
|
|
|
|
Run the same probes locally with:
|
|
|
|
```bash
|
|
uv sync --locked --extra dev
|
|
uv run --extra dev python scripts/run_conditional_gate.py model-download-runtime
|
|
uv run --extra dev python scripts/run_conditional_gate.py external-evaluation
|
|
uv run --extra dev python scripts/run_conditional_gate.py network-services
|
|
|
|
CAUSAL_CONV1D_SKIP_CUDA_BUILD=TRUE uv sync --locked --all-extras --no-cache
|
|
uv run --no-sync python scripts/run_conditional_gate.py operator-ui
|
|
```
|
|
|
|
Hosted runners have no CUDA toolkit, so the operator-UI gate and the release
|
|
supply-chain job install `causal-conv1d` (from the `qwen-hybrid` extra) with
|
|
`CAUSAL_CONV1D_SKIP_CUDA_BUILD=TRUE`. That install has no CUDA kernels, but it
|
|
keeps the extra in the environment and in the release license inventory. Use
|
|
`--no-cache` locally so the kernel-free wheel is not reused by a later CUDA install. Hosted gates reject any skipped test, so operator-only checks such as the
|
|
Qwen3.8-27B BF16 regression (`tests/conditional/test_qwen38_runtime.py`,
|
|
`OBLITERATUS_QWEN38_E2E=1` on a GPU with at least 80 GiB) and the pinned
|
|
numeric geometry preservation campaign
|
|
(`tests/conditional/test_numeric_geometry_pretrained.py`,
|
|
`OBLITERATUS_NUMERIC_GEOMETRY_E2E=1` plus campaign and preregistration files with
|
|
pinned revisions and gated-model access) live outside the hosted gate files.
|
|
|
|
## CUDA and bitsandbytes
|
|
|
|
Attach a dedicated runner with the labels `self-hosted`, `linux`, `x64`, and `cuda`.
|
|
Set the repository variable `ENABLE_CUDA_GATE=true` for scheduled/release evidence,
|
|
or select CUDA during manual dispatch. The gate verifies CUDA discovery, automatic
|
|
selection, dtype selection, tensor placement, matrix multiplication, bitsandbytes
|
|
availability, NF4 quantization, dequantization, shape, placement, and finite output.
|
|
The expected cost is below 20 self-hosted runner-minutes. Mandatory Linux CI
|
|
deliberately locks CPU-only Torch. The selected CUDA job reads that exact locked
|
|
base version, replaces only Torch with the same-version official `cu130` build,
|
|
asserts a CUDA build was installed, and runs `uv pip check` before executing the
|
|
probes.
|
|
|
|
For an operator run on the labeled machine:
|
|
|
|
```bash
|
|
uv sync --locked --extra dev --extra recovery --extra quantization
|
|
CUDA_TORCH_VERSION="$(.venv/bin/python -c \
|
|
'import torch; print(torch.__version__.split("+", 1)[0])')"
|
|
UV_TORCH_BACKEND=cu130 uv pip install --python .venv/bin/python \
|
|
--reinstall-package torch "torch==$CUDA_TORCH_VERSION"
|
|
uv pip check --python .venv/bin/python
|
|
.venv/bin/python scripts/run_conditional_gate.py cuda-runtime
|
|
.venv/bin/python scripts/run_conditional_gate.py bitsandbytes-runtime
|
|
```
|
|
|
|
### Ordinary complete-module GPU qualification
|
|
|
|
The manual `module-placement-gpu` gate exercises the ordinary non-TP lifecycle
|
|
on every requested GPU, then exits the editing process before a separate reload
|
|
worker verifies the saved checkpoint. Select `run_module_gpu`, `module_gpu_count`
|
|
(1, 2, or 3+), and optional `module_gpu_offload` on trusted manual dispatch. The
|
|
job uses the locked CUDA dependency setup and retains evidence for 30 days.
|
|
Missing hardware, empty requested-device occupancy, skipped diagnostics and
|
|
reload failures fail the selected attempt. It is excluded from default CPU CI.
|
|
|
|
The portable [qualification driver](gpu-qualification.md) also supports explicit
|
|
UUID subsets, observed NVLink/PCIe topology, local staged models, per-device
|
|
ceilings, strict/fail-closed admission, reference comparisons and CPU/meta
|
|
rehearsal. Tiny fixtures establish lifecycle wiring for their exact recorded
|
|
workload; representative capacity and hardware acceptance need retained runs.
|
|
|
|
### EXPERIMENTAL two-GPU Llama tensor-parallel qualification
|
|
|
|
The `llama-tp-local-gpu` gate is separate from the generic CUDA probe. It is a
|
|
trusted manual gate for exactly two homogeneous CUDA GPUs with native BF16,
|
|
a Gloo control plane, and an NCCL tensor-parallel data plane. It builds the
|
|
repository-owned deterministic tiny Llama fixture locally; it does not download
|
|
a model, execute remote code, or use `device_map`.
|
|
|
|
The runner must supply an immutable image digest and a local CUDA Torch wheel
|
|
whose SHA-256 digest is configured independently. Independent expected digests
|
|
also bind the installed critical-package tree, complete runtime inventory, and
|
|
the exact native-TP APIs/plan implementation; version strings are not accepted
|
|
as substitutes. The workflow verifies the exact signed candidate and installs
|
|
the hash-verified wheel over the locked dependency environment before running
|
|
the gate. Retained evidence binds the candidate, runtime, image, source,
|
|
configuration, tokenizer, model, immutable reference, plan, and
|
|
parameter-manifest digests. It records preregistered logit/activation tolerances,
|
|
exact greedy-token equality, complete replicated layer-boundary results,
|
|
rank-zero PROBE/DISTILL agreement, transactional EXCISE comparison against
|
|
complete logical tensors followed by exact rollback, and a distinct
|
|
fresh-identity attempt through collective VERIFY, journal cleanup, bounded
|
|
canonical safetensors export, independent non-distributed semantic reload, and
|
|
atomic publication evidence;
|
|
it must not retain prompts, token IDs, logits, activations, device UUIDs, or
|
|
filesystem paths.
|
|
|
|
The conditional policy records `llama_tp_local_gpu` as `not_qualified`.
|
|
Unselected or unavailable execution is explicit noncoverage and cannot support
|
|
a native tensor-parallel compatibility or distributed-export claim. CPU/Gloo
|
|
tests exercise the protocol only and are not accelerator evidence.
|
|
|
|
### Qwen3.5/Qwen3.8 hybrid runtime
|
|
|
|
The Qwen3.5/Qwen3.8 Gated DeltaNet path requires both FLA and causal-conv1d.
|
|
Install the optional extra only after selecting the CUDA build of PyTorch:
|
|
|
|
```bash
|
|
CUDA_HOME=/usr/local/cuda uv sync --locked --extra dev --extra qwen-hybrid
|
|
.venv/bin/python -c 'import torch, fla, causal_conv1d; print(torch.__version__)'
|
|
```
|
|
|
|
`causal-conv1d` wheels are keyed to the Python, PyTorch, CUDA, platform, and C++
|
|
ABI combination. Prefer an exact upstream wheel when one exists. A source build
|
|
must use a `CUDA_HOME` whose major version matches `torch.version.cuda`; the
|
|
system-default `nvcc` may point at a different toolkit. OBLITERATUS fails before
|
|
weight allocation if either extension cannot be imported.
|
|
|
|
The complete Qwen hybrid text model must fit one CUDA device with 15% free-memory
|
|
headroom. Generic `device_map="auto"` layer sharding is deliberately disabled for
|
|
this architecture because the recurrent-state execution path has not been
|
|
validated across devices.
|
|
|
|
Projection surgery validates dense `qwen3_5_text` backbones inside Qwen3.5 and
|
|
Qwen3.8 models, including the 0.8B, 9B, and 27B layouts. The validator checks the
|
|
configured attention interval and the dimensions of each attention and MLP
|
|
residual writer before editing. The pipeline records the validated layer counts
|
|
and dimensions in its metadata. Input embeddings and the language-model head
|
|
stay outside the projection manifest, including when they share weights.
|
|
|
|
Use the virtual environment interpreter directly after replacing Torch. A subsequent
|
|
`uv run` or `uv sync` without the CUDA override may restore the portable CPU wheel
|
|
from the lock. The agentic developer installer automates this ordering and performs
|
|
a real CUDA tensor probe; see `installer/setup.dev.manifest.yaml`.
|
|
|
|
## Quality-verifier coherence semantics
|
|
|
|
The built-in VERIFY stage does not treat length and vocabulary diversity as
|
|
coherence. Each fixed factual prompt has deterministic semantic anchors, and the
|
|
scorer rejects strong repetition and recognizable corpus contamination such as
|
|
scraped Q&A profile/answer fragments. This is intentionally local and deterministic:
|
|
release verification does not call another model or a network judge. Perplexity and
|
|
extended capability checks remain separate measurements.
|
|
|
|
On Linux workstations that also install cuDNN system-wide, the dynamic loader can
|
|
mix a host sublibrary with PyTorch's bundled cuDNN and raise
|
|
`CUDNN_STATUS_SUBLIBRARY_VERSION_MISMATCH`. The local launcher sets
|
|
`OBLITERATUS_DISABLE_CUDNN=1`, keeping causal convolutions and attention on
|
|
PyTorch's other CUDA kernels rather than moving the model to the CPU. Installer
|
|
verification runs actual causal `conv1d` and SDPA operations, not only a generic
|
|
CUDA allocation, so this failure is caught before a model pipeline begins.
|
|
|
|
Jetson CUDA support is tracked separately from this generic x64 CUDA lane. The
|
|
mandatory `Linux ARM64 preflight` uses GitHub's hosted `ubuntu-24.04-arm` runner
|
|
to prove locked CPU packaging, imports, CLI startup, and Jetson tooling contracts.
|
|
It is not GPU evidence. Jetson depends on a JetPack/L4T-matched CUDA, cuDNN, and
|
|
PyTorch runtime.
|
|
|
|
Physical testing uses only a trusted manual dispatch on the labels `self-hosted`,
|
|
`linux`, `ARM64`, and `jetson`. The job preserves NVIDIA's vendor PyTorch, runs
|
|
`jetson-runtime`, and uploads the sanitized `conditional-jetson-<run-attempt>`
|
|
artifact for 30 days. It never runs for a pull request, schedule, or release.
|
|
Contributor bootstrap, runner isolation, reporting commands, and acceptance
|
|
criteria are documented in the [NVIDIA Jetson support plan](platforms/jetson.md).
|
|
|
|
## Exact Llama tensor-parallel candidate
|
|
|
|
The `llama-tp-local-gpu` lane qualifies the EXPERIMENTAL TP2 adapter accepted
|
|
in [issue #244](https://github.com/elder-plinius/OBLITERATUS/issues/244), through
|
|
collective VERIFY and canonical export. It runs
|
|
only through trusted manual dispatch on an exact signed candidate and requires exactly two homogeneous local CUDA GPUs with native BF16, Gloo,
|
|
NCCL, a local hash-verified CUDA Torch wheel, and separate immutable
|
|
image/package/runtime/installed-API digests. The tiny BF16 Llama safetensors and
|
|
tokenizer fixture is generated offline in the job; the workers have no model
|
|
download or credential path.
|
|
|
|
Before `torchrun`, the test supervisor enters an unprivileged user/mount
|
|
namespace and bind-remounts the fixture's content-addressed source root
|
|
read-only with `nosuid`, `nodev`, and `noexec`. Both ranks must observe that
|
|
exact mount root and identity. A runner without Linux user/mount namespaces or
|
|
a private numeric interface records noncoverage and cannot qualify the gate.
|
|
|
|
The lane compares distributed pristine logits and deterministic greedy output to
|
|
an independently loaded single-process reference whose read-only safetensors
|
|
bytes are hash-bound into the acquisition manifest, checks complete replicated
|
|
layer-boundary activations and the rank-local placement manifest. It then
|
|
compares placement-aware EXCISE against complete logical tensors, checks private
|
|
journals and commit postconditions, and proves exact rollback. A separate
|
|
immutable-source attempt uses fresh run, rendezvous, and staging identities and
|
|
must reach unanimous `VERIFIED` with bounded refusal, coherence, forward-KL,
|
|
capability, non-finite, and rank-evidence results, then reconstruct one logical
|
|
tensor at a time into canonical safetensors, independently reload config,
|
|
tokenizer, weights, logits, and greedy generation, and reach unanimous
|
|
`PUBLISHED` before retaining one strict evidence record.
|
|
`scripts/check_llama_tp_hardware_evidence.py` validates
|
|
that record against the exact candidate, lock, code, registry profile,
|
|
acquisition manifest, runtime, plan, topology, hardware, and tolerance values.
|
|
Missing bindings, skips, partial evidence, or unavailable hardware are explicit
|
|
noncoverage and cannot make the selected job green.
|
|
|
|
This lane can establish only `candidate_local_gpu`. It does not establish
|
|
physical multi-host operation, over-one-host capacity, distributed-export
|
|
support, production readiness, transport security, or support. See the
|
|
[exact distributed model-load boundary](distributed-model-load.md) and the
|
|
[distributed export candidate](distributed-export.md).
|
|
|
|
### Two-host TP2 boundary (EXPERIMENTAL)
|
|
|
|
Part 6 of [issue #244](https://github.com/elder-plinius/OBLITERATUS/issues/244)
|
|
adds a code-level classifier for exactly one additional shape: two global TP
|
|
ranks, one process and one local CUDA device on each of two homogeneous hosts.
|
|
It keeps the TP mesh shard ordinal (global rank) separate from the CUDA device
|
|
index (`LOCAL_RANK=0` on each host), and binds the complete
|
|
rank/host/device/topology mapping into load evidence. Unit tests cover both
|
|
closed shapes and reject host reuse, device reuse, rank-map drift, tier/layout
|
|
confusion, and incomplete attestations.
|
|
|
|
Live GPU preflight refuses this layout during layout admission, before lifecycle
|
|
identity consensus and shared attempt-directory access (`LMS_TOPOLOGY_UNSUPPORTED`).
|
|
Layout record construction, gather (including peer poison), and comparison
|
|
failures use the same storage-free terminal outcome. Canonical EXPORT
|
|
also refuses it through a unanimous entry vote
|
|
(`LMS_EXPORT_TOPOLOGY_UNSUPPORTED`). PROBE/DISTILL, EXCISE with independent
|
|
journals, and VERIFY have CPU-only mocked checks for compatible two-host
|
|
identities and per-rank resource admission. The stack remains `not_qualified`.
|
|
|
|
The local CUDA evidence checker retains fixed two-rank `deployment_topology`
|
|
and `verification_deployment_topology` records and reconstructs each attempt's
|
|
`deployment_layout_digest`. Both binding sets keep `hardware_digest`, which
|
|
is recomputed from that attempt's mount and hardware observations. VERIFY and
|
|
EXPORT attempt identities bind the verification binding-set digest, preserving
|
|
both identities through the later evidence sections. These records authorize
|
|
only `local_tp2` in the local gate.
|
|
|
|
There is deliberately no automatic or selected `candidate_two_host_gpu` CI
|
|
gate. That label remains `candidate_unaccepted`; CPU tests are E0 contract
|
|
evidence, and the existing `llama-tp-local-gpu` job remains one-host E2
|
|
evidence. Physical two-host E3/E4 qualification needs an approved exact
|
|
protected profile, two qualifying hosts, a capacity model, fault
|
|
authorization, and retained same-head evidence. Missing any of these is a
|
|
blocker, not a skip-to-pass or a reason to reuse `candidate_local_gpu`.
|
|
|
|
## Apple MPS and MLX
|
|
|
|
MPS uses a runner labeled `self-hosted`, `macOS`, `ARM64`, and `mps`; enable its
|
|
schedule with `ENABLE_MPS_GATE=true`. MLX uses the same first three labels plus `mlx`
|
|
and `ENABLE_MLX_GATE=true`. The MPS probe checks discovery, selection, dtype and
|
|
float64 fallback, placement, and a real matrix operation. The MLX probe uses the
|
|
locked `mlx==0.32.0` and `mlx-lm==0.31.3` packages and verifies imports, array
|
|
placement, evaluation, and matrix multiplication. Each should cost less than 20
|
|
self-hosted runner-minutes.
|
|
|
|
If the repository has no attached Apple runner, collect equivalent operator evidence
|
|
on Apple Silicon and attach the JSON and JUnit files to the tracking issue:
|
|
|
|
```bash
|
|
uv sync --locked --extra dev
|
|
uv run --extra dev python scripts/run_conditional_gate.py mps-runtime
|
|
|
|
uv sync --locked --extra dev --group mlx
|
|
uv run --extra dev --group mlx python scripts/run_conditional_gate.py mlx-runtime
|
|
```
|
|
|
|
## Remote provider
|
|
|
|
Remote evidence is opt-in. Configure a non-root, command-limited test account and:
|
|
|
|
- variables `OBLITERATUS_REMOTE_HOST`, `OBLITERATUS_REMOTE_USER`, and optionally
|
|
`OBLITERATUS_REMOTE_PORT`;
|
|
- secrets `OBLITERATUS_REMOTE_KEY` and `OBLITERATUS_REMOTE_KNOWN_HOSTS`.
|
|
|
|
The known-hosts entry must be pinned after verifying the provider fingerprint through
|
|
an independent channel. The workflow writes credentials to mode-0600 temporary files,
|
|
never prints their contents, uses batch mode and strict host-key checking, and only
|
|
runs `echo ok` plus `python3 -c 'print(6 * 7)'`. Missing prerequisites produce an
|
|
actionable failure when the gate was selected; a direct local invocation may use
|
|
`--allow-missing` to record explicit `not_run` evidence. Expected cost is below five
|
|
hosted runner-minutes plus any provider charge.
|
|
|
|
## Result semantics
|
|
|
|
`scripts/run_conditional_gate.py` requires at least one executed test and rejects any
|
|
failure, error, or skip. A selected workflow job therefore cannot become green through
|
|
an availability skip or unconditional success conversion. The final summary also
|
|
fails if any selected job is not successful. Unselected jobs are explicitly reported
|
|
as `not_selected_no_fresh_evidence`; they are not evidence of backend support. An
|
|
unselected hardware or credential-bound gate with a valid waiver is reported as
|
|
`waived_no_support_claim`, including its tracker, expiry, and blocked claim. Selecting
|
|
and successfully running that gate produces `success` instead of relying on the
|
|
waiver.
|