Instructions to use SZLHOLDINGS/governed-inference-meter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use SZLHOLDINGS/governed-inference-meter with Kernels:
# !pip install kernels from kernels import get_kernel kernel = get_kernel("SZLHOLDINGS/governed-inference-meter") - Notebooks
- Google Colab
- Kaggle
⬛ No
.safetensors/.bin/.pt/.gguf— governance kernel repo. Not a runnable model. A dependency-light utility + HF universal kernel that wraps an inference call and emits a governed, energy-metered, tamper-evident receipt. Declares nopipeline_tag/base_model.
⚠️ DEPRECATED — consolidated into
szl-energy-attestThis repository is deprecated. Its live inference meter, meter-specific attestation, hardened receipt-chain, PCGI spine, and signing-facing compatibility APIs were folded into the canonical
szl_energy_attest.inference_meterpackage in verified merge4d8d105c3d5ea67b5eb25826e8a2a35ca35f4043.Three legacy modules (
_energy.py,_policy.py,_receipt.py) are exact hash-preserving copies;_attest.pyand_spine.pycarry only bounded package/import rewrites. The immutableMIGRATION_PROVENANCE.jsonrecords every source and destination digest, and the migration regressions verify that boundary.Boundary: the successor's root energy receipt remains a different schema; compatibility does not imply schema equality, a configured signing key, or a signed receipt. This legacy repo remains readable for provenance and rollback, but is not the target for new integrations. Archiving requires a separate owner decision after pointer and inbound-link gates are evidenced. See
DEPRECATED.md. Λ remains Conjecture 1 (advisory, uniqueness OPEN).
Kernel Hub migration (verified 2026-07-15):
get_kernel(...)resolves the first-class Kernel Hub repo;mainandv1pin verified revision6d546bfc6591b44ae5eb57d1209678454e52a3f5.
What it does
Wraps any inference call and emits a governed receipt: measures GPU energy via NVIDIA NVML integrated over wall-time → joules; computes tokens-per-joule; runs a pluggable advisory policy gate (allow/deny, defaults to allow); emits a SHA-256 hash-chained JSON receipt so a call sequence is independently auditable. It is the energy + governance counterpart to szl-governed-norm — receipts, not capability claims.
Honest scope (read this first)
- MEASURED only with NVML. Without NVML the receipt is
mode="unmeasured"andjoules/tokens_per_joulearenull. We never fabricate a joule figure. - Board-level power. NVML reports whole-board power; we report what the hardware reports. No modeling, no scaling factors.
- The policy gate is advisory and host-enforced. It records a decision; it cannot enforce by itself. The bundled
meter()wrapper fails-safe (never executes a denied call); downstream enforcement is still yours. A gate runs fail-closed — if it raises, the call is denied. - The receipt digest is an integrity fingerprint, not a signature. Cryptographic signing (DSSE/Sigstore) is separate and out-of-band.
- This is a metering + receipt utility, not a safety guarantee.
Usage
from kernels import get_kernel
gim = get_kernel("SZLHOLDINGS/governed-inference-meter")
receipt, output = gim.meter(run, args=("hello",), model="my-llm-7b", tokens_in=2, tokens_out=7)
print(receipt["mode"]) # 'measured-energy' | 'measured-power-integral' | 'unmeasured'
print(receipt["joules"], receipt["tokens_per_joule"]) # floats, or None when unmeasured
print(gim.receipt_verify()) # (ok, depth, first_break_seq) over the chain
selfcheck() runs a metered allow call, a denied call (verifying it does not execute), tokens/joule honesty, chain verification, and tamper detection. No GPU required. The attestation layer renders a receipt into an in-toto Statement v1 (own predicateType, SLSA-shaped only) and EU AI Act / NIST AI RMF evidence with explicit does_not_establish notes — energy-dependent controls report UNAVAILABLE on an unmeasured receipt, never a fabricated joule.
License
Apache-2.0 · © 2026 SZL Holdings · Stephen Lutar · Platform a-11-oy.com.
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). Energy MEASURED-only, never fabricated. a-11-oy.com · huggingface.co/SZLHOLDINGS
- Downloads last month
- -