Giter Club home page Giter Club logo

ezkl's Introduction


๐Ÿ’ญ

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 โš™๏ธ

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

ezkl's People

Contributors

alexander-camuto avatar dcbuild3r avatar ethan-crypto avatar genysys avatar huitseeker avatar jasonmorton avatar jseam2 avatar lancenonce avatar sid-alluri avatar weijiekoh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.