SZL kernel publisher commited on
Commit ·
c1b7d02
1
Parent(s): 41a1ebe
Publish szl-lambda-gate v1 from szl-holdings/szl-lambda-gate@219ee89500f2d2a137f547c1c6ed8d97c6c66e9d
Browse filesSource: https://github.com/szl-holdings/szl-lambda-gate/tree/219ee89500f2d2a137f547c1c6ed8d97c6c66e9d
Publisher: scripts/szl_kernel_publish.py (https://github.com/szl-holdings/szl-lambda-gate/actions/runs/38478441021)
Files changed (15)
- BENCH.laptop-blackwell.jsonDeleted-186
- LICENSE+185-2
- OPERATIONAL.jsonDeleted-51
- README.md+105-195
- SZL_KERNEL_SOURCE.jsonAdded+49
- build/torch-cpu/__init__.pyDeleted-2
- build/torch-cpu/metadata.json+26-1
- build/torch-cpu/szl_lambda_gate/__init__.py+1-1
- build/torch-cpu/szl_lambda_gate/governed_norm/_receipt.py+101-17
- build/torch-universal/__init__.pyDeleted-2
- build/torch-universal/metadata.json+26-1
- build/torch-universal/szl_lambda_gate/__init__.py+1-1
- build/torch-universal/szl_lambda_gate/governed_norm/_receipt.py+101-17
- distribution.jsonDeleted-1
- source/LICENSEDeleted-202
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186{
"schema": "szl.kernel-bench.laptop-blackwell/v1",
"hub": "SZLHOLDINGS/szl-lambda-gate",
"kind": "SOFTWARE_KERNEL",
"github_source": "szl-holdings/szl-lambda-gate",
"github_sha": "3fb5bb65dfdba006ae917e10b7703a535ea303e0",
"local_path": "C:\\Users\\steph\\work-pr\\kernels\\szl-lambda-gate",
"computed_at": "2026-08-29T15:53:47Z",
"host": {
"os": "Windows-10-10.0.26200-SP0",
"python": "3.11.9",
"machine": "AMD64",
"node": "betterwithage",
"label": "laptop-blackwell",
"torch": "2.10.0+cu128",
"cuda_available": true,
"gpu": "NVIDIA GeForce RTX 5050 Laptop GPU",
"gpu_count": 1,
"cuda_capability": "12.0",
"arch": "Blackwell",
"kernels": "0.16.1"
},
"weights": false,
"tests": {
"command": "PYTHONPATH=torch-ext python -m pytest tests -q --tb=line",
"szl_source_tree_tests": "1",
"exit": 1,
"timeout": false,
"label": "FAIL",
"summary": "4 failed, 54 passed, 14 warnings in 52.57s",
"counts": {
"passed": 54,
"failed": 4,
"warnings": 14
},
"failed": [
{
"status": "FAILED",
"node": "tests/test_lambda.py::test_torch_compile_friendly"
},
{
"status": "FAILED",
"node": "tests/test_lambda.py::test_fullgraph_lambda_aggregate"
},
{
"status": "FAILED",
"node": "tests/test_lambda.py::test_fullgraph_lambda_gate_score"
},
{
"status": "FAILED",
"node": "tests/test_lambda.py::test_fullgraph_lambda_gate_batch_score"
}
],
"fullgraph_or_compile_lines": [
"C:\\Users\\steph\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_inductor\\cpp_builder.py:142: torch._inductor.exc.InductorError: RuntimeError: Compiler: cl is not found.",
"E torch._inductor.exc.InductorError: RuntimeError: Compiler: cl is not found.",
"C:\\Users\\steph\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_inductor\\cpp_builder.py:142: torch._inductor.exc.InductorError: RuntimeError: Compiler: cl is not found.",
"FAILED tests/test_lambda.py::test_torch_compile_friendly - torch._inductor.ex...",
"FAILED tests/test_lambda.py::test_fullgraph_lambda_aggregate - torch._inducto...",
"FAILED tests/test_lambda.py::test_fullgraph_lambda_gate_score - torch._induct...",
"FAILED tests/test_lambda.py::test_fullgraph_lambda_gate_batch_score - torch._..."
],
"stdout_tail": "utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:compile_fx.py:2288 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:compile_fx.py:1246 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:compile_fx.py:1297 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:compile_fx.py:1335 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:convert_frame.py:1783 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:2029 \nDEBUG torch.__trace:utils.py:1724 \nDEBUG torch.__trace:utils.py:2029\nC:\\Users\\steph\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\_inductor\\cpp_builder.py:142: torch._inductor.exc.InductorError: RuntimeError: Compiler: cl is not found.\n============================== warnings summary ===============================\ntests/test_lambda.py: 14 warnings\n C:\\Users\\steph\\AppData\\Local\\Programs\\Python\\Python311\\Lib\\site-packages\\torch\\jit\\_script.py:362: DeprecationWarning: `torch.jit.script_method` is deprecated. Please switch to `torch.compile` or `torch.export`.\n warnings.warn(\n\n-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html\n=========================== short test summary info ===========================\nFAILED tests/test_lambda.py::test_torch_compile_friendly - torch._inductor.ex...\nFAILED tests/test_lambda.py::test_fullgraph_lambda_aggregate - torch._inducto...\nFAILED tests/test_lambda.py::test_fullgraph_lambda_gate_score - torch._induct...\nFAILED tests/test_lambda.py::test_fullgraph_lambda_gate_batch_score - torch._...\n4 failed, 54 passed, 14 warnings in 52.57s\n",
"stderr_tail": "",
"error": null
},
"eval": null,
"get_kernel": {
"hub": "SZLHOLDINGS/szl-lambda-gate",
"package": "0.16.1",
"load_path": "from kernels import get_kernel\nk = get_kernel(\"SZLHOLDINGS/szl-lambda-gate\", revision=\"main\", trust_remote_code=True)",
"trust_remote_code_true": {
"trust_remote_code": true,
"backend": null,
"ok": true,
"module": "_szl_lambda_gate_universal_cto1",
"file": "C:\\Users\\steph\\.cache\\huggingface\\hub\\kernels--SZLHOLDINGS--szl-lambda-gate\\snapshots\\082de2ad7d48c21fb09fbeee033f617d9e6957a7\\build\\torch-universal\\szl_lambda_gate\\__init__.py",
"selfcheck": {
"version": "0.2.0",
"axioms": {
"A1_IsMonotone": true,
"A2_IsHomogeneous": true,
"A3_IsEgyptianExact": true,
"A4_IsBounded": true
},
"all_axioms_hold": true,
"adversarial": {
"trials": 64,
"violation": null
},
"advisory": true,
"lambda_status": "Conjecture 1 (open) — uniqueness unproven; advisory only"
}
},
"trust_remote_code_true_backend_cpu": {
"trust_remote_code": true,
"backend": "cpu",
"ok": true,
"module": "_szl_lambda_gate_cpu_9cf02fddf8",
"file": "C:\\Users\\steph\\.cache\\huggingface\\hub\\kernels--SZLHOLDINGS--szl-lambda-gate\\snapshots\\082de2ad7d48c21fb09fbeee033f617d9e6957a7\\build\\torch-cpu\\szl_lambda_gate\\__init__.py",
"selfcheck": {
"version": "0.2.0",
"axioms": {
"A1_IsMonotone": true,
"A2_IsHomogeneous": true,
"A3_IsEgyptianExact": true,
"A4_IsBounded": true
},
"all_axioms_hold": true,
"adversarial": {
"trials": 64,
"violation": null
},
"advisory": true,
"lambda_status": "Conjecture 1 (open) — uniqueness unproven; advisory only"
}
},
"trust_remote_code_false": {
"trust_remote_code": false,
"backend": null,
"ok": false,
"error_type": "ValueError",
"error": "Kernel repository 'SZLHOLDINGS/szl-lambda-gate' is not from a trusted publisher. Set trust_remote_code=True to allow loading kernels from untrusted sources."
},
"ok": true,
"default_ok": true
},
"hub_presence": {
"hub": "SZLHOLDINGS/szl-lambda-gate",
"model": true,
"kernel": true,
"model_sha": "e28ad22c20cd8e75980d089e9ea7f27c7953467d",
"model_library": "kernels",
"model_pipeline": null,
"model_has_bench": false,
"model_weights": [],
"kernel_sha": "47c7eb2db8859507d4115adbbff20c65de66dbb5",
"kernel_files_sample": [],
"kernel_has_bench": false
},
"formula_tax": {
"kind": "SOFTWARE",
"registry_count": 21,
"locked_8": [
"F1",
"F4",
"F7",
"F11",
"F12",
"F18",
"F19",
"F22"
],
"lambda_aggregate": 0.316227766016838,
"lambda_label": "ADVISORY",
"lambda_uniqueness": "CONJECTURE_1",
"khipu_merkle_sha256": "9041e7870a54f41a2aaac2c1c0a02df579e5d3094271b1fcd9d3ab25e1474b3a",
"honesty": "Λ roll-up is advisory geomean over binary checks. Uniqueness is Conjecture 1, never a theorem. locked-8 = F1 F4 F7 F11 F12 F18 F19 F22."
},
"invariants_i1_i8": [
"I1 receipt-chain-continuity",
"I2 ledger-failure-shape",
"I3 served-run-has-model",
"I4 signed-columns-atomic",
"I5 loop-steps-positive",
"I6 receipt-ed25519-verify",
"I7 receipt-columns-consistent",
"I8 flywheel-lineage"
],
"load_path": "from kernels import get_kernel\nk = get_kernel(\"SZLHOLDINGS/szl-lambda-gate\", revision=\"main\", trust_remote_code=True)",
"honesty": [
"Unsloth / LoRA training is the wrong tool for these kernels.",
"Λ uniqueness is Conjecture 1, never a theorem.",
"locked-8 formulas: F1 F4 F7 F11 F12 F18 F19 F22.",
"Do not pickle/joblib.load Hub kernels. GitHub/torch-ext source is the approved path.",
"torch.compile fullgraph failures on Windows Blackwell are MEASURED, not hidden.",
"Receipted kernels, not silent CUDA. No tokens/s or joules claimed here.",
"Do not convert a model-type card into a kernel-type repo by deleting nonexistent weights."
],
"cut": "Kernel Hub card is source, not a LoRA. Training it with Unsloth is the wrong tool. One-of-one: receipted kernels, not silent CUDA.",
"computed_at_get_kernel": "2026-08-29T16:00:26Z",
"torch_universal_put": {
"ok": true,
"commit": "082de2ad7d48c21fb09fbeee033f617d9e6957a7"
}
}12345677 unmodified lines1516171819Apache LicenseVersion 2.0, January 2004http://www.apache.org/licenses/Copyright 2026 SZL HoldingsLicensed under the Apache License, Version 2.0 (the "License");7 unmodified linesWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.The full Apache License 2.0 text is available at the URL above.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911927 unmodified lines200201202Apache LicenseVersion 2.0, January 2004http://www.apache.org/licenses/TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION1. Definitions."License" shall mean the terms and conditions for use, reproduction,and distribution as defined by Sections 1 through 9 of this document."Licensor" shall mean the copyright owner or entity authorized bythe copyright owner that is granting the License."Legal Entity" shall mean the union of the acting entity and allother entities that control, are controlled by, or are under commoncontrol with that entity. For the purposes of this definition,"control" means (i) the power, direct or indirect, to cause thedirection or management of such entity, whether by contract orotherwise, or (ii) ownership of fifty percent (50%) or more of theoutstanding shares, or (iii) beneficial ownership of such entity."You" (or "Your") shall mean an individual or Legal Entityexercising permissions granted by this License."Source" form shall mean the preferred form for making modifications,including but not limited to software source code, documentationsource, and configuration files."Object" form shall mean any form resulting from mechanicaltransformation or translation of a Source form, including butnot limited to compiled object code, generated documentation,and conversions to other media types."Work" shall mean the work of authorship, whether in Source orObject form, made available under the License, as indicated by acopyright notice that is included in or attached to the work(an example is provided in the Appendix below)."Derivative Works" shall mean any work, whether in Source or Objectform, that is based on (or derived from) the Work and for which theeditorial revisions, annotations, elaborations, or other modificationsrepresent, as a whole, an original work of authorship. For the purposesof this License, Derivative Works shall not include works that remainseparable from, or merely link (or bind by name) to the interfaces of,the Work and Derivative Works thereof."Contribution" shall mean any work of authorship, includingthe original version of the Work and any modifications or additionsto that Work or Derivative Works thereof, that is intentionallysubmitted to Licensor for inclusion in the Work by the copyright owneror by an individual or Legal Entity authorized to submit on behalf ofthe copyright owner. For the purposes of this definition, "submitted"means any form of electronic, verbal, or written communication sentto the Licensor or its representatives, including but not limited tocommunication on electronic mailing lists, source code control systems,and issue tracking systems that are managed by, or on behalf of, theLicensor for the purpose of discussing and improving the Work, butexcluding communication that is conspicuously marked or otherwisedesignated in writing by the copyright owner as "Not a Contribution.""Contributor" shall mean Licensor and any individual or Legal Entityon behalf of whom a Contribution has been received by Licensor andsubsequently incorporated within the Work.2. Grant of Copyright License. Subject to the terms and conditions ofthis License, each Contributor hereby grants to You a perpetual,worldwide, non-exclusive, no-charge, royalty-free, irrevocablecopyright license to reproduce, prepare Derivative Works of,publicly display, publicly perform, sublicense, and distribute theWork and such Derivative Works in Source or Object form.3. Grant of Patent License. Subject to the terms and conditions ofthis License, each Contributor hereby grants to You a perpetual,worldwide, non-exclusive, no-charge, royalty-free, irrevocable(except as stated in this section) patent license to make, have made,use, offer to sell, sell, import, and otherwise transfer the Work,where such license applies only to those patent claims licensableby such Contributor that are necessarily infringed by theirContribution(s) alone or by combination of their Contribution(s)with the Work to which such Contribution(s) was submitted. If Youinstitute patent litigation against any entity (including across-claim or counterclaim in a lawsuit) alleging that the Workor a Contribution incorporated within the Work constitutes director contributory patent infringement, then any patent licensesgranted to You under this License for that Work shall terminateas of the date such litigation is filed.4. Redistribution. You may reproduce and distribute copies of theWork or Derivative Works thereof in any medium, with or withoutmodifications, and in Source or Object form, provided that Youmeet the following conditions:(a) You must give any other recipients of the Work orDerivative Works a copy of this License; and(b) You must cause any modified files to carry prominent noticesstating that You changed the files; and(c) You must retain, in the Source form of any Derivative Worksthat You distribute, all copyright, patent, trademark, andattribution notices from the Source form of the Work,excluding those notices that do not pertain to any part ofthe Derivative Works; and(d) If the Work includes a "NOTICE" text file as part of itsdistribution, then any Derivative Works that You distribute mustinclude a readable copy of the attribution notices containedwithin such NOTICE file, excluding those notices that do notpertain to any part of the Derivative Works, in at least oneof the following places: within a NOTICE text file distributedas part of the Derivative Works; within the Source form ordocumentation, if provided along with the Derivative Works; or,within a display generated by the Derivative Works, if andwherever such third-party notices normally appear. The contentsof the NOTICE file are for informational purposes only anddo not modify the License. You may add Your own attributionnotices within Derivative Works that You distribute, alongsideor as an addendum to the NOTICE text from the Work, providedthat such additional attribution notices cannot be construedas modifying the License.You may add Your own copyright statement to Your modifications andmay provide additional or different license terms and conditionsfor use, reproduction, or distribution of Your modifications, orfor any such Derivative Works as a whole, provided Your use,reproduction, and distribution of the Work otherwise complies withthe conditions stated in this License.5. Submission of Contributions. Unless You explicitly state otherwise,any Contribution intentionally submitted for inclusion in the Workby You to the Licensor shall be under the terms and conditions ofthis License, without any additional terms or conditions.Notwithstanding the above, nothing herein shall supersede or modifythe terms of any separate license agreement you may have executedwith Licensor regarding such Contributions.6. Trademarks. This License does not grant permission to use the tradenames, trademarks, service marks, or product names of the Licensor,except as required for reasonable and customary use in describing theorigin of the Work and reproducing the content of the NOTICE file.7. Disclaimer of Warranty. Unless required by applicable law oragreed to in writing, Licensor provides the Work (and eachContributor provides its Contributions) on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied, including, without limitation, any warranties or conditionsof TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR APARTICULAR PURPOSE. You are solely responsible for determining theappropriateness of using or redistributing the Work and assume anyrisks associated with Your exercise of permissions under this License.8. Limitation of Liability. In no event and under no legal theory,whether in tort (including negligence), contract, or otherwise,unless required by applicable law (such as deliberate and grosslynegligent acts) or agreed to in writing, shall any Contributor beliable to You for damages, including any direct, indirect, special,incidental, or consequential damages of any character arising as aresult of this License or out of the use or inability to use theWork (including but not limited to damages for loss of goodwill,work stoppage, computer failure or malfunction, or any and allother commercial damages or losses), even if such Contributorhas been advised of the possibility of such damages.9. Accepting Warranty or Additional Liability. While redistributingthe Work or Derivative Works thereof, You may choose to offer,and charge a fee for, acceptance of support, warranty, indemnity,or other liability obligations and/or rights consistent with thisLicense. However, in accepting such obligations, You may act onlyon Your own behalf and on Your sole responsibility, not on behalfof any other Contributor, and only if You agree to indemnify,defend, and hold each Contributor harmless for any liabilityincurred by, or claims asserted against, such Contributor by reasonof your accepting any such warranty or additional liability.END OF TERMS AND CONDITIONSAPPENDIX: How to apply the Apache License to your work.To apply the Apache License to your work, attach the followingboilerplate notice, with the fields enclosed by brackets "[]"replaced with your own identifying information. (Don't includethe brackets!) The text should be enclosed in the appropriatecomment syntax for the file format. We also recommend that afile or class name and description of purpose be included on thesame "printed page" as the copyright notice for easieridentification within third-party archives.Copyright 2026 SZL HoldingsLicensed under the Apache License, Version 2.0 (the "License");7 unmodified linesWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.See the License for the specific language governing permissions andlimitations under the License.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051{
"schema": "szl.kernel-operational/v1",
"hub": "SZLHOLDINGS/szl-lambda-gate",
"github_source": "szl-holdings/szl-lambda-gate",
"github_sha": "3fb5bb65dfdba006ae917e10b7703a535ea303e0",
"computed_at": "2026-08-29T16:00:26Z",
"tests": "FAIL",
"eval": null,
"get_kernel": "import-LIVE",
"hub_kernel_repo": true,
"hub_model_repo": true,
"formula_tax": {
"kind": "SOFTWARE",
"registry_count": 21,
"locked_8": [
"F1",
"F4",
"F7",
"F11",
"F12",
"F18",
"F19",
"F22"
],
"lambda_aggregate": 0.316227766016838,
"lambda_label": "ADVISORY",
"lambda_uniqueness": "CONJECTURE_1",
"khipu_merkle_sha256": "9041e7870a54f41a2aaac2c1c0a02df579e5d3094271b1fcd9d3ab25e1474b3a",
"honesty": "Λ roll-up is advisory geomean over binary checks. Uniqueness is Conjecture 1, never a theorem. locked-8 = F1 F4 F7 F11 F12 F18 F19 F22."
},
"invariants_i1_i8": [
"I1 receipt-chain-continuity",
"I2 ledger-failure-shape",
"I3 served-run-has-model",
"I4 signed-columns-atomic",
"I5 loop-steps-positive",
"I6 receipt-ed25519-verify",
"I7 receipt-columns-consistent",
"I8 flywheel-lineage"
],
"load_path": "from kernels import get_kernel\nk = get_kernel(\"SZLHOLDINGS/szl-lambda-gate\", revision=\"main\", trust_remote_code=True)",
"honesty": [
"Unsloth / LoRA training is the wrong tool for these kernels.",
"Λ uniqueness is Conjecture 1, never a theorem.",
"locked-8 formulas: F1 F4 F7 F11 F12 F18 F19 F22.",
"Do not pickle/joblib.load Hub kernels. GitHub/torch-ext source is the approved path.",
"torch.compile fullgraph failures on Windows Blackwell are MEASURED, not hidden.",
"Receipted kernels, not silent CUDA. No tokens/s or joules claimed here.",
"Do not convert a model-type card into a kernel-type repo by deleting nonexistent weights."
]
}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195---tags:- kernel- governance- lambda- gate- provenance- doi:10.5281/zenodo.19944926library_name: kernelslicense: apache-2.0---<!-- SZL-KERNEL-OPERATIONAL:START -->## Operational (MEASURED laptop-Blackwell)> **STATUS:** tests **FAIL**. `get_kernel` **import-LIVE**. Unsloth/LoRA is the wrong tool. Receipted kernels, not silent CUDA.| Thing | Label | Method / N / date / what-NOT ||---|---|---|| tests (`PYTHONPATH=torch-ext`) | **FAIL** | MEASURED 2026-08-29T15:53:47Z host `betterwithage` Windows-10-10.0.26200-SP0. torch `2.10.0+cu128`. GPU `NVIDIA GeForce RTX 5050 Laptop GPU` arch `Blackwell`. pytest `4 failed, 54 passed, 14 warnings in 52.57s`. Failed nodes: `tests/test_lambda.py::test_torch_compile_friendly; tests/test_lambda.py::test_fullgraph_lambda_aggregate; tests/test_lambda.py::test_fullgraph_lambda_gate_score; tests/test_lambda.py::test_fullgraph_lambda_gate_batch_score`. What-NOT: not a leaderboard. torch.compile fullgraph failures on Windows Blackwell (`cl is not found`) are MEASURED, not hidden. || Kernel Hub `get_kernel` | **import-LIVE** | kernels `0.16.1`. Default: `get_kernel("SZLHOLDINGS/szl-lambda-gate", revision="main", trust_remote_code=True)` → `True`. `backend="cpu"` → `True`. trust_remote_code=False → `ValueError` (SZLHOLDINGS is not a trusted publisher). repo_type=kernel required (kernels 0.16). What-NOT: not a weight load; do not pickle/joblib.load. || formula-tax | **ADVISORY** | locked-8 `F1 F4 F7 F11 F12 F18 F19 F22`. registry_count=21. Λ geomean `0.316227766016838`. uniqueness **Conjecture 1** (never a theorem). || I1–I8 | **catalog** | `I1 receipt-chain-continuity; I2 ledger-failure-shape; I3 served-run-has-model; I4 signed-columns-atomic; I5 loop-steps-positive; I6 receipt-ed25519-verify; I7 receipt-columns-consistent; I8 flywheel-lineage`. Executed by `SZLHOLDINGS/szl-invariants`. Statuses never coerced. Λ untouched. || CUDA speedup / tokens/s / joules | **UNAVAILABLE** | Not claimed. Receipted kernels, not silent CUDA. |GitHub source: [`szl-holdings/szl-lambda-gate`](https://github.com/szl-holdings/szl-lambda-gate) @ `3fb5bb65dfdba006ae917e10b7703a535ea303e0`. Artifacts: [`BENCH.laptop-blackwell.json`](./BENCH.laptop-blackwell.json), [`OPERATIONAL.json`](./OPERATIONAL.json).```pythonfrom kernels import get_kernelk = get_kernel("SZLHOLDINGS/szl-lambda-gate", revision="main", trust_remote_code=True)```<!-- SZL-KERNEL-OPERATIONAL:END --><p align="center"><a href="https://huggingface.co/SZLHOLDINGS/szl-lambda-gate/tree/main/build/torch-universal/szl_lambda_gate"><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-lambda-gate/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-lambda-gate/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-7e8aa3?style=flat-square" alt="license"></a></p># szl-lambda-gate**Λ — a governance aggregator as a Hugging Face kernel.** A differentiable, torch.compile-friendly weighted-geometric-mean aggregator with an ADVISORY non-compensatory gate and runtime axiom self-checks, from [SZL Holdings](https://huggingface.co/SZLHOLDINGS).> Companion to [`szl-governed-norm`](https://huggingface.co/SZLHOLDINGS/szl-governed-norm). Where that kernel makes a normalization *auditable*, this one makes a *governance decision* computable and checkable at the tensor layer.## Interactive demo> **Live demos (in-browser, nothing to install)** — [`lambda-gate-holo`](https://szlholdings-lambda-gate-holo.static.hf.space) (this kernel's holographic gate demo) · [`szl-kernels-live`](https://szlholdings-szl-kernels-live.static.hf.space) (unified suite demo).>> The quickstart above runs fully locally. For a full governed-kernel suite demo, see [szl-kernels](https://huggingface.co/SZLHOLDINGS/szl-kernels). For the live a11oy substrate, see [a11oy Space](https://huggingface.co/spaces/SZLHOLDINGS/a11oy).## What Λ is — and is NOT (read this first)Λ is the **weighted geometric mean** over axis scores in [0,1]:\[ \Lambda(x) = \prod_i x_i^{w_i}, \quad \sum_i w_i = 1, \; w_i > 0, \; x_i \in [0,1] \]It is a **non-compensatory, ADVISORY** roll-up: any single zeroed (or non-finite) axis drives the whole aggregate to 0 — a conservative "one bad axis fails the gate" signal. **Λ is NOT "proven trust" and NOT a closed theorem.** Its *uniqueness* (that the weighted geometric mean is the only aggregator satisfying the carried axioms) remains **Conjecture 1 — OPEN**. A gate "pass" is an advisory signal, never a guarantee. We label this honestly everywhere.## Quickstart```bashpip install kernels torch``````pythonimport torchfrom kernels import get_kernel# Current `kernels` (>=0.15) requires an explicit revision/version + trust flag for org kernels:lg = get_kernel("SZLHOLDINGS/szl-lambda-gate", revision="main", trust_remote_code=True)# (once a tag is published you can pin it, e.g. revision="v0.2.0")axes = torch.tensor([0.9, 0.8, 0.95]) # axis scores in [0,1]score = lg.lambda_aggregate(axes) # Λ(x) ∈ [0,1]res = lg.lambda_gate(axes, threshold=0.5)print(res.score, res.passed, res.advisory) # advisory is always Trueprint(lg.selfcheck()) # empirical A1–A4 checks + version```## API| Function | Notes ||---|---|| `lambda_aggregate(axes, weights=None)` | Λ over the last dim. Differentiable, batched, torch.compile-friendly. || `lambda_gate(axes, weights=None, threshold=0.5)` | Advisory gate → `LambdaGateResult(score, passed, threshold, advisory)`. || `lambda_gate_batch(candidates, weights=None, threshold=0.5)` | Score many candidate vectors `(..., N, k)` in one call; returns the advisory pass mask. || `selfcheck()` | Empirical A1–A4 axiom checks + adversarial falsification search + version. NOT a uniqueness proof. || `is_monotone / is_homogeneous / is_egyptian_exact / is_bounded_by_max` | The four carried axioms as real runtime checks. || `yuyay_weights()`, `YUYAY_AXES`, `YUYAY_FLOORS` | Canonical 13-axis Yuyay preset (advisory). || layers: `LambdaGate`, `LambdaAggregate` | Pure `nn.Module` for the Kernel Hub layer-mapping mechanism. |## Carried axioms (verifiable, not a proof)- **A1 IsMonotone** — Λ is non-decreasing in each axis.- **A2 IsHomogeneous (deg 1)** — Λ(t·x) = t·Λ(x).- **A3 IsEgyptianExact** — Λ(c,…,c) = c.- **A4 IsBounded** — Λ(x) ≤ maxᵢ xᵢ.`selfcheck()` verifies these empirically on sampled inputs and runs a random falsification search. A clean run is **evidence, not proof** — Λ-uniqueness is Conjecture 1 (open).## ProvenanceBacked 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).## Honesty- Pure-Python universal kernel — a correctness reference, not a CUDA speed record. No fabricated benchmarks (50 passing tests).- Λ is advisory; never "proven trust."- Prior art honestly attributed: the weighted geometric mean as a less-compensatory composite indicator is established practice (UN HDI 2010, OECD Composite Indicators Handbook 2008); the veto/cut-off idea is ELECTRE. The 13-axis conjunctive form is SZL's own yuyay_v3 gate.## CompatibilityPython 3.9+, `torch>=2.5`, standard library + torch only.## LicenseApache-2.0. Copyright 2026 SZL Holdings.---## SZL Kernels SuitePart of the [`szl-kernels`](https://huggingface.co/SZLHOLDINGS/szl-kernels) governed-kernel suite — the hub links every member, and each member links back to the hub so no leaf is orphaned:| Kernel | Lane ||---|---|| [`szl-kernels`](https://huggingface.co/SZLHOLDINGS/szl-kernels) | **hub** — unified suite, cross-kernel `UnifiedReceiptChain` || [`szl-governed-norm`](https://huggingface.co/SZLHOLDINGS/szl-governed-norm) | RMSNorm/LayerNorm + SHA3-256 receipts || **`szl-lambda-gate`** (this repo) | **advisory Λ gate (Conjecture 1, OPEN)** || [`governed-inference-meter`](https://huggingface.co/SZLHOLDINGS/governed-inference-meter) | MEASURED-joule energy accounting (NVML) || [`szl-govsign`](https://huggingface.co/SZLHOLDINGS/szl-govsign) | signed governance attestation (DSSE / in-toto) || [`szl-blocked`](https://huggingface.co/SZLHOLDINGS/szl-blocked) | honest-BLOCKED state + EU AI Act Annex IV DRAFT || [`szl-provctl`](https://huggingface.co/SZLHOLDINGS/szl-provctl) | provenance-DAG verify + in-toto/SLSA interop |**Live Spaces:** [a11oy](https://huggingface.co/spaces/SZLHOLDINGS/a11oy) · [hatun-mcp](https://huggingface.co/spaces/SZLHOLDINGS/hatun-mcp).**Related — Governed Kernels collection:** [Governed Kernels — verifiable AI building blocks](https://huggingface.co/collections/SZLHOLDINGS/governed-kernels-verifiable-ai-building-blocks-6a41d3936cfce4fba83ce378) groups the whole family in one page. **Live console:** [a11oy](https://szlholdings-a11oy.hf.space) · [a-11-oy.com](https://a-11-oy.com) · [llm-router](https://szlholdings-llm-router-live.hf.space) · [receipt verifier](https://szlholdings-governed-receipt-verifier.static.hf.space) · [receipt spec (hub)](https://github.com/szl-holdings/governed-receipt-spec).---<sub><b>SZL Holdings</b> · Λ governance aggregator · advisory, not proven trust · <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>---[](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_lambda_gate/__init__.py` | public API — `lambda_aggregate`, `lambda_gate`, `selfcheck()` || `build/torch-universal/szl_lambda_gate/_lambda.py` | the weighted-geometric-mean aggregator + A1–A4 empirical checks || `build/torch-universal/szl_lambda_gate/layers.py` | `nn.Module` wrapper || `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/szl-kernels">szl-kernels</a></p><p align="center"><sub>SLSA: L1 honest · L2 attested · L3 roadmap. Λ = Conjecture 1. Trust ceiling 0.97.</sub></p>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105---license: apache-2.0library_name: kernelstags:- kernel- governance- lambda- gate- provenance- szl-holdings- doi:10.5281/zenodo.19944926---# szl-lambda-gate**Λ, a governance aggregator, as a pure-PyTorch (noarch) kernel.** A differentiable,`torch.compile`-friendly weighted-geometric-mean aggregator with an ADVISORYnon-compensatory gate, the strict `szl.lambda/v1` entry point and runtime axiomself-checks, from [SZL Holdings](https://huggingface.co/SZLHOLDINGS).This repository is published from GitHub[szl-holdings/szl-lambda-gate](https://github.com/szl-holdings/szl-lambda-gate) by its`hf-kernel-publish` workflow, which is its only writer. GitHub is the source of truth:every file under `build/` is a byte copy of `torch-ext/szl_lambda_gate` at the commitnamed in `SZL_KERNEL_SOURCE.json`.## Load it```python# pip install "kernels>=0.17.2" torchimport torchfrom kernels import get_kernellg = get_kernel("SZLHOLDINGS/szl-lambda-gate", version=1, trust_remote_code=True)axes = torch.tensor([0.9, 0.8, 0.95], dtype=torch.float64) # axis scores in [0,1]weights = torch.tensor([0.5, 0.25, 0.25], dtype=torch.float64)gate = lg.lambda_v1_gate(axes, weights, tau=0.8) # GO / NO_GO / ABSTAIN / BLOCKprint(gate.verdict, gate.code)print(lg.lambda_aggregate(axes)) # legacy Λ(x) in [0,1]print(lg.selfcheck()) # empirical A1-A4 checks, not a proof```- `version=1` resolves the `v1` branch, the stable API channel. Itis republished on every release. The `kernels` library refuses a call that names neithera version nor a revision.- `trust_remote_code` is required: SZLHOLDINGS is not a trusted kernel publisher on the Hub.The narrowest form is `trust_remote_code=["SZLHOLDINGS/szl-lambda-gate"]`.- CPU hosts load `build/torch-cpu`; CUDA and other hosts load `build/torch-universal`.Both variants carry identical code, built from the same GitHub commit.### Pin an exact build (production)```pythonfrom huggingface_hub import HfApifrom kernels import get_kernelrefs = HfApi().list_repo_refs("SZLHOLDINGS/szl-lambda-gate", repo_type="kernel")pin = next(b.target_commit for b in refs.branches if b.name == "v1")lg = get_kernel("SZLHOLDINGS/szl-lambda-gate", revision=pin, trust_remote_code=["SZLHOLDINGS/szl-lambda-gate"])```Record `pin` (a commit of this kernel repository) in your lockfile. Commits of themodel repository [https://huggingface.co/SZLHOLDINGS/szl-lambda-gate](https://huggingface.co/SZLHOLDINGS/szl-lambda-gate) are not kernel revisions anddo not resolve here.## What Λ is, and is notΛ is the weighted geometric mean over axis scores in [0,1]:Λ(x) = ∏ xᵢ^wᵢ with Σ wᵢ = 1, wᵢ > 0. It is a non-compensatory, ADVISORY roll-up: anyzero (or, in the legacy entry, non-finite) axis drives the aggregate to 0. A gate pass isan advisory signal that the host must enforce; it is not proven trust. Λ uniquenessremains **Conjecture 1 (open)**. The A1-A4 self-checks are empirical evidence on sampledinputs, not a proof.## API| Entry | Notes ||---|---|| `lambda_v1(axes, weights)` / `lambda_v1_gate(axes, weights, tau)` | Strict `szl.lambda/v1` contract (`spec/szl.lambda.v1.json`): validated, never repaired; bad input returns `BLOCK` with a `LAMBDA_*` code; τ is required. || `lambda_aggregate(axes, weights=None)` | Legacy Λ over the last dim. Differentiable, batched. Clamps and renormalises (see the spec for the differences). || `lambda_gate(axes, weights=None, threshold=...)` / `lambda_gate_batch(...)` | Legacy advisory gate → `LambdaGateResult(score, passed, threshold, advisory)`. || `selfcheck()`, `is_monotone`, `is_homogeneous`, `is_egyptian_exact`, `is_bounded_by_max`, `find_axiom_violation` | Empirical A1-A4 checks and a falsification search. || `governed_norm` (`rms_norm`, `layer_norm`, `fused_add_rms_norm`) | Governed normalization with SHA3-256 hash-chained receipts. Also published standalone as [SZLHOLDINGS/szl-governed-norm](https://huggingface.co/kernels/SZLHOLDINGS/szl-governed-norm). || `layers.LambdaGate`, `layers.LambdaAggregate` | Pure `nn.Module` layers for kernel layer mapping. |## Files| Path | What it is ||---|---|| `build/torch-cpu/`, `build/torch-universal/` | The kernel package and its generated `metadata.json` (with a sha256 digest of every file). || `spec/szl.lambda.v1.json`, `spec/lambda_v1_vectors.json` | The `szl.lambda/v1` contract and its golden vectors. || `reference/szl_lambda_v1.py` | Stdlib-only reference implementation of the contract. || `SZL_KERNEL_SOURCE.json` | The GitHub commit and per-file sha256 this tree was built from. || `build.toml`, `LICENSE` | Kernel build manifest and Apache-2.0 license, copied from GitHub. |No speedup, throughput or energy figure is claimed for this kernel. Test results livein GitHub Actions for the source commit.## License and citationApache-2.0. Copyright 2026 SZL Holdings. Concept DOI[10.5281/zenodo.19944926](https://doi.org/10.5281/zenodo.19944926); see `CITATION.cff` inthe GitHub repository.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{ "content_sha256": "7bb76d1613da5e0487cc182afb64115e5b9998e06b57027694e9bb381ba94435", "files": { "LICENSE": "bc8cef3450d423b046a3ba2b1a03089c8c795302f502cabbdbef055a68f0b1e7", "README.md": "e5141ba71f4ea828c30537ad9c4e88760f1712d1bf1a90cc5939ee902c9620c3", "build.toml": "5c5ebbfe83770a898b8b8893e342c2c5547c65cd2b5a96146b14e3abb9411f3b", "build/torch-cpu/metadata.json": "94fd9128b27adcb36237f2ee9618b09f7a61e1f88ba520623dda3b504154ac10", "build/torch-cpu/szl_lambda_gate/__init__.py": "2d95cb2a572a9ee8f00678e1a8aff347a12ccb0d529d2945a6a3bd67fa565854", "build/torch-cpu/szl_lambda_gate/_lambda.py": "f953a38019c91a6fa8a9c411f55baa4f5f2b9e76d7153bba54bb8a5d9469af38", "build/torch-cpu/szl_lambda_gate/_ops.py": "6adf1dc42e7a9e6da914e304da9720438e59c234104e11f3e5ccaa45ecee23b6", "build/torch-cpu/szl_lambda_gate/_v1.py": "9ac2d8fe0a47ff191eba76e62b1e9dd9b2b54f64ba0c3d86306e0cdd58bc468c", "build/torch-cpu/szl_lambda_gate/governed_norm/__init__.py": "50fe4fb09a165d0ae9a781f0ef3515388c752a14cde95f73687854f59a7dfadc", "build/torch-cpu/szl_lambda_gate/governed_norm/_norm.py": "cf72ace281ec86c504426f75e23eebdb661a1e3a12e4dfcc6c8b9fa634b03942", "build/torch-cpu/szl_lambda_gate/governed_norm/_receipt.py": "0fa2cf7e8c5f4f9b5908868ba6d6ec05e9dfbec26a7656b89ab2bfbdf3d6d870", "build/torch-cpu/szl_lambda_gate/governed_norm/layers.py": "d79c83355cb2332b9d0e9d98584b86434e486532e27d30652df10158b30fc37b", "build/torch-cpu/szl_lambda_gate/layers.py": "51da478e185ee4d16daa9971bdcbdcfcbb0c0c5b7837a002b97cd05cb968ea75", "build/torch-universal/metadata.json": "a69500fb8634cb39482b1c73efba0b9feda6cfacc0be3cb073d505e25aa5a6f4", "build/torch-universal/szl_lambda_gate/__init__.py": "2d95cb2a572a9ee8f00678e1a8aff347a12ccb0d529d2945a6a3bd67fa565854", "build/torch-universal/szl_lambda_gate/_lambda.py": "f953a38019c91a6fa8a9c411f55baa4f5f2b9e76d7153bba54bb8a5d9469af38", "build/torch-universal/szl_lambda_gate/_ops.py": "6adf1dc42e7a9e6da914e304da9720438e59c234104e11f3e5ccaa45ecee23b6", "build/torch-universal/szl_lambda_gate/_v1.py": "9ac2d8fe0a47ff191eba76e62b1e9dd9b2b54f64ba0c3d86306e0cdd58bc468c", "build/torch-universal/szl_lambda_gate/governed_norm/__init__.py": "50fe4fb09a165d0ae9a781f0ef3515388c752a14cde95f73687854f59a7dfadc", "build/torch-universal/szl_lambda_gate/governed_norm/_norm.py": "cf72ace281ec86c504426f75e23eebdb661a1e3a12e4dfcc6c8b9fa634b03942", "build/torch-universal/szl_lambda_gate/governed_norm/_receipt.py": "0fa2cf7e8c5f4f9b5908868ba6d6ec05e9dfbec26a7656b89ab2bfbdf3d6d870", "build/torch-universal/szl_lambda_gate/governed_norm/layers.py": "d79c83355cb2332b9d0e9d98584b86434e486532e27d30652df10158b30fc37b", "build/torch-universal/szl_lambda_gate/layers.py": "51da478e185ee4d16daa9971bdcbdcfcbb0c0c5b7837a002b97cd05cb968ea75", "reference/szl_lambda_v1.py": "57b264fa96056d1f2d77b797ba80eab087a729283f16416196fdd1423c9c532f", "spec/lambda_v1_vectors.json": "460bb966ff2bec4fd99e03d267b721f22c5fad731e0667723407a6909bd4dcec", "spec/szl.lambda.v1.json": "04a8368568d59509c8603cdc45cf80f6b1395e751c77eabb1957bbe12906f2d9" }, "kernel_name": "szl-lambda-gate", "kernel_version": 1, "load": { "call": "get_kernel(\"SZLHOLDINGS/szl-lambda-gate\", version=1, trust_remote_code=True)", "requires": "kernels>=0.17.2" }, "packages": [ { "name": "szl_lambda_gate", "src": "torch-ext/szl_lambda_gate" } ], "publisher": "scripts/szl_kernel_publish.py", "repo_id": "SZLHOLDINGS/szl-lambda-gate", "repo_type": "kernel", "schema": "szl.kernel-source-binding/v1", "source_commit": "219ee89500f2d2a137f547c1c6ed8d97c6c66e9d", "source_repository": "szl-holdings/szl-lambda-gate"}12from .szl_lambda_gate import * # noqa: F401,F403from .szl_lambda_gate import __all__1{"backend":{"type":"cpu"},"digest":{"algorithm":"sha256","files":{"__init__.py":"NuinjlWRNlWgg0y2D61HEaKtW/VOktRHP8w2Nj3opjQ=","szl_lambda_gate/__init__.py":"QpfkkacuKUGxXitqBYLq0nM4NnCsX7uNFOLHbeye0V0=","szl_lambda_gate/_lambda.py":"+VOjgBnJGm+oqcQR9VuqT18rnnbXFTu6VLuKXZRprzg=","szl_lambda_gate/_ops.py":"at8dxC56nm2pFOME2pcgQ45ZwjQQThHz5cyqRezuI7Y=","szl_lambda_gate/_v1.py":"msLY/gpH/xkeunbmKx6d2bK1T2S6DD2GMG4M3Vi8Row=","szl_lambda_gate/governed_norm/__init__.py":"UP5PsJoWXQrpp4Hw7zUVOIx1KhTN6V9zaHhU9Zp9+tw=","szl_lambda_gate/governed_norm/_norm.py":"z3Ks4oHshsUEQm914j7r22YaHjoS5N/MbIufpjSwOUI=","szl_lambda_gate/governed_norm/_receipt.py":"2xJEvRhK/9ypKb04rHKLJpb4KtVlqvgtFMo4RdTXSKk=","szl_lambda_gate/governed_norm/layers.py":"15yDNVyyMyudDp2YWEuGQ05IZTLifTBlLfEBWLMPw3s=","szl_lambda_gate/layers.py":"UdpHjhhe5NFtqplxvcvc/LsMDFt4N6ACuXzQXLlo6nU="}},"id":"_szl_lambda_gate_cpu_7cb79cba7ecb5dbb9da59b2d6b516a98d2a114d6","license":"Apache-2.0","name":"szl-lambda-gate","python-depends":[],"source":"https://github.com/szl-holdings/szl-lambda-gate","universal":false,"version":1}1234567891011121314151617181920212223242526{"backend": {"type": "cpu"},"digest": {"algorithm": "sha256","files": {"szl_lambda_gate/__init__.py": "LZXLKlcqnujwBnjhqK/zR6Esyw1SnSlFpqO9Z/pWWFQ=","szl_lambda_gate/_lambda.py": "+VOjgBnJGm+oqcQR9VuqT18rnnbXFTu6VLuKXZRprzg=","szl_lambda_gate/_ops.py": "at8dxC56nm2pFOME2pcgQ45ZwjQQThHz5cyqRezuI7Y=","szl_lambda_gate/_v1.py": "msLY/gpH/xkeunbmKx6d2bK1T2S6DD2GMG4M3Vi8Row=","szl_lambda_gate/governed_norm/__init__.py": "UP5PsJoWXQrpp4Hw7zUVOIx1KhTN6V9zaHhU9Zp9+tw=","szl_lambda_gate/governed_norm/_norm.py": "z3Ks4oHshsUEQm914j7r22YaHjoS5N/MbIufpjSwOUI=","szl_lambda_gate/governed_norm/_receipt.py": "D6LPfoxfT5tZCIaLptbsBenfvsJqdla4mrK/vfPW2HA=","szl_lambda_gate/governed_norm/layers.py": "15yDNVyyMyudDp2YWEuGQ05IZTLifTBlLfEBWLMPw3s=","szl_lambda_gate/layers.py": "UdpHjhhe5NFtqplxvcvc/LsMDFt4N6ACuXzQXLlo6nU="}},"id": "_szl_lambda_gate_cpu_219ee89500f2","kernel-depends": [],"license": "Apache-2.0","name": "szl-lambda-gate","python-depends": [],"source": "https://github.com/szl-holdings/szl-lambda-gate","version": 1}
15 unmodified lines1617181920212215 unmodified linesimport torchfrom kernels import get_kernellg = get_kernel("SZLHOLDINGS/szl-lambda-gate")axes = torch.tensor([0.9, 0.8, 0.95]) # axis scores in [0,1]score = lg.lambda_aggregate(axes) # Λ(x) ∈ [0,1]res = lg.lambda_gate(axes, threshold=0.5) # ADVISORY pass/fail15 unmodified lines1617181920212215 unmodified linesimport torchfrom kernels import get_kernellg = get_kernel("SZLHOLDINGS/szl-lambda-gate", version=1, trust_remote_code=True)axes = torch.tensor([0.9, 0.8, 0.95]) # axis scores in [0,1]score = lg.lambda_aggregate(axes) # Λ(x) ∈ [0,1]res = lg.lambda_gate(axes, threshold=0.5) # ADVISORY pass/fail
15 unmodified lines16171819202122233 unmodified lines27282930313238 unmodified lines7172737475767778798081828384858687888922 unmodified lines11211311411511611711811912012112212312412512612712816 unmodified lines14514614714814915015127 unmodified lines1791801811821831841851861871881891901911921931941951961971981992002012022032042053 unmodified lines20921021121221321415 unmodified linesit proves authorship. DSSE signing is a separate, out-of-band concern.- Receipts are kept in an in-process, append-only chain. Nothing is writtento disk or the network from inside the kernel.- Stdlib + torch (+ numpy for the output digest) only — Kernel Hubuniversal-kernel requirement.- The canonical szl-receipt v0.2.0 evidence binding (``emit_receipt``) isADDITIVE and IMPORT-GUARDED: with szl-receipt absent it returns ``None`` andthe kernel runs unchanged. It binds subject / input-digest / output-digest /3 unmodified lines"""import hashlibimport jsonimport threadingimport timefrom typing import Any, Dict, List, Optional, Union38 unmodified linesreturn envdef _tensor_digest(t: torch.Tensor, decimals: int = 6) -> str:"""Deterministic SHA3-256 over a tensor's rounded float32 contents.Rounding to a fixed number of decimals makes the digest stable acrossdevices/dtypes for the same logical values (tiny FP noise won't changeit). This is an integrity fingerprint, not a signature."""flat = t.detach().to(torch.float32).reshape(-1)# Round to `decimals` places, integerize, hash the raw bytes. CPU move is# required to read bytes; kept O(n) and allocation-light.scaled = torch.round(flat * (10 ** decimals)).to(torch.int64).cpu().numpy().tobytes()h = hashlib.sha3_256()h.update(scaled)return h.hexdigest()22 unmodified linespolicy_id: str = _POLICY_ID,sign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,) -> Optional[Dict[str, Any]]:"""Canonical szl-receipt v0.2.0 evidence binding for a governed-norm call.ADDITIVE and IMPORT-GUARDED: returns ``None`` when szl-receipt is notinstalled, so this universal Kernel-Hub kernel still imports and runs onstdlib + torch + numpy alone. When szl-receipt is present it binds anEVIDENCE trail and wraps it in a DSSE envelope via ``sign_receipt``:subject organ / norm-call id (who/what emitted this)input_digest SHA3-256 over canonical {input shape, dtype, eps}output_digest the EXISTING SHA3-256 rounded-tensor digest of ``out``policy_id the governing policy idenergy the literal string "UNAVAILABLE"16 unmodified linesbody = {"subject": subject if subject is not None else f"{organ}/{op}","input_digest": _input_digest(x, eps),"output_digest": _tensor_digest(out),"policy_id": policy_id,"energy": _ENERGY_UNAVAILABLE,}27 unmodified linessign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,policy_id: str = _POLICY_ID,) -> Dict[str, Any]:with self._lock:prev = self._records[-1]["digest"] if self._records else _GENESISseq = len(self._records)body = {"seq": seq,"op": op,"in_shape": list(x.shape),"in_dtype": str(x.dtype).replace("torch.", ""),"eps": float(eps),"out_digest": _tensor_digest(out),"prev": prev,}digest = self._digest_body(body)rec = dict(body, digest=digest, ts=time.time())sig = _maybe_sign(body, sign_key, organ)if sig is not None:rec["signature"] = sig# ADDITIVE canonical szl-receipt v0.2.0 evidence binding. Import-# guarded: None when szl-receipt is absent, so the universal kernel# keeps working on stdlib + torch + numpy only. Binds subject /# input-digest / output-digest / policy-id / energy; energy is# "UNAVAILABLE" (no joules measured here). It does NOT enter the# SHA3-256 chain body, so verify() is unaffected.3 unmodified linespolicy_id=policy_id,sign_key=sign_key,organ=organ,)if binding is not None:rec["receipt"] = binding15 unmodified lines161718192021223 unmodified lines2627282930313238 unmodified lines717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916022 unmodified lines18318418518618718818919019119219319419519619719819920020116 unmodified lines21821922022122222322427 unmodified lines2522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872883 unmodified lines29229329429529629729815 unmodified linesit proves authorship. DSSE signing is a separate, out-of-band concern.- Receipts are kept in an in-process, append-only chain. Nothing is writtento disk or the network from inside the kernel.- Stdlib + torch only — Kernel Hub universal-kernel requirement.- The canonical szl-receipt v0.2.0 evidence binding (``emit_receipt``) isADDITIVE and IMPORT-GUARDED: with szl-receipt absent it returns ``None`` andthe kernel runs unchanged. It binds subject / input-digest / output-digest /3 unmodified lines"""import hashlibimport jsonimport structimport threadingimport timefrom typing import Any, Dict, List, Optional, Union38 unmodified linesreturn env# Historical receipts used the rounded-int64 encoding. The class-byte encoding# prefixes one class byte per element, so finite-value digests change too.# A stored hash is never rewritten from one encoding into the other.# Donor: szl-governed-norm src _receipt.py at# 3ef27eb7ebf491b0a6ce69be170ecef4c37885a2, file pin# c68d06d35058542ea77dc6bad4c8bde2361cc16a.TENSOR_DIGEST_LEGACY = "rounded-int64-v1"TENSOR_DIGEST_CLASS_BYTE = "class-byte-v1"TENSOR_DIGEST_DEFAULT = TENSOR_DIGEST_CLASS_BYTEdef _update_tensor_bytes(h, tensor: torch.Tensor) -> None:"""Hash native-endian uint8 or int64 tensor bytes without NumPy.Bounded chunks preserve the historical byte stream without building aPython list for the entire output tensor."""flat = tensor.cpu().contiguous().reshape(-1)for chunk in flat.split(4096):values = chunk.tolist()if flat.dtype == torch.uint8:h.update(bytes(values))elif flat.dtype == torch.int64:h.update(struct.pack(f"={len(values)}q", *values))else:raise TypeError(f"unsupported tensor digest dtype: {flat.dtype}")def _tensor_digest(t: torch.Tensor,decimals: int = 6,*,encoding: str = TENSOR_DIGEST_DEFAULT,) -> str:"""SHA3-256 of a tensor under an explicit encoding.``rounded-int64-v1`` is the historical interpretation. ``class-byte-v1``is the current default. Passing the other encoding interprets the sametensor; it does not replace a hash that was already stored."""if encoding == TENSOR_DIGEST_LEGACY:return _tensor_digest_legacy(t, decimals)if encoding == TENSOR_DIGEST_CLASS_BYTE:return _tensor_digest_class_byte(t, decimals)raise ValueError(f"unknown tensor digest encoding {encoding!r}; "f"expected {TENSOR_DIGEST_LEGACY!r} or {TENSOR_DIGEST_CLASS_BYTE!r}")def _tensor_digest_legacy(t: torch.Tensor, decimals: int = 6) -> str:"""Historical digest: rounded int64 payload only.Non-finite values can collide under int64 saturation. This functionremains so those historical hashes can still be reproduced."""flat = t.detach().to(torch.float32).reshape(-1)scaled = torch.round(flat * (10 ** decimals)).to(torch.int64)h = hashlib.sha3_256()_update_tensor_bytes(h, scaled)return h.hexdigest()def _tensor_digest_class_byte(t: torch.Tensor, decimals: int = 6) -> str:"""Class-byte digest. Finite digests change because the class bytes are hashed first.Each element contributes a class byte (0 = finite, 1 = +Inf, 2 = -Inf,3 = NaN) and then its rounded int64 payload. Non-finite payloads are 0,so the class byte carries their identity. Finite payloads stay therounded int64 values, but the prefix means the SHA3-256 digest is notthe legacy digest. -0.0 and +0.0 still share a digest."""flat = t.detach().to(torch.float32).reshape(-1)cls = torch.zeros_like(flat, dtype=torch.uint8)cls[flat == float("inf")] = 1cls[flat == float("-inf")] = 2cls[torch.isnan(flat)] = 3finite = cls == 0scaled = torch.where(finite, torch.round(flat * (10 ** decimals)), torch.zeros_like(flat)).to(torch.int64)h = hashlib.sha3_256()_update_tensor_bytes(h, cls)_update_tensor_bytes(h, scaled)return h.hexdigest()22 unmodified linespolicy_id: str = _POLICY_ID,sign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,digest_encoding: str = TENSOR_DIGEST_DEFAULT,) -> Optional[Dict[str, Any]]:"""Canonical szl-receipt v0.2.0 evidence binding for a governed-norm call.ADDITIVE and IMPORT-GUARDED: returns ``None`` when szl-receipt is notinstalled, so this universal Kernel-Hub kernel still imports and runs onstdlib + torch alone. When szl-receipt is present it binds anEVIDENCE trail and wraps it in a DSSE envelope via ``sign_receipt``:subject organ / norm-call id (who/what emitted this)input_digest SHA3-256 over canonical {input shape, dtype, eps}output_digest SHA3-256 of ``out`` under ``digest_encoding``(default class-byte-v1; legacy remains callable)policy_id the governing policy idenergy the literal string "UNAVAILABLE"16 unmodified linesbody = {"subject": subject if subject is not None else f"{organ}/{op}","input_digest": _input_digest(x, eps),"output_digest": _tensor_digest(out, encoding=digest_encoding),"policy_id": policy_id,"energy": _ENERGY_UNAVAILABLE,}27 unmodified linessign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,policy_id: str = _POLICY_ID,digest_encoding: str = TENSOR_DIGEST_DEFAULT,) -> Dict[str, Any]:with self._lock:prev = self._records[-1]["digest"] if self._records else _GENESISseq = len(self._records)# The encoding label stays outside the hashed body. verify()# still rebuilds that body from the original keys, so a legacy# receipt is not rewritten when this field is absent or present.out_digest = _tensor_digest(out, encoding=digest_encoding)body = {"seq": seq,"op": op,"in_shape": list(x.shape),"in_dtype": str(x.dtype).replace("torch.", ""),"eps": float(eps),"out_digest": out_digest,"prev": prev,}digest = self._digest_body(body)rec = dict(body,digest=digest,ts=time.time(),tensor_digest_encoding=digest_encoding,)sig = _maybe_sign(body, sign_key, organ)if sig is not None:rec["signature"] = sig# ADDITIVE canonical szl-receipt v0.2.0 evidence binding. Import-# guarded: None when szl-receipt is absent, so the universal kernel# keeps working on stdlib + torch only. Binds subject /# input-digest / output-digest / policy-id / energy; energy is# "UNAVAILABLE" (no joules measured here). It does NOT enter the# SHA3-256 chain body, so verify() is unaffected.3 unmodified linespolicy_id=policy_id,sign_key=sign_key,organ=organ,digest_encoding=digest_encoding,)if binding is not None:rec["receipt"] = binding
12from .szl_lambda_gate import * # noqa: F401,F403from .szl_lambda_gate import __all__1{"backend":{"type":"cpu"},"digest":{"algorithm":"sha256","files":{"__init__.py":"NuinjlWRNlWgg0y2D61HEaKtW/VOktRHP8w2Nj3opjQ=","szl_lambda_gate/__init__.py":"QpfkkacuKUGxXitqBYLq0nM4NnCsX7uNFOLHbeye0V0=","szl_lambda_gate/_lambda.py":"+VOjgBnJGm+oqcQR9VuqT18rnnbXFTu6VLuKXZRprzg=","szl_lambda_gate/_ops.py":"at8dxC56nm2pFOME2pcgQ45ZwjQQThHz5cyqRezuI7Y=","szl_lambda_gate/_v1.py":"msLY/gpH/xkeunbmKx6d2bK1T2S6DD2GMG4M3Vi8Row=","szl_lambda_gate/governed_norm/__init__.py":"UP5PsJoWXQrpp4Hw7zUVOIx1KhTN6V9zaHhU9Zp9+tw=","szl_lambda_gate/governed_norm/_norm.py":"z3Ks4oHshsUEQm914j7r22YaHjoS5N/MbIufpjSwOUI=","szl_lambda_gate/governed_norm/_receipt.py":"2xJEvRhK/9ypKb04rHKLJpb4KtVlqvgtFMo4RdTXSKk=","szl_lambda_gate/governed_norm/layers.py":"15yDNVyyMyudDp2YWEuGQ05IZTLifTBlLfEBWLMPw3s=","szl_lambda_gate/layers.py":"UdpHjhhe5NFtqplxvcvc/LsMDFt4N6ACuXzQXLlo6nU="}},"id":"_szl_lambda_gate_universal_7cb79cba7ecb5dbb9da59b2d6b516a98d2a114d6","license":"Apache-2.0","name":"szl-lambda-gate","python-depends":[],"source":"https://github.com/szl-holdings/szl-lambda-gate","universal":true,"version":1}1234567891011121314151617181920212223242526{"backend": {"type": "cpu"},"digest": {"algorithm": "sha256","files": {"szl_lambda_gate/__init__.py": "LZXLKlcqnujwBnjhqK/zR6Esyw1SnSlFpqO9Z/pWWFQ=","szl_lambda_gate/_lambda.py": "+VOjgBnJGm+oqcQR9VuqT18rnnbXFTu6VLuKXZRprzg=","szl_lambda_gate/_ops.py": "at8dxC56nm2pFOME2pcgQ45ZwjQQThHz5cyqRezuI7Y=","szl_lambda_gate/_v1.py": "msLY/gpH/xkeunbmKx6d2bK1T2S6DD2GMG4M3Vi8Row=","szl_lambda_gate/governed_norm/__init__.py": "UP5PsJoWXQrpp4Hw7zUVOIx1KhTN6V9zaHhU9Zp9+tw=","szl_lambda_gate/governed_norm/_norm.py": "z3Ks4oHshsUEQm914j7r22YaHjoS5N/MbIufpjSwOUI=","szl_lambda_gate/governed_norm/_receipt.py": "D6LPfoxfT5tZCIaLptbsBenfvsJqdla4mrK/vfPW2HA=","szl_lambda_gate/governed_norm/layers.py": "15yDNVyyMyudDp2YWEuGQ05IZTLifTBlLfEBWLMPw3s=","szl_lambda_gate/layers.py": "UdpHjhhe5NFtqplxvcvc/LsMDFt4N6ACuXzQXLlo6nU="}},"id": "_szl_lambda_gate_universal_219ee89500f2","kernel-depends": [],"license": "Apache-2.0","name": "szl-lambda-gate","python-depends": [],"source": "https://github.com/szl-holdings/szl-lambda-gate","version": 1}
15 unmodified lines1617181920212215 unmodified linesimport torchfrom kernels import get_kernellg = get_kernel("SZLHOLDINGS/szl-lambda-gate")axes = torch.tensor([0.9, 0.8, 0.95]) # axis scores in [0,1]score = lg.lambda_aggregate(axes) # Λ(x) ∈ [0,1]res = lg.lambda_gate(axes, threshold=0.5) # ADVISORY pass/fail15 unmodified lines1617181920212215 unmodified linesimport torchfrom kernels import get_kernellg = get_kernel("SZLHOLDINGS/szl-lambda-gate", version=1, trust_remote_code=True)axes = torch.tensor([0.9, 0.8, 0.95]) # axis scores in [0,1]score = lg.lambda_aggregate(axes) # Λ(x) ∈ [0,1]res = lg.lambda_gate(axes, threshold=0.5) # ADVISORY pass/fail
15 unmodified lines16171819202122233 unmodified lines27282930313238 unmodified lines7172737475767778798081828384858687888922 unmodified lines11211311411511611711811912012112212312412512612712816 unmodified lines14514614714814915015127 unmodified lines1791801811821831841851861871881891901911921931941951961971981992002012022032042053 unmodified lines20921021121221321415 unmodified linesit proves authorship. DSSE signing is a separate, out-of-band concern.- Receipts are kept in an in-process, append-only chain. Nothing is writtento disk or the network from inside the kernel.- Stdlib + torch (+ numpy for the output digest) only — Kernel Hubuniversal-kernel requirement.- The canonical szl-receipt v0.2.0 evidence binding (``emit_receipt``) isADDITIVE and IMPORT-GUARDED: with szl-receipt absent it returns ``None`` andthe kernel runs unchanged. It binds subject / input-digest / output-digest /3 unmodified lines"""import hashlibimport jsonimport threadingimport timefrom typing import Any, Dict, List, Optional, Union38 unmodified linesreturn envdef _tensor_digest(t: torch.Tensor, decimals: int = 6) -> str:"""Deterministic SHA3-256 over a tensor's rounded float32 contents.Rounding to a fixed number of decimals makes the digest stable acrossdevices/dtypes for the same logical values (tiny FP noise won't changeit). This is an integrity fingerprint, not a signature."""flat = t.detach().to(torch.float32).reshape(-1)# Round to `decimals` places, integerize, hash the raw bytes. CPU move is# required to read bytes; kept O(n) and allocation-light.scaled = torch.round(flat * (10 ** decimals)).to(torch.int64).cpu().numpy().tobytes()h = hashlib.sha3_256()h.update(scaled)return h.hexdigest()22 unmodified linespolicy_id: str = _POLICY_ID,sign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,) -> Optional[Dict[str, Any]]:"""Canonical szl-receipt v0.2.0 evidence binding for a governed-norm call.ADDITIVE and IMPORT-GUARDED: returns ``None`` when szl-receipt is notinstalled, so this universal Kernel-Hub kernel still imports and runs onstdlib + torch + numpy alone. When szl-receipt is present it binds anEVIDENCE trail and wraps it in a DSSE envelope via ``sign_receipt``:subject organ / norm-call id (who/what emitted this)input_digest SHA3-256 over canonical {input shape, dtype, eps}output_digest the EXISTING SHA3-256 rounded-tensor digest of ``out``policy_id the governing policy idenergy the literal string "UNAVAILABLE"16 unmodified linesbody = {"subject": subject if subject is not None else f"{organ}/{op}","input_digest": _input_digest(x, eps),"output_digest": _tensor_digest(out),"policy_id": policy_id,"energy": _ENERGY_UNAVAILABLE,}27 unmodified linessign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,policy_id: str = _POLICY_ID,) -> Dict[str, Any]:with self._lock:prev = self._records[-1]["digest"] if self._records else _GENESISseq = len(self._records)body = {"seq": seq,"op": op,"in_shape": list(x.shape),"in_dtype": str(x.dtype).replace("torch.", ""),"eps": float(eps),"out_digest": _tensor_digest(out),"prev": prev,}digest = self._digest_body(body)rec = dict(body, digest=digest, ts=time.time())sig = _maybe_sign(body, sign_key, organ)if sig is not None:rec["signature"] = sig# ADDITIVE canonical szl-receipt v0.2.0 evidence binding. Import-# guarded: None when szl-receipt is absent, so the universal kernel# keeps working on stdlib + torch + numpy only. Binds subject /# input-digest / output-digest / policy-id / energy; energy is# "UNAVAILABLE" (no joules measured here). It does NOT enter the# SHA3-256 chain body, so verify() is unaffected.3 unmodified linespolicy_id=policy_id,sign_key=sign_key,organ=organ,)if binding is not None:rec["receipt"] = binding15 unmodified lines161718192021223 unmodified lines2627282930313238 unmodified lines717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916022 unmodified lines18318418518618718818919019119219319419519619719819920020116 unmodified lines21821922022122222322427 unmodified lines2522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872883 unmodified lines29229329429529629729815 unmodified linesit proves authorship. DSSE signing is a separate, out-of-band concern.- Receipts are kept in an in-process, append-only chain. Nothing is writtento disk or the network from inside the kernel.- Stdlib + torch only — Kernel Hub universal-kernel requirement.- The canonical szl-receipt v0.2.0 evidence binding (``emit_receipt``) isADDITIVE and IMPORT-GUARDED: with szl-receipt absent it returns ``None`` andthe kernel runs unchanged. It binds subject / input-digest / output-digest /3 unmodified lines"""import hashlibimport jsonimport structimport threadingimport timefrom typing import Any, Dict, List, Optional, Union38 unmodified linesreturn env# Historical receipts used the rounded-int64 encoding. The class-byte encoding# prefixes one class byte per element, so finite-value digests change too.# A stored hash is never rewritten from one encoding into the other.# Donor: szl-governed-norm src _receipt.py at# 3ef27eb7ebf491b0a6ce69be170ecef4c37885a2, file pin# c68d06d35058542ea77dc6bad4c8bde2361cc16a.TENSOR_DIGEST_LEGACY = "rounded-int64-v1"TENSOR_DIGEST_CLASS_BYTE = "class-byte-v1"TENSOR_DIGEST_DEFAULT = TENSOR_DIGEST_CLASS_BYTEdef _update_tensor_bytes(h, tensor: torch.Tensor) -> None:"""Hash native-endian uint8 or int64 tensor bytes without NumPy.Bounded chunks preserve the historical byte stream without building aPython list for the entire output tensor."""flat = tensor.cpu().contiguous().reshape(-1)for chunk in flat.split(4096):values = chunk.tolist()if flat.dtype == torch.uint8:h.update(bytes(values))elif flat.dtype == torch.int64:h.update(struct.pack(f"={len(values)}q", *values))else:raise TypeError(f"unsupported tensor digest dtype: {flat.dtype}")def _tensor_digest(t: torch.Tensor,decimals: int = 6,*,encoding: str = TENSOR_DIGEST_DEFAULT,) -> str:"""SHA3-256 of a tensor under an explicit encoding.``rounded-int64-v1`` is the historical interpretation. ``class-byte-v1``is the current default. Passing the other encoding interprets the sametensor; it does not replace a hash that was already stored."""if encoding == TENSOR_DIGEST_LEGACY:return _tensor_digest_legacy(t, decimals)if encoding == TENSOR_DIGEST_CLASS_BYTE:return _tensor_digest_class_byte(t, decimals)raise ValueError(f"unknown tensor digest encoding {encoding!r}; "f"expected {TENSOR_DIGEST_LEGACY!r} or {TENSOR_DIGEST_CLASS_BYTE!r}")def _tensor_digest_legacy(t: torch.Tensor, decimals: int = 6) -> str:"""Historical digest: rounded int64 payload only.Non-finite values can collide under int64 saturation. This functionremains so those historical hashes can still be reproduced."""flat = t.detach().to(torch.float32).reshape(-1)scaled = torch.round(flat * (10 ** decimals)).to(torch.int64)h = hashlib.sha3_256()_update_tensor_bytes(h, scaled)return h.hexdigest()def _tensor_digest_class_byte(t: torch.Tensor, decimals: int = 6) -> str:"""Class-byte digest. Finite digests change because the class bytes are hashed first.Each element contributes a class byte (0 = finite, 1 = +Inf, 2 = -Inf,3 = NaN) and then its rounded int64 payload. Non-finite payloads are 0,so the class byte carries their identity. Finite payloads stay therounded int64 values, but the prefix means the SHA3-256 digest is notthe legacy digest. -0.0 and +0.0 still share a digest."""flat = t.detach().to(torch.float32).reshape(-1)cls = torch.zeros_like(flat, dtype=torch.uint8)cls[flat == float("inf")] = 1cls[flat == float("-inf")] = 2cls[torch.isnan(flat)] = 3finite = cls == 0scaled = torch.where(finite, torch.round(flat * (10 ** decimals)), torch.zeros_like(flat)).to(torch.int64)h = hashlib.sha3_256()_update_tensor_bytes(h, cls)_update_tensor_bytes(h, scaled)return h.hexdigest()22 unmodified linespolicy_id: str = _POLICY_ID,sign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,digest_encoding: str = TENSOR_DIGEST_DEFAULT,) -> Optional[Dict[str, Any]]:"""Canonical szl-receipt v0.2.0 evidence binding for a governed-norm call.ADDITIVE and IMPORT-GUARDED: returns ``None`` when szl-receipt is notinstalled, so this universal Kernel-Hub kernel still imports and runs onstdlib + torch alone. When szl-receipt is present it binds anEVIDENCE trail and wraps it in a DSSE envelope via ``sign_receipt``:subject organ / norm-call id (who/what emitted this)input_digest SHA3-256 over canonical {input shape, dtype, eps}output_digest SHA3-256 of ``out`` under ``digest_encoding``(default class-byte-v1; legacy remains callable)policy_id the governing policy idenergy the literal string "UNAVAILABLE"16 unmodified linesbody = {"subject": subject if subject is not None else f"{organ}/{op}","input_digest": _input_digest(x, eps),"output_digest": _tensor_digest(out, encoding=digest_encoding),"policy_id": policy_id,"energy": _ENERGY_UNAVAILABLE,}27 unmodified linessign_key: Optional[Union[str, bytes]] = None,organ: str = _ORGAN,policy_id: str = _POLICY_ID,digest_encoding: str = TENSOR_DIGEST_DEFAULT,) -> Dict[str, Any]:with self._lock:prev = self._records[-1]["digest"] if self._records else _GENESISseq = len(self._records)# The encoding label stays outside the hashed body. verify()# still rebuilds that body from the original keys, so a legacy# receipt is not rewritten when this field is absent or present.out_digest = _tensor_digest(out, encoding=digest_encoding)body = {"seq": seq,"op": op,"in_shape": list(x.shape),"in_dtype": str(x.dtype).replace("torch.", ""),"eps": float(eps),"out_digest": out_digest,"prev": prev,}digest = self._digest_body(body)rec = dict(body,digest=digest,ts=time.time(),tensor_digest_encoding=digest_encoding,)sig = _maybe_sign(body, sign_key, organ)if sig is not None:rec["signature"] = sig# ADDITIVE canonical szl-receipt v0.2.0 evidence binding. Import-# guarded: None when szl-receipt is absent, so the universal kernel# keeps working on stdlib + torch only. Binds subject /# input-digest / output-digest / policy-id / energy; energy is# "UNAVAILABLE" (no joules measured here). It does NOT enter the# SHA3-256 chain body, so verify() is unaffected.3 unmodified linespolicy_id=policy_id,sign_key=sign_key,organ=organ,digest_encoding=digest_encoding,)if binding is not None:rec["receipt"] = binding
1{"files":{"build.toml":"5c5ebbfe83770a898b8b8893e342c2c5547c65cd2b5a96146b14e3abb9411f3b","build/torch-cpu/__init__.py":"36e8a78e55913655a0834cb60fad4711a2ad5bf54e92d4473fcc36363de8a634","build/torch-cpu/metadata.json":"d15c8285af060f9c1e43ff269650508fe0f31a0297cfbd309aff552e9de8d3d4","build/torch-cpu/szl_lambda_gate/__init__.py":"4297e491a72e2941b15e2b6a0582ead273383670ac5fbb8d14e2c76dec9ed15d","build/torch-cpu/szl_lambda_gate/_lambda.py":"f953a38019c91a6fa8a9c411f55baa4f5f2b9e76d7153bba54bb8a5d9469af38","build/torch-cpu/szl_lambda_gate/_ops.py":"6adf1dc42e7a9e6da914e304da9720438e59c234104e11f3e5ccaa45ecee23b6","build/torch-cpu/szl_lambda_gate/_v1.py":"9ac2d8fe0a47ff191eba76e62b1e9dd9b2b54f64ba0c3d86306e0cdd58bc468c","build/torch-cpu/szl_lambda_gate/governed_norm/__init__.py":"50fe4fb09a165d0ae9a781f0ef3515388c752a14cde95f73687854f59a7dfadc","build/torch-cpu/szl_lambda_gate/governed_norm/_norm.py":"cf72ace281ec86c504426f75e23eebdb661a1e3a12e4dfcc6c8b9fa634b03942","build/torch-cpu/szl_lambda_gate/governed_norm/_receipt.py":"db1244bd184affdca929bd38ac728b2696f82ad565aaf82d14ca3845d4d748a9","build/torch-cpu/szl_lambda_gate/governed_norm/layers.py":"d79c83355cb2332b9d0e9d98584b86434e486532e27d30652df10158b30fc37b","build/torch-cpu/szl_lambda_gate/layers.py":"51da478e185ee4d16daa9971bdcbdcfcbb0c0c5b7837a002b97cd05cb968ea75","build/torch-universal/__init__.py":"36e8a78e55913655a0834cb60fad4711a2ad5bf54e92d4473fcc36363de8a634","build/torch-universal/metadata.json":"448ed5fb0c866455d045cdc7a75e1bbcaccc8d9f323039daf62cda1f5a35e0b4","build/torch-universal/szl_lambda_gate/__init__.py":"4297e491a72e2941b15e2b6a0582ead273383670ac5fbb8d14e2c76dec9ed15d","build/torch-universal/szl_lambda_gate/_lambda.py":"f953a38019c91a6fa8a9c411f55baa4f5f2b9e76d7153bba54bb8a5d9469af38","build/torch-universal/szl_lambda_gate/_ops.py":"6adf1dc42e7a9e6da914e304da9720438e59c234104e11f3e5ccaa45ecee23b6","build/torch-universal/szl_lambda_gate/_v1.py":"9ac2d8fe0a47ff191eba76e62b1e9dd9b2b54f64ba0c3d86306e0cdd58bc468c","build/torch-universal/szl_lambda_gate/governed_norm/__init__.py":"50fe4fb09a165d0ae9a781f0ef3515388c752a14cde95f73687854f59a7dfadc","build/torch-universal/szl_lambda_gate/governed_norm/_norm.py":"cf72ace281ec86c504426f75e23eebdb661a1e3a12e4dfcc6c8b9fa634b03942","build/torch-universal/szl_lambda_gate/governed_norm/_receipt.py":"db1244bd184affdca929bd38ac728b2696f82ad565aaf82d14ca3845d4d748a9","build/torch-universal/szl_lambda_gate/governed_norm/layers.py":"d79c83355cb2332b9d0e9d98584b86434e486532e27d30652df10158b30fc37b","build/torch-universal/szl_lambda_gate/layers.py":"51da478e185ee4d16daa9971bdcbdcfcbb0c0c5b7837a002b97cd05cb968ea75","reference/szl_lambda_v1.py":"57b264fa96056d1f2d77b797ba80eab087a729283f16416196fdd1423c9c532f","source/LICENSE":"bc8cef3450d423b046a3ba2b1a03089c8c795302f502cabbdbef055a68f0b1e7","spec/lambda_v1_vectors.json":"460bb966ff2bec4fd99e03d267b721f22c5fad731e0667723407a6909bd4dcec","spec/szl.lambda.v1.json":"04a8368568d59509c8603cdc45cf80f6b1395e751c77eabb1957bbe12906f2d9"},"packager":"scripts/build_lambda_distribution.py","schema":"szl.lambda/distribution.v1","source_commit":"7cb79cba7ecb5dbb9da59b2d6b516a98d2a114d6","source_files":{"LICENSE":"bc8cef3450d423b046a3ba2b1a03089c8c795302f502cabbdbef055a68f0b1e7","build.toml":"5c5ebbfe83770a898b8b8893e342c2c5547c65cd2b5a96146b14e3abb9411f3b","reference/szl_lambda_v1.py":"57b264fa96056d1f2d77b797ba80eab087a729283f16416196fdd1423c9c532f","spec/lambda_v1_vectors.json":"460bb966ff2bec4fd99e03d267b721f22c5fad731e0667723407a6909bd4dcec","spec/szl.lambda.v1.json":"04a8368568d59509c8603cdc45cf80f6b1395e751c77eabb1957bbe12906f2d9","torch-ext/szl_lambda_gate/__init__.py":"4297e491a72e2941b15e2b6a0582ead273383670ac5fbb8d14e2c76dec9ed15d","torch-ext/szl_lambda_gate/_lambda.py":"f953a38019c91a6fa8a9c411f55baa4f5f2b9e76d7153bba54bb8a5d9469af38","torch-ext/szl_lambda_gate/_ops.py":"6adf1dc42e7a9e6da914e304da9720438e59c234104e11f3e5ccaa45ecee23b6","torch-ext/szl_lambda_gate/_v1.py":"9ac2d8fe0a47ff191eba76e62b1e9dd9b2b54f64ba0c3d86306e0cdd58bc468c","torch-ext/szl_lambda_gate/governed_norm/__init__.py":"50fe4fb09a165d0ae9a781f0ef3515388c752a14cde95f73687854f59a7dfadc","torch-ext/szl_lambda_gate/governed_norm/_norm.py":"cf72ace281ec86c504426f75e23eebdb661a1e3a12e4dfcc6c8b9fa634b03942","torch-ext/szl_lambda_gate/governed_norm/_receipt.py":"db1244bd184affdca929bd38ac728b2696f82ad565aaf82d14ca3845d4d748a9","torch-ext/szl_lambda_gate/governed_norm/layers.py":"d79c83355cb2332b9d0e9d98584b86434e486532e27d30652df10158b30fc37b","torch-ext/szl_lambda_gate/layers.py":"51da478e185ee4d16daa9971bdcbdcfcbb0c0c5b7837a002b97cd05cb968ea75"},"source_repository":"https://github.com/szl-holdings/szl-lambda-gate","vectors_count":60,"vectors_sha256":"61bfb0410b9f0eaab0eb9f22f29cb7cb13cfde8c083fe308d895565d6ba9ebd4"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright 2026 SZL Holdings
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.BENCH.laptop-blackwell.jsonDeleted-186
LICENSE+185-2
OPERATIONAL.jsonDeleted-51
README.md+105-195
SZL_KERNEL_SOURCE.jsonAdded+49
build/torch-cpu/__init__.pyDeleted-2
build/torch-cpu/metadata.json+26-1
build/torch-cpu/szl_lambda_gate/__init__.py+1-1
build/torch-cpu/szl_lambda_gate/governed_norm/_receipt.py+101-17
build/torch-universal/__init__.pyDeleted-2
build/torch-universal/metadata.json+26-1
build/torch-universal/szl_lambda_gate/__init__.py+1-1
build/torch-universal/szl_lambda_gate/governed_norm/_receipt.py+101-17
distribution.jsonDeleted-1
source/LICENSEDeleted-202