Instructions to use SZLHOLDINGS/szl-ouroboros with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use SZLHOLDINGS/szl-ouroboros with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("SZLHOLDINGS/szl-ouroboros") - Scikit-learn
How to use SZLHOLDINGS/szl-ouroboros with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("SZLHOLDINGS/szl-ouroboros", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
🟩 Kernel + REAL trained surrogate. The governance kernel (pure-Python, stdlib-only) is UNCHANGED and remains the sole ground truth — it reconstructs the a11oy agent-loop trace and its loop-tax decomposition from a run's provider-attempt windows (sums, max, subtraction only). Since surrogate v1 this repo ALSO ships
model.joblib— a real trained sklearn regressor that predicts the kernel's DERIVEDoverheadMsfrom trace observables, with MEASURED held-out MAE 15.59 ms / R² 0.9822 (target std 191.1 ms). The surrogate never replaces the kernel's exact arithmetic. Λ is not touched here and stays Conjecture 1 (open).
Kernel Hub migration (verified 2026-07-15):
get_kernel(...)resolves the first-class Kernel Hub repo;mainandv1pin verified revision756678f0bf096bde25054336c8e1ff78a9eb9172.
The whole point: honest MEASURED vs DERIVED labels
Loop timing is easy to overclaim. This kernel labels every field, carrying the backbone's LOOP_TIMING_BASIS verbatim:
| Field | Label | Meaning |
|---|---|---|
modelMs |
MEASURED | Σ of every provider-attempt wall window (success AND failed hops) |
peakAttemptMs |
MEASURED | the single slowest attempt window (peak-vs-sum) |
overheadMs |
DERIVED | max(0, wall − modelMs) — Alloy's orchestration, NOT pure CPU time |
serializationTaxMs |
DERIVED | max(0, modelMs − peak) — a COUNTERFACTUAL, never a realized saving (loop is strictly sequential) |
deadHopMs |
DERIVED | Σ failed windows before the served hop — upper bound only, no prefetch |
maxBudget |
DECLARED | the per-run attempt ceiling |
exit |
REPORTED | converged / budgetExhausted / aborted / error |
receiptsInEqOut |
DOCTRINE | one receipt trail in, one out — a doctrine invariant, NOT a proof |
When wall_ms=None, overheadMs is honestly None / UNAVAILABLE — never fabricated. A wall smaller than modelMs surfaces wallLessThanModel (a measurement inconsistency made visible, never hidden).
Quickstart (fully offline)
from kernels import get_kernel
ou = get_kernel("SZLHOLDINGS/szl-ouroboros", revision="main", trust_remote_code=True)
attempts = [
{"provider": "sovereign", "model": "own-metal", "ok": False, "latency_ms": 220, "node": "tower"},
{"provider": "sovereign", "model": "own-metal", "ok": True, "latency_ms": 900, "node": "laptop"}]
trace = ou.build_loop_trace(attempts, wall_ms=1300, exit="converged", max_budget=4)
print(trace["modelMs"], trace["overheadMs"], trace["deadHopMs"]) # 1120 180 220
print(ou.selfcheck()) # falsifiable arithmetic self-check
LOOP_DOCTRINE = "bounded, terminating, receipt-closed" — the Ouroboros closes on its own tail. withinBudget surfaces the bounded-loop guarantee; a violation is reported, never clamped. Demo runs make no model call → modelMs / peak / deadHop are honestly 0.
Tests — MEASURED, local, stdlib-only
PYTHONPATH=build/torch-universal python3 -m pytest tests/ -q → 13 passed. The arithmetic is falsifiable — a wrong split flips the asserts; an unmeasured wall yields overheadMs=None; a missing latency raises; a budget violation is surfaced.
Provenance
Mirrors the live a11oy loop-tax accounting (backbone.ts — buildLoopTrace, sumAttemptMs, peakAttemptMs, deadHopMs, LOOP_DOCTRINE, LOOP_TIMING_BASIS). Backed by lutar-lean, DOI 10.5281/zenodo.20434308. Honest-model trio with szl-invariants and szl-formulas; anchored by szl-kernels. Live substrate: a-11-oy.com.
License
Apache-2.0 · © 2026 SZL Holdings · Stephen P. Lutar · ORCID 0009-0001-0110-4173.
Trained loop-tax regressor v1 (MEASURED — see TRAINING_RECEIPT.json)
A real sklearn HistGradientBoostingRegressor trained on 11,841 runs
generated as bounded agent loops and labeled by this kernel itself: the target is
ou.loop_tax(attempts, wall_ms)["overheadMs"] — the kernel's own DERIVED
max(0, wall − modelMs) (seed 20260721;
40 runs re-audited by full kernel replay).
Runs with an unmeasured wall (overheadMs honestly None/UNAVAILABLE) are dropped,
never fabricated. Features are observable trace fields only (per-attempt latencies + ok
flags + run wall + budget).
| metric | value |
|---|---|
| held-out MAE (ms) | 15.5853 |
| held-out R² | 0.9822 |
| target std (ms) | 191.0790 |
R² is the fidelity of the surrogate to the kernel's DERIVED overheadMs — a fast
approximation of the loop-tax derivation, not a new measurement. The kernel's exact
arithmetic remains authoritative; serializationTaxMs stays a counterfactual, never a
realized saving. Λ untouched = Conjecture 1.
import joblib
reg = joblib.load("model.joblib") # feature spec: TRAINING_RECEIPT.json data.features
Re-verify everything: python scripts/eval.py (sha256-checks the shipped model against the
receipt, regenerates the seeded dataset via the in-repo kernel, retrains, and compares R²
within ±0.02).
SZL Holdings honesty footer. Λ = Conjecture 1 (advisory, never a theorem). locked-proven = exactly 8 {F1,F4,F7,F11,F12,F18,F19,F22}. Honesty labels: MEASURED / REPORTED / MODELED / HEURISTIC / UNKNOWN / UNAVAILABLE. Trust never 100% (ceiling 0.97). serializationTax is a counterfactual, never a saving. a-11-oy.com · huggingface.co/SZLHOLDINGS
- Downloads last month
- -