Metadata-Version: 2.4
Name: szl-kernels
Version: 0.2.0
Summary: Unified governed-kernel suite with cross-kernel UnifiedReceiptChain. CPU-importable; GPU stays honest UNAVAILABLE without CUDA.
Author: Stephen P. Lutar Jr. / SZL Holdings
License: Apache-2.0
Project-URL: Homepage, https://a-11-oy.com
Project-URL: Repository, https://github.com/szl-holdings/szl-kernels
Project-URL: Hugging Face, https://huggingface.co/SZLHOLDINGS/szl-kernels
Project-URL: Issues, https://github.com/szl-holdings/szl-kernels/issues
Project-URL: Changelog, https://github.com/szl-holdings/szl-kernels/releases
Keywords: kernel,governance,provenance,receipts,szl-holdings
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.5
Requires-Dist: numpy>=1.21
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: setuptools>=61; extra == "test"
Requires-Dist: wheel; extra == "test"
Provides-Extra: frontier
Requires-Dist: scikit-learn<2,>=1.5; extra == "frontier"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: scikit-learn<2,>=1.5; extra == "dev"
Requires-Dist: setuptools>=61; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Dynamic: license-file

---
thumbnail: https://huggingface.co/SZLHOLDINGS/szl-kernels/resolve/main/og-card.png
tags:
- kernel
- governance
- provenance
- suite
- embedding-table
- not-a-transformers-config
- doi:10.5281/zenodo.19944926
library_name: kernels
license: apache-2.0
szl-governance:
  verdict: ADVISORY
  lambda: "Conjecture 1 (open) — uniqueness unproven; advisory only"
  energy: "Caller-supplied readings; None when not supplied; MEASURED claims require reviewed meter evidence"
  provenance: UnifiedReceiptChain (SHA3-256, op-agnostic, cross-kernel)
  honest_blocked: "a failed check stays failed — never faked green"
---

<!-- Native identity: szl-brand@4309f6fce89179331b0b3ed8c99494e76c5be256; Orbit v2 icon sha256 6e2b7d72a3af3d9602b79de41df0194ede6496a9661f057108ec224c0efc92e6. -->
<p><a href="https://github.com/szl-holdings"><img src="https://raw.githubusercontent.com/szl-holdings/szl-brand/4309f6fce89179331b0b3ed8c99494e76c5be256/kit/logos/orbit-v2/suite/szl-icon-32.svg" alt="SZL Holdings — Orbit v2" width="32" height="32" /></a></p>

# SZL Kernels · Governed Compute

Explore the governed kernel suite and its receipted MiniEmbed word embeddings, with separate software and artifact evidence.

**Artifact:** Kernel suite and MiniEmbed embedding table · **Stage:** Reference software · intrinsic sanity evidence

[Explore in Command Lab](https://huggingface.co/spaces/SZLHOLDINGS/szl-command-lab) · [Build](https://github.com/szl-holdings/szl-kernels) · [Evidence](https://github.com/szl-holdings/szl-kernels/blob/331b259cf6b6dde17c4bdacc245e61c7addff506/README.md)

## Before you use it

- MiniEmbed is a PPMI/SVD word-embedding table; it is not a Transformers or general-purpose language model.
- Λ remains Conjecture 1 and advisory. Physical energy claims require real measurements and reviewed meter evidence.
- Existing tests and replay are bounded checks; they do not establish independent retrieval quality, clinical fitness, production readiness or a new publication.

<details>
<summary>Technical details and original evidence</summary>

The retained source below is exact and may contain historical observations. Its dates, use restrictions, licenses and evidence boundaries continue to apply.

<!-- SZL-PRESERVED-TECHNICAL-BODY:START -->

<!-- SZL-ESTATE-CARD:v2:START -->
<p align="center"><a href="https://a-11-oy.com/"><img src="https://huggingface.co/spaces/SZLHOLDINGS/README/resolve/main/assets/estate-banner-v2.svg" alt="SZL Holdings — governed, receipted, verifiable" width="100%"></a></p>
<p align="center">
  <a href="https://github.com/szl-holdings/.github/tree/main/doctrine"><img src="https://img.shields.io/badge/doctrine-v11%20LOCKED-0B1F3A?style=flat-square" alt="doctrine v11"></a>
  <a href="https://a-11-oy.com/"><img src="https://img.shields.io/badge/evidence%20wall-LIVE%20%C2%B7%20verify%20in%20browser-3AF4C8?style=flat-square" alt="live evidence wall"></a>
  <a href="https://huggingface.co/datasets/SZLHOLDINGS/szl-lake"><img src="https://img.shields.io/badge/szl--lake-offline%20verifiable-C9B787?style=flat-square" alt="szl-lake offline verifiable"></a>
  <a href="https://huggingface.co/spaces/SZLHOLDINGS/holographic-unify"><img src="https://img.shields.io/badge/estate%20map-holographic-5B8DEE?style=flat-square" alt="holographic estate map"></a>
</p>
<p align="center"><sub>Part of the <a href="https://huggingface.co/SZLHOLDINGS">SZL Holdings</a> governed estate — claims are designed to carry checkable receipts. Verification proves integrity &amp; origin, never accuracy or performance.</sub></p>
<!-- SZL-ESTATE-CARD:v2:END -->

<!-- SZL-ARTIFACT-NOTICE:v1:START — honesty plate: repo semantics, no fake model tags. -->
> **🟩 Kernel suite + REAL trained SZL-MiniEmbed.** The canonical governed-kernel runtime now rejects non-finite or out-of-range Λ thresholds before emitting a Lambda receipt. The receipted `corpus/kernels` snapshot remains byte-for-byte preserved for SZL-MiniEmbed replay, so the canonical runtime and receipted corpus intentionally differ at those files. Since **SZL-MiniEmbed v1** this repo ALSO ships real trained word embeddings — `vectors.npz` + `vocab.json` + `config.json` — built with **no gensim**: a distance-weighted term–term co-occurrence matrix over the SZL text estate (doctrine v10/v11 + rag-corpus-v1 + thesis-corpus-v18 + kernel-family READMEs), PPMI-weighted, reduced with sklearn `TruncatedSVD` to **128-dim** over a **3290**-term vocabulary. Evidence is **INTRINSIC SANITY ONLY** — receipted nearest-neighbour lists on 20 doctrine terms; **NO downstream/benchmark score is claimed**. The kernel suite stays authoritative. Λ = Conjecture 1 · ADVISORY.
<!-- SZL-ARTIFACT-NOTICE:v1:END -->


<p align="center">
  <a href="https://huggingface.co/SZLHOLDINGS/szl-kernels/tree/main/build/torch-universal/szl_kernels"><img src="https://img.shields.io/badge/kernel%20hub-torch--universal-5b8dee?style=flat-square" alt="kernel hub"></a>
  <a href="https://huggingface.co/SZLHOLDINGS/szl-kernels/blob/main/MODEL_PROVENANCE.json"><img src="https://img.shields.io/badge/provenance-MODEL_PROVENANCE.json-3af4c8?style=flat-square" alt="provenance"></a>
  <a href="https://huggingface.co/SZLHOLDINGS/szl-kernels/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-7e8aa3?style=flat-square" alt="license"></a>
</p>

# szl-kernels — the unified governed-kernel suite
<!-- szl:header v1 -->
<!-- badges: add this repo's CI / release / status badges here -->
[![org: szl-holdings](https://img.shields.io/badge/org-szl--holdings-black)](https://github.com/szl-holdings)
[![doctrine](https://img.shields.io/badge/doctrine-control%20before%20action%20%C2%B7%20evidence%20after-blue)](https://a-11-oy.com)

**Control before action. Evidence after.**

Part of the [szl-holdings](https://github.com/szl-holdings) estate ·
Product: [a-11-oy.com](https://a-11-oy.com) ·
Proof: [a11oy.net](https://a11oy.net)
<!-- /szl:header -->

**Canonical source:** [`szl-holdings/szl-kernels`](https://github.com/szl-holdings/szl-kernels).
The protected `main` workflow verifies the kernel suite, replays the MiniEmbed
artifact within its declared tolerance, and checks the source-binding contract
against the public Hugging Face artifact. Publication runs from this repository
only. The Hub kernel repo (what `get_kernel` loads) is published on each GitHub
release by [`hf-kernel-publish.yml`](.github/workflows/hf-kernel-publish.yml),
which builds from the exact release commit, verifies the result through
`get_kernel` in a fresh job, and binds the Hub tree to that commit in
`SZL_KERNEL_SOURCE.json`. The model repo of the same name (the SZL-MiniEmbed
table and its provenance) is written by
[`tools/publish_source_binding.py`](tools/publish_source_binding.py): CI runs it
in dry-run mode only, and publication is an explicit CLI mode. The exact Git
source revision of the model artifact is written to `publication.json`.

This is a governed kernel suite with a receipted word-embedding companion. It is
not a general-purpose language model, and its intrinsic nearest-neighbor replay
is not a downstream quality benchmark.

The legacy model-type mirror intentionally has no hosted `feature-extraction`
task tag. Its `config.json` describes the PPMI/SVD MiniEmbed table, not a
Transformers configuration; `AutoConfig`/`AutoModel` and the standard inference
widget cannot load it. Use the documented `MiniEmbed` loader at a reviewed,
immutable revision instead.

## Artifact truth card

| Lane | Classification | Evidence available here | Limitation |
|---|---|---|---|
| Governed kernels | Executable software | Source, manifests, tests, receipt-chain verifier, and `selfcheck()` | A successful self-check covers the exercised implementation path; it is not a safety, performance, or deployment claim. |
| SZL-MiniEmbed v1 | Trained embedding weights | `vectors.npz`, vocabulary/config files, bundled corpus, `TRAINING_RECEIPT.json`, and deterministic replay tooling | Small in-domain co-occurrence embedding with intrinsic sanity evidence only; no downstream benchmark or general-purpose capability claim. |
| First-class Kernel Hub repository | Kernel distribution and loader surface | Generated `source-binding.json`, immutable-revision byte readback, and independently observed `main` and `v1` refs | Mutable ref names must be resolved again at evaluation time; repository reachability is not runtime readiness. |
| Legacy model/card mirror | Distribution and presentation surface | Generated `publication.json` plus immutable-revision byte readback in the authorized release flow | A model API listing does not make every file trained weights, and mirror reachability is not runtime readiness. |

**Investor value.** The repository combines an auditable governed-compute
reference with a small, receipted learned artifact, while keeping software,
weights, and evidence visibly separate.

**Developer/evaluator path.** Review the legacy mirror's generated
[`publication.json`](https://huggingface.co/SZLHOLDINGS/szl-kernels/blob/main/publication.json),
the first-class Kernel repository's generated
[`source-binding.json`](https://huggingface.co/kernels/SZLHOLDINGS/szl-kernels/blob/v1/build/torch-cpu/source-binding.json),
and `MODEL_PROVENANCE.json`. Run `suite.selfcheck()` for the software path and
`python scripts/eval.py` for the MiniEmbed replay. Treat returned results as
observations from that run; do not infer a green status from this card.

## Dated published observations

The [model-mirror card at `f67a26a8141b1436ee2d1de64fb202c493981a2d`](https://huggingface.co/SZLHOLDINGS/szl-kernels/blob/f67a26a8141b1436ee2d1de64fb202c493981a2d/README.md)
retains the following observations. They describe their named dates, hosts and
provider revision; they do not qualify the current source or a new publication.

| Observation reported by that card | Exact scope | Limit |
|---|---|---|
| Kernel import, 2026-08-28 at 1:57 p.m. ET | Client `kernels==0.16.1`; first-class kernel commit `8f714f4ffdeddcd852b233ec95d475656a56fc16`; default universal and CPU loader paths; eight `selfcheck()` checks reported successful | Historical card assertion; the import host is unspecified. This review did not rerun it or establish a cryptographic run binding. No current runtime qualification, tokens/s or measured joules follow. |
| GPU availability, 2026-08-28 at 7:01 p.m. ET | Reported host `cursor`, Linux `6.12.94+`, x86_64 Intel Xeon 8-core; Torch `2.13.0+cu130` compiled for CUDA 13.0; `torch.cuda.is_available()=false`, device count 0, `nvidia-smi` unavailable; Triton `3.7.1` present | CUDA/GPU execution and NVML measurement were unavailable in that reported session. This does not establish the state of another host or a later revision. |

Current runtime readiness, downstream quality and physical energy are **UNKNOWN**
for this documentation correction. No fresh import, inference, NVML reading or
performance run was performed. The reference suite's default unavailable receipt
is preserved; it is not evidence of a hardware probe.

> **Kernel Hub migration (historical 2026-08-01 observation):** `get_kernel(...)` was reported to resolve
> the matching first-class [Kernel Hub repository](https://huggingface.co/kernels/SZLHOLDINGS/szl-kernels).
> Its refs were reported independently at that observation: [`main`](https://huggingface.co/kernels/SZLHOLDINGS/szl-kernels/tree/5c71b9d76dc7bd0bc29dfc82b4db803652f7f20f)
> pins `5c71b9d76dc7bd0bc29dfc82b4db803652f7f20f`, while stable
> [`v1`](https://huggingface.co/kernels/SZLHOLDINGS/szl-kernels/tree/1a3c1bdcd1656483333b3edf1e3b1991c90200be)
> pins `1a3c1bdcd1656483333b3edf1e3b1991c90200be`. These are public ref
> readbacks, not runtime-readiness or artifact-equivalence claims. This
> model-type repository is retained as the legacy source/card mirror.

**A kernel suite for governing provenance across operations.** This `get_kernel`-discoverable suite ties SZL Holdings' three governed kernels — [`szl-governed-norm`](https://huggingface.co/SZLHOLDINGS/szl-governed-norm), [`szl-lambda-gate`](https://huggingface.co/SZLHOLDINGS/szl-lambda-gate), and [`governed-inference-meter`](https://huggingface.co/SZLHOLDINGS/governed-inference-meter) — into **one shared, hash-chained `UnifiedReceiptChain`**, and anchors a governance/interop layer on top: [`szl-govsign`](https://huggingface.co/SZLHOLDINGS/szl-govsign) (signs the verdict), [`szl-blocked`](https://huggingface.co/SZLHOLDINGS/szl-blocked) (refuses honestly + derives an EU AI Act Annex IV draft), and [`szl-provctl`](https://huggingface.co/SZLHOLDINGS/szl-provctl) (verifies the provenance DAG + bridges to in-toto/SLSA).

> **Evidence boundary:** no ecosystem-wide novelty claim is made. Within this
> published suite, a forward pass touching norm + an advisory Λ gate + an energy
> reading can produce one auditable, tamper-evident log instead of three
> disconnected logs. Verify that bounded behavior with `selfcheck()` and the
> exported chain verifier before relying on it.

## Quickstart

```bash
pip install kernels torch
```

Set `SZL_KERNELS_HF_REVISION` to the immutable **first-class Kernel Hub** commit
from a verified publication of [`kernels/SZLHOLDINGS/szl-kernels`](https://huggingface.co/kernels/SZLHOLDINGS/szl-kernels). Use the `kernels`
client version qualified with that publication. The GitHub source commit,
model-type mirror commit, and Kernel Hub commit are separate identities.
An observed head, a branch name, or a successful import does not qualify a release.

`trust_remote_code=True` permits execution of the selected repository's Python.
Review that exact revision, its provenance and publication evidence before enabling it.
The format check below only rejects missing or mutable revision inputs; it does not
verify hashes, publisher authorization or compatibility. If that evidence is unavailable,
stop the Hub load and use separately reviewed local source for development.

```python
import os
import re

hf_revision = os.environ.get("SZL_KERNELS_HF_REVISION", "")
if re.fullmatch(r"[0-9a-f]{40}", hf_revision) is None:
    raise ValueError("A verified immutable Kernel Hub revision is required")

from kernels import get_kernel

import torch

# Use the client version qualified with this exact publication.
suite = get_kernel("SZLHOLDINGS/szl-kernels", revision=hf_revision, trust_remote_code=True)

print(suite.list_kernels())     # the 3 numeric suite members + honest roles
print(suite.list_series())      # the governance/interop companions (govsign, blocked, provctl)
print(suite.selfcheck())        # inspect returned checks; this card assumes no pass

# ONE shared chain spanning multiple ops:
chain = suite.UnifiedReceiptChain()
x = torch.randn(4, 64)
y    = suite.governed_rms_norm(chain, x, eps=1e-6)                      # governed_norm
gate = suite.governed_lambda_gate(chain, torch.tensor([0.9,0.8,0.95]))  # lambda_gate (advisory)
e    = suite.governed_measure_energy(chain)                            # no reading supplied: unavailable

ok, depth, brk = chain.verify()       # the WHOLE pass verifies as ONE chain
print(ok, depth, chain.kernels_touched())   # True 3 ['governed_norm','lambda_gate','energy_core']
print(chain.to_json())                # export for offline third-party re-verification
```

### Flagship — a governed transformer sub-block

```python
blk = suite.GovernedBlock()
res = blk.forward(x, gov_axes=torch.tensor([0.95, 0.9, 0.92]))
print(res["chain_ok"], res["chain_depth"], res["kernels_touched"])
# norm + advisory Λ gate + energy + binding receipt = 4 ops, one verifiable chain.
# The Λ gate is ADVISORY: it is recorded for audit, it does NOT alter the numerics.
```


## Source-only development

Review [`torch-ext/szl_kernels/`](https://github.com/szl-holdings/szl-kernels/tree/7b59de18d35b1edca3c54a4647fb324b918563a8/torch-ext/szl_kernels)
at that immutable GitHub source revision, separately from any Hub release.
With the source's dependencies already available, run from the reviewed checkout root:

```python
import sys
from pathlib import Path

sys.path.insert(0, str(Path("torch-ext").resolve()))
import szl_kernels as local_kernel
```

This selects local Python source rather than calling the Hub loader. Importing local
source also executes Python. This documentation check does not run that import,
install dependencies, qualify a runtime or establish a Hub publication.
## Cookbook

Two operation recipes and an energy prerequisite spanning the governed-kernel series. Every printed value is
labeled **expected shape (not executed here)** — the shapes are transcribed from each
kernel's committed API, not from a run on this card (SZL doctrine: never self-download to
inflate counters, never fabricate an output). Λ stays **Conjecture 1 (OPEN)**; energy stays
**MEASURED-only**; a BLOCKED verdict stays BLOCKED.

### 1 — One receipt chain across three ops (suite)

```python
import os
import re

hf_revision = os.environ.get("SZL_KERNELS_HF_REVISION", "")
if re.fullmatch(r"[0-9a-f]{40}", hf_revision) is None:
    raise ValueError("A verified immutable Kernel Hub revision is required")

from kernels import get_kernel

import torch

suite = get_kernel("SZLHOLDINGS/szl-kernels", revision=hf_revision, trust_remote_code=True)

chain = suite.UnifiedReceiptChain()
x = torch.randn(4, 64)
suite.governed_rms_norm(chain, x, eps=1e-6)                        # op 1: governed_norm
suite.governed_lambda_gate(chain, torch.tensor([0.9, 0.8, 0.95]))  # op 2: lambda_gate (ADVISORY)
suite.governed_measure_energy(chain)                              # op 3: unavailable energy receipt

ok, depth, first_break = chain.verify()
print(ok, depth, chain.kernels_touched())
# expected shape (not executed here):
#   True 3 ['governed_norm', 'lambda_gate', 'energy_core']
#   -> one hash-chain, three ops, verifies as ONE ordered sequence.
#   The Λ gate receipt is ADVISORY (Conjecture 1, OPEN): recorded, never proven trust.
#   With no reading supplied: joules=None + UNAVAILABLE_NO_NVML; no sensor is probed.
```

### 2 — honest-BLOCKED, not fake-green (szl-blocked)

This recipe uses a separate first-class kernel publication. Set
`SZL_BLOCKED_HF_REVISION` from its own verified publication evidence;
do not reuse the suite's revision. The execution warning above applies here too.

```python
import os
import re

hf_revision = os.environ.get("SZL_BLOCKED_HF_REVISION", "")
if re.fullmatch(r"[0-9a-f]{40}", hf_revision) is None:
    raise ValueError("A verified immutable Kernel Hub revision is required")

from kernels import get_kernel

blk = get_kernel("SZLHOLDINGS/szl-blocked", revision=hf_revision, trust_remote_code=True)

chain  = blk.UnifiedReceiptChain()
policy = blk.deny_if_action_in({"exfiltrate", "delete_all"})
work   = lambda v: v * 2

allowed = blk.governed_call(work, policy, chain, request={"action": "summarize"},  args=(21,))
blocked = blk.governed_call(work, policy, chain, request={"action": "exfiltrate"}, args=(21,))

print(allowed.blocked, allowed.output)
print(blocked.blocked, blocked.output)
# expected shape (not executed here):
#   False 42     -> ALLOWED path ran work(21); an ALLOW receipt is on the chain.
#   True None    -> BLOCKED path: work was NEVER called, output is None,
#                   a BLOCK receipt is recorded. Honest-BLOCKED, never faked green.
```

### 3 - Require a measured energy receipt before a governance attestation (szl-govsign)

The signing API accepts an `EnergyLabel` only with the `MEASURED` label and a
finite, nonnegative numeric value. Those field checks do not establish that the
value was physically measured. The former `12.5` literal was an illustrative value, not a measurement
of this workload, and has been removed. Supply the actual meter receipt for the
workload being attested; review its sensor, source, and measurement interval.

The suite's unavailable receipt has `joules=None` and
`label="UNAVAILABLE_NO_NVML"`. Keep that unavailable record in the receipt chain;
do not turn it into a measured signing label or substitute a number. This helper
checks the receipt fields before constructing the existing signing API type:

```python
import math

def measured_energy_label(gs, reading):
    """Convert a reviewed meter receipt; no measurement is performed here."""
    joules = reading.get("joules")
    if (
        reading.get("label") != "MEASURED"
        or isinstance(joules, bool)
        or not isinstance(joules, (int, float))
        or not math.isfinite(joules)
        or joules < 0
    ):
        raise ValueError("attestation requires a real finite MEASURED joule receipt")
    return gs.EnergyLabel(value=joules, unit="joules")
```

Review the [immutable signing API](https://github.com/szl-holdings/szl-govsign/blob/7bff004d12347ac23ae60ffbfb78ce7f9ef15829/torch-ext/szl_govsign/predicate.py)
and use the provider revision from verified publication readback before importing
remote code. The helper does not authenticate a sensor or establish that a caller's
JSON was measured. No attestation, signature verification, energy measurement, or
runtime qualification was performed for this documentation correction. A signature
can bind a supplied claim; it does not prove the physical measurement or upgrade
the advisory Lambda claim to proven trust.

> The operation recipes use separately published kernels; the signing prerequisite above
> supplies no new provider publication or runtime qualification.
> See [`szl-provctl`](https://huggingface.co/SZLHOLDINGS/szl-provctl) to turn any of these
> chains into documented in-toto v1 / SLSA v1 shapes for external compatibility testing.

## The governed-kernel series

Independently published, `get_kernel`-discoverable kernels that share one `UnifiedReceiptChain`. The first three are the **numeric core**; govsign + blocked + provctl are the **governance / interop layer**.

| Kernel | Lane | Live hologram |
|---|---|---|
| [`szl-governed-norm`](https://huggingface.co/SZLHOLDINGS/szl-governed-norm) | RMSNorm/LayerNorm + SHA3-256 receipts | [`governed-norm-holo`](https://szlholdings-governed-norm-holo.static.hf.space) ✅ **live** |
| [`szl-lambda-gate`](https://huggingface.co/SZLHOLDINGS/szl-lambda-gate) | advisory Λ gate (Conjecture 1, OPEN) | [`lambda-gate-holo`](https://szlholdings-lambda-gate-holo.static.hf.space) ✅ **live** |
| [`governed-inference-meter`](https://huggingface.co/SZLHOLDINGS/governed-inference-meter) | MEASURED-joule energy accounting | [`energy-attest-holo`](https://szlholdings-energy-attest-holo.static.hf.space) ✅ **live** |
| [`szl-govsign`](https://huggingface.co/SZLHOLDINGS/szl-govsign) | signed governance attestation (DSSE / in-toto, ECDSA P-256) | [`szl-govsign-live`](https://szlholdings-szl-govsign-live.static.hf.space) ✅ **live** |
| [`szl-blocked`](https://huggingface.co/SZLHOLDINGS/szl-blocked) | honest-BLOCKED first-class state + EU AI Act Annex IV DRAFT | [`szl-blocked-live`](https://szlholdings-szl-blocked-live.static.hf.space) ✅ **live** |
| [`szl-provctl`](https://huggingface.co/SZLHOLDINGS/szl-provctl) | provenance-DAG verify + in-toto v1 / SLSA v1 interop + per-kernel MEASURED energy | [`szl-provctl-live`](https://szlholdings-szl-provctl-live.static.hf.space) ✅ **live** |
| **`szl-kernels`** (this repo) | **unified suite — cross-kernel `UnifiedReceiptChain`** | [`szl-kernels-live`](https://szlholdings-szl-kernels-live.static.hf.space) ✅ **live** |

`suite.list_kernels()` returns the numeric core; `suite.list_series()` returns the govsign + blocked + provctl governance/interop layer.

### The honest-model trio (offline replays of the live Alloy surface)

Published as HF **model** repos (NOT trained models, NO weights — pure-Python, stdlib-only offline replays). Each ships a `library_name: kernels` card and MEASURED local test counts:

| Model | Lane | Tests (MEASURED) |
|---|---|---|
| [`szl-invariants`](https://huggingface.co/SZLHOLDINGS/szl-invariants) | 8 falsifiable receipt/ledger invariants, offline | 14/14 |
| [`szl-ouroboros`](https://huggingface.co/SZLHOLDINGS/szl-ouroboros) | bounded-loop trace + MEASURED/DERIVED loop-tax accounting | 13/13 |
| [`szl-formulas`](https://huggingface.co/SZLHOLDINGS/szl-formulas) | the 21 canonical formulas + governed-loop composer, PROOF-STATUS mirrored verbatim (locked-proven = exactly 8) | 17/17 |

## The gap this closes

The standalone SZL kernels keep separate receipt state. A single forward pass through them therefore yields logs that are not one ordered stream. `UnifiedReceiptChain` adds op-agnostic SHA3-256 receipts that hash-chain norm, Λ, and energy calls into **one** verifiable stream, in call order. `szl-govsign` can sign that chain head for verification against a separately trusted public key; `szl-blocked` records refusal as a first-class state and derives a draft documentation skeleton; `szl-provctl` verifies supplied multi-run provenance records and serializes them into documented in-toto/SLSA shapes for compatibility testing.

## API

| Symbol | What it does |
|---|---|
| `UnifiedReceiptChain` | Op-agnostic SHA3-256 hash chain. `emit`, `verify() -> (ok, depth, first_break)`, `kernels_touched()`, `to_json()`, `verify_json()` (offline). |
| `governed_rms_norm(chain, x, weight=None, eps=1e-6)` | RMSNorm + a receipt into the shared chain. Numerics match `szl-governed-norm`. |
| `governed_layer_norm(chain, x, ...)` | LayerNorm + receipt. |
| `governed_lambda_gate(chain, axes, weights=None, threshold=0.5)` | **Advisory** Λ gate; rejects non-finite or out-of-range thresholds before emitting a receipt, then records an advisory result (`advisory=True`, never proven trust). |
| `governed_measure_energy(chain, measurement=None)` | Records supplied energy fields; no reading supplied produces `joules=None` + `UNAVAILABLE_NO_NVML`, regardless of device availability. This reference wrapper does not probe NVML or authenticate a sensor. |
| `GovernedBlock` | Pre-norm sub-block composing all three + a binding receipt into one auditable pass. |
| `MiniEmbed` | Load repo-root `vocab.json` + `vectors.npz` and look up / encode in-vocab terms. Table and lookup receipts use `UnifiedReceiptChain`. Distributional word-embedding table — not a transformer LM. |
| `list_kernels()`, `list_series()`, `get_member()`, `selfcheck()` | Numeric registry + governance-layer series + one-shot CPU health check. |
| `probe_member(entry)`, `probe_estate()` | Installed-package estate checks with explicit probe verdicts and complete-estate aggregation. |

The installed package's estate probes report `LIVE` only when the probe returns
an explicit successful boolean verdict (`ok`, `passed`, `arithmetic_ok`, a
boolean, or a `(boolean, violations)` pair). An explicit false verdict or failed
check stays `FAILED`; a completed call with no interpretable verdict is
`UNVERIFIED`; missing packages and exceptions stay `UNAVAILABLE`. In-suite
fallbacks also verify their emitted receipt chains. These statuses describe the
bounded software probe, while an energy reading can remain unavailable.

`probe_estate()["ok"]` requires every catalog member to be `LIVE`. A partial
catalog reports `INCOMPLETE`, and any failed member makes the aggregate
`FAILED`. Callers that only need to know whether some software is available can
inspect `some_members_available` and the separate status counts. This catalog
does not establish current Hub publication, downstream quality, GPU performance
or production deployment.

## Honesty (SZL doctrine)

- **Λ is advisory.** Its uniqueness is **Conjecture 1 — OPEN**. A recorded gate "pass" is a non-compensatory advisory signal, **never proven trust**.
- **Energy measurement claims require reviewed meter evidence.** The reference suite records caller-supplied readings; it does not sense NVML energy. With no reading supplied, it records `joules=None` and `UNAVAILABLE_NO_NVML`. A `MEASURED` label requires separately reviewed sensor, source and interval evidence; field checks, a receipt hash or a signature do not prove the physical measurement.
- **The digest is an integrity fingerprint, not a signature.** SHA3-256 over a canonical receipt body proves tamper-evidence + ordering — not authorship. Signing is a separate, out-of-band layer — see [`szl-govsign`](https://huggingface.co/SZLHOLDINGS/szl-govsign) for DSSE / in-toto attestation.
- **Honest BLOCKED beats fake green.** A failed verification stays failed — see [`szl-blocked`](https://huggingface.co/SZLHOLDINGS/szl-blocked) for refusal as a first-class, provenanced state.
- **Universal (pure-Python) suite: a correctness and provenance reference, not a CUDA speed record. No performance result or current test status is asserted by this card.**

## Provenance

Backed by the Lean 4 formalization [szl-holdings/lutar-lean](https://github.com/szl-holdings/lutar-lean) (749 declarations / 14 axioms / 163 tracked sorries), DOI [10.5281/zenodo.20434308](https://doi.org/10.5281/zenodo.20434308). Λ uniqueness = Conjecture 1 (open).

## Presentation and verification surfaces

- [Canonical Hugging Face card](https://huggingface.co/SZLHOLDINGS/szl-kernels)
- [Kernel Hub repository](https://huggingface.co/kernels/SZLHOLDINGS/szl-kernels)
- [Governed Kernels & Verifiers collection](https://huggingface.co/collections/SZLHOLDINGS/governed-kernels-and-verifiers-6a542ad83a4b75151bf5eae3)
- [SZL organization inventory](https://huggingface.co/SZLHOLDINGS)
- [Canonical GitHub source](https://github.com/szl-holdings/szl-kernels)

These links are navigation, not status badges. Availability, deployment state,
and current revision must be checked at evaluation time; a reachable page does
not establish correctness, performance, or runtime readiness.

## Compatibility

Python 3.9+, `torch>=2.5`, standard library + torch only. Runs on CPU and CUDA.

## License

Apache-2.0. Copyright 2026 SZL Holdings.


## Trained SZL-MiniEmbed v1 (MEASURED — see `TRAINING_RECEIPT.json`)

Real word embeddings over the SZL text estate, produced **without gensim**: a distance-weighted
term–term co-occurrence matrix (window 5) → PPMI → sklearn `TruncatedSVD` → L2-normalized
vectors. Corpus = **26 documents / 26 source files** (every file's sha256 is recorded in
the receipt): `doctrine-v10-v11`, `rag-corpus-v1` (`corpus.jsonl`), `thesis-corpus-v18`, and the
kernel-family READMEs + `build/*.py`. Seed 20260721; the exact corpus text is bundled under
`corpus/` so the build is reproducible offline.

| property | value |
|---|---|
| vocabulary size | **3290** |
| embedding dim | **128** |
| co-occurrence window | 5 |
| SVD explained-variance ratio (MEASURED) | **0.3146** |
| doctrine probe terms in vocab | **20** / 20 |

### Intrinsic nearest-neighbour sanity (MEASURED, receipted)

Cosine nearest neighbours for doctrine terms — the **only** evidence claimed. This is intrinsic
sanity, **not a benchmark**: no analogy/retrieval score is asserted.

| term | top neighbours |
|---|---|
| `ouroboros` | substrate, replit, custodian, ouroboros-arch, payload, subsystems |
| `governance` | formal, score, first, layer, itself, system |
| `receipt` | chain, receipts, hash, emits, emitted, every |
| `provenance` | openmdw, chain, lineage, dags, composes, order |
| `lambda` | min, lam, float, emit, action, compute |
| `kernel` | discoverable, kernels, get, szl-kernels, hub, governed-kernel |
| `invariant` | learned, operator, knowledge, th11, reidemeister, knot |
| `tamper` | touched, kernels, break, verifies, verify, detected |
| `verify` | offline, break, tamper, depth, touched, brk |
| `conjecture` | uniqueness, depends, unproven, open, cauchy, honest |

```python
import numpy as np, json
V = np.load("vectors.npz")["vectors"]              # float32 [vocab, dim], L2-normalized
vocab = json.load(open("vocab.json"))["index"]     # {term: row}
def nn(term, k=6):
    v = V[vocab[term]]; s = V @ v
    return [(list(vocab)[i], float(s[i])) for i in np.argsort(-s)[1:k+1]]
print(nn("receipt"))
```

**Honest scope / blind spot:** these are distributional co-occurrence embeddings over a small
in-domain corpus (3290 terms). They capture SZL-doctrine term neighbourhoods; they are **not**
a general-purpose embedding model and carry **no** benchmark claim. Rare/out-of-vocab terms are
simply absent. The kernel suite remains the primary, authoritative artifact.

Re-verify everything: `python scripts/eval.py` (sha256-checks `vectors.npz` + `vocab.json`
against the receipt, regenerates the embeddings from the bundled corpus, and compares the
nearest-neighbour sets — mean Jaccard overlap ≥ 0.90 — and SVD variance within ±0.02).

### SOURCE

`szl_kernels.MiniEmbed` is a **distributional word-embedding table** (PPMI + TruncatedSVD,
dim 128, vocab 3290) loaded from the in-repo `vectors.npz` / `vocab.json` artifact. It is
**not** a transformer language model, **not** Chaski, and **not** Khipu. Lookup and encode
cover terms already in the vocabulary. Integrity receipts use the existing
`UnifiedReceiptChain` (SHA3-256). File-hash replay remains `python scripts/eval.py`.

```python
from szl_kernels import MiniEmbed
emb = MiniEmbed()                 # loads repo-root vocab.json + vectors.npz
print(emb.lookup("receipt").shape)  # (128,)
print(emb.neighbors("receipt", k=6))
print(emb.selfcheck()["label"])     # MATCHES / LOADED, or UNAVAILABLE_LFS
```

---

<sub><b>SZL Holdings</b> · unified governed-kernel suite · cross-kernel provenance · Λ advisory (Conjecture 1) · energy supplied or unavailable; measurement claims require evidence · <a href="https://a-11-oy.com">a-11-oy.com</a> · <a href="https://github.com/szl-holdings">github.com/szl-holdings</a> · <a href="https://huggingface.co/SZLHOLDINGS">huggingface.co/SZLHOLDINGS</a></sub>

---

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19944926.svg)](https://doi.org/10.5281/zenodo.19944926)

## Citation


**Cite this.** Part of the SZL Holdings *Ouroboros Thesis* (Governed Post-Determinism).  
Concept DOI (always-latest): [10.5281/zenodo.19944926](https://doi.org/10.5281/zenodo.19944926).  
Author: Stephen P. Lutar Jr. · [ORCID 0009-0001-0110-4173](https://orcid.org/0009-0001-0110-4173) · License CC-BY-4.0.  
Full DOI-pinned lineage (v1→v26) + the 8 papers: [szl-papers PAPERS_INDEX](https://github.com/szl-holdings/szl-papers/blob/main/PAPERS_INDEX.md).  
No artifact-specific DOI is minted for this model; the concept DOI above covers the program.

Honesty (Doctrine v11): Λ unconditional uniqueness is **Conjecture 1** (machine-checked FALSE as stated) — never a theorem; conditional uniqueness is **Theorem U** (axiom-free). Locked-proven formulas = **exactly 8** {F1,F4,F7,F11,F12,F18,F19,F22}; ~185 experimental theorems are a separate CI-green tier; Khipu BFT safety = Conjecture 2. Trust never 100%.

```bibtex
@misc{lutar_szl_ouroboros,
  author    = {Lutar, Stephen P., Jr.},
  title     = {SZL Holdings --- The Ouroboros Thesis (Governed Post-Determinism)},
  year      = {2026},
  publisher = {Zenodo},
  doi       = {10.5281/zenodo.19944926},
  url       = {https://doi.org/10.5281/zenodo.19944926},
  note      = {Concept DOI --- always resolves to the latest version. ORCID 0009-0001-0110-4173. CC-BY-4.0.}
}
```

*Signed-off-by: Stephen Lutar <stephenlutar2@gmail.com>*

## Files in this repo

| Path | What it is |
|---|---|
| `build/torch-universal/szl_kernels/__init__.py` | public API — suite entry points + `selfcheck()` |
| `build/torch-universal/szl_kernels/_chain.py` | cross-kernel `UnifiedReceiptChain` (SHA3-256) |
| `build/torch-universal/szl_kernels/_ops.py` | the governed op set |
| `build/torch-universal/szl_kernels/miniembed.py` | MiniEmbed table loader, in-vocab lookup/encode, hash selfcheck |
| `torch-ext/szl_kernels/` | kernel-builder source mirror of the same package |
| `tests/test_suite.py` | suite test |
| `tests/test_miniembed.py` | CPU MiniEmbed tests |
| `build.toml` · `metadata.json` | Kernel Hub build/metadata manifests |
| `LICENSE` · `SECURITY.md` | Apache-2.0 · security policy |

---

<p align="center">
  <a href="https://huggingface.co/SZLHOLDINGS">SZL Holdings</a> ·
  <a href="https://a-11-oy.com">a-11-oy.com</a> ·
  <a href="https://huggingface.co/SZLHOLDINGS/a11oy-v19-substrate">a11oy-v19-substrate</a>
</p>

<p align="center"><sub>SLSA: L1 honest · L2 attested · L3 roadmap. Λ = Conjecture 1. Trust ceiling 0.97.</sub></p>

<!-- SZL-PRESERVED-TECHNICAL-BODY:END -->

</details>
