Skip to main content

No project description provided

Project description


: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:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ezkl_lib-0.3.0-cp37-abi3-win_amd64.whl (9.9 MB view hashes)

Uploaded CPython 3.7+ Windows x86-64

ezkl_lib-0.3.0-cp37-abi3-win32.whl (9.0 MB view hashes)

Uploaded CPython 3.7+ Windows x86

ezkl_lib-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl (13.8 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

ezkl_lib-0.3.0-cp37-abi3-musllinux_1_2_armv7l.whl (12.8 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

ezkl_lib-0.3.0-cp37-abi3-musllinux_1_2_aarch64.whl (12.9 MB view hashes)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

ezkl_lib-0.3.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.6 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

ezkl_lib-0.3.0-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (14.0 MB view hashes)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ i686

ezkl_lib-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (21.1 MB view hashes)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

ezkl_lib-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl (11.2 MB view hashes)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page