Skip to main content


:thought_balloon:

EZKL


Easy Zero-Knowledge Inference

Test

ezkl is a library and command-line tool for doing inference for deep learning models and other computational graphs in a zk-snark (ZKML). It enables the following workflow:

  1. Define a computational graph, for instance a neural network (but really any arbitrary set of operations), as you would normally in pytorch or tensorflow.
  2. Export the final graph of operations as an .onnx file and some sample inputs to a .json file.
  3. Point ezkl to the .onnx and .json files to generate a ZK-SNARK circuit with which you can prove statements such as:

"I ran this publicly available neural network on some private data and it produced this output"

"I ran my private neural network on some public data and it produced this output"

"I correctly ran this publicly available neural network on some public data and it produced this output"

In the backend we use Halo2 as a proof system.

resources 📖

docs the official ezkl docs page
tutorial end-to-end tutorial using pytorch and ezkl
notebook end-to-end tutorial using pytorch and ezkl in a jupyter notebook
cargo doc --open compile and open the docs in your default browser

Getting Started ⚙️

https://user-images.githubusercontent.com/45801863/236771676-5bbbbfd1-ba6f-418a-902e-20738ce0e9f0.mp4

building the project 🔨

Note that the library requires a nightly version of the rust toolchain. You can change the default toolchain by running:

rustup override set nightly

After which you may build the library

cargo build --release

A folder ./target/release will be generated. Add this folder to your PATH environment variable to call ezkl from the CLI.

# For UNIX like systems
# in .bashrc, .bash_profile, or some other path file
export PATH="<replace with where you cloned the repo>/ezkl/target/release:$PATH"

Restart your shell or reload your shell settings

# example, replace .bash_profile with the file you use to configure your shell
source ~/.bash_profile

You will need a functioning installation of solc in order to run ezkl properly. solc-select is recommended. Follow the instructions on solc-select to activate solc in your environment.

Repos

The EZKL project has several libraries and repos.

Repo Description
@zkonduit/ezkl the main ezkl repo in rust
@zkonduit/pyezkl helper functions in python for processing onnx files
@zkonduit/ezkl-docs official ezkl docs

Contributing 🌎

If you're interested in contributing and are unsure where to start, reach out to one of the maintainers:

  • dante (alexander-camuto)
  • jason (jasonmorton)

More broadly:

Metadata

Release files for ezkl-lib 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for ezkl-lib 0.1.0
File
ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
ezkl_lib-0.1.0-cp37-abi3-win32.whl CPython 3.7 abi3 Windows x86-32 Details
ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl CPython 3.7 abi3 Linux musl 1.2+ x86-64 Details
ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_armv7l.whl CPython 3.7 abi3 Linux musl 1.2+ ARMv7l Details
ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_aarch64.whl CPython 3.7 abi3 Linux musl 1.2+ ARM64 Details
ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details
ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-32 Details
ezkl_lib-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl CPython 3.7 abi3 macOS 10.9+ x86-64, macOS 11.0+ ARM64, macOS 10.9+ universal2 (ARM64, x86-64) Details
ezkl_lib-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl CPython 3.7 abi3 macOS 10.7+ x86-64 Details

Total release size: 121.4 MB

Release files / ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-win_amd64.whl
Size 10.0 MB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
a097d2a7520fd128f4494e8d059718d4e8beffd9fd4f7c6c35252a07a85d71cf
BLAKE2b-256 checksum
How to use checksums
80af4cc96a0df96d2af30b0e9c852f8a5ef004509ae0f680dc8ed74d8330c8ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-win32.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-win32.whl
Size 9.1 MB
Tags CPython 3.7 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
ed62fe599c9d063d3d25113d0a2db02b161958e1d4aa34b2c4332b8594dbab4e
BLAKE2b-256 checksum
How to use checksums
3243ff0b16b91c638a06c2e545bd8b2ed8de540e570e8220e32444922013f640
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl
Size 14.3 MB
Tags CPython 3.7 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
db32ad521f563f7916ec1c2ab2f73b405f27d076ea8ecc785e49e43c1f25e72f
BLAKE2b-256 checksum
How to use checksums
1dfb7c8551b83115f2f97a2a0e199818f0b2dee032be7772d12a198bdf32a0de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_armv7l.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_armv7l.whl
Size 12.9 MB
Tags CPython 3.7 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
e54eb55d4a764eec2e0c3c2397b074887c8f5292d910936aa42b55f49ef45736
BLAKE2b-256 checksum
How to use checksums
2da36b7a0743da54279b82e1980a47533b925a103b05e2330e8b3f1f6058a144
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_aarch64.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-musllinux_1_2_aarch64.whl
Size 13.4 MB
Tags CPython 3.7 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
632abd57424d8e8c15e34c2b381eb418da126cb4a04f6dbc004c65c249f100a5
BLAKE2b-256 checksum
How to use checksums
b37d08fd3b1782402203880f424f643b07c92da160c449feb07376009c0d8437
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 14.2 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
d5fce7bd4915aedc6a516edc32642e2fbef1b53392a2a71f93baf60467e38c17
BLAKE2b-256 checksum
How to use checksums
3541deb4553b4ca9897ba3c21fd1b2af59f0615e1dca94fcb9484a1e6b35bb3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Size 14.5 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-32 abi3
SHA-256 checksum
How to use checksums
93416c1b245bf0b1e5e5a01f46aa525a84f630f368530ab80f6cdb84570aa976
BLAKE2b-256 checksum
How to use checksums
209799f5f97403129949145e9a3c96bb7693ce051a2ec6078285c80cc067d8b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Size 21.6 MB
Tags CPython 3.7 abi3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
d0f6b4dd3da01ee4c2f6129f6ce778c75840f628071be0491f0c74182b86404d
BLAKE2b-256 checksum
How to use checksums
d891ca5b2910746ec1abd21f5d75f1728a7b20c3a6c75c9800303e41a53593fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / ezkl_lib-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl

Download URL ezkl_lib-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl
Size 11.5 MB
Tags CPython 3.7 abi3 macOS 10.7+ x86-64
SHA-256 checksum
How to use checksums
85f91638e6c1f75e80068d52b8592f74428fb42143d12b3298e7c25a54fd0619
BLAKE2b-256 checksum
How to use checksums
ec90b7ffdce57ad755a16c6cf57e14b375ad7a9ecaf35ffaffdb221b846efa9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.1 CPython/3.11.3

Release history Release notifications | RSS feed

0.3.0

9 release files

0.2.0

9 release files

This release

0.1.0 This release

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page