Orion FHE compiler — traces, fits, and compiles PyTorch neural networks for encrypted inference
Project description
orion-v2-compiler
Orion FHE compiler — traces, fits, and compiles PyTorch neural networks for encrypted inference using the CKKS scheme.
Part of the Orion FHE framework.
Usage
import orion_compiler.nn as on
from orion_compiler import Compiler, CKKSParams
class MLP(on.Module):
def __init__(self):
super().__init__()
self.flatten = on.Flatten()
self.fc1 = on.Linear(784, 128)
self.act1 = on.Quad()
self.fc2 = on.Linear(128, 10)
def forward(self, x):
x = self.flatten(x)
x = self.act1(self.fc1(x))
return self.fc2(x)
net = MLP()
compiler = Compiler(net, CKKSParams(logn=14, logq=[55, 40, 40, 40], logp=[61, 61], log_default_scale=40))
compiler.fit(dataloader)
compiled = compiler.compile()
model_bytes = compiled.to_bytes()
Modules
orion_compiler—Compiler,CKKSParams,CompiledModel,Graph,GraphNode,GraphEdge,KeyManifest,CompilerConfig,CostProfileorion_compiler.nn— FHE-compatible layers (cleartext-only forward)orion_compiler.core— Compilation algorithms (tracer, packing, level assignment, auto-bootstrap, galois)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orion_v2_compiler-2.1.1.tar.gz.
File metadata
- Download URL: orion_v2_compiler-2.1.1.tar.gz
- Upload date:
- Size: 44.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e617e942a45d273dd9a518ebb03fb3f895d1f773899700250ebe10f5806a286
|
|
| MD5 |
2ff9288f8751c1ecd181c157ee8bc70a
|
|
| BLAKE2b-256 |
bebc2b10a484f82a98d9ed02d0d09513f12d799c68e04088f84c1ee240cebd82
|
Provenance
The following attestation bundles were made for orion_v2_compiler-2.1.1.tar.gz:
Publisher:
release.yml on butvinm/orion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orion_v2_compiler-2.1.1.tar.gz -
Subject digest:
3e617e942a45d273dd9a518ebb03fb3f895d1f773899700250ebe10f5806a286 - Sigstore transparency entry: 1185609279
- Sigstore integration time:
-
Permalink:
butvinm/orion@a09456e2ec8b15322d7663b88da340a6fbd2dca7 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/butvinm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a09456e2ec8b15322d7663b88da340a6fbd2dca7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file orion_v2_compiler-2.1.1-py3-none-any.whl.
File metadata
- Download URL: orion_v2_compiler-2.1.1-py3-none-any.whl
- Upload date:
- Size: 54.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcf4292982b5fd7c418e0241e8eb6cc2c186b8f2420ede9490a3f1d29b5bfd84
|
|
| MD5 |
df94917cd7c1a3d1bd06bfd3be95542c
|
|
| BLAKE2b-256 |
5fdb76acee6a7a4a0e0ae985ab2ad72a0b58ab8d529f1a4b3c331ab443c313e2
|
Provenance
The following attestation bundles were made for orion_v2_compiler-2.1.1-py3-none-any.whl:
Publisher:
release.yml on butvinm/orion
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orion_v2_compiler-2.1.1-py3-none-any.whl -
Subject digest:
bcf4292982b5fd7c418e0241e8eb6cc2c186b8f2420ede9490a3f1d29b5bfd84 - Sigstore transparency entry: 1185609376
- Sigstore integration time:
-
Permalink:
butvinm/orion@a09456e2ec8b15322d7663b88da340a6fbd2dca7 -
Branch / Tag:
refs/tags/v2.1.1 - Owner: https://github.com/butvinm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a09456e2ec8b15322d7663b88da340a6fbd2dca7 -
Trigger Event:
push
-
Statement type: