ezkl  by zkonduit

ZKML inference engine for deep learning models and computational graphs

Created 3 years ago
1,153 stars

Top 33.4% on SourcePulse

GitHubView on GitHub
Project Summary

EZKL is a ZKML (Zero-Knowledge Machine Learning) engine enabling private inference for deep learning models and arbitrary computational graphs. It allows users to define models in PyTorch/TensorFlow, export them to ONNX, and generate ZK-SNARK circuits for verifiable computation. This empowers users to prove statements about private data processed by public models, public data processed by private models, or both, leveraging the Halo2 proof system for efficient verification.

How It Works

EZKL translates computational graphs (e.g., neural networks) defined in frameworks like PyTorch or TensorFlow into the ONNX format. It then quantizes these operations and converts the ONNX graph into a ZK-SNARK circuit using the Halo2 proof system. This circuit allows for the generation of proofs that a specific computation was performed correctly, with the verification process being computationally inexpensive and suitable for on-chain or browser-based execution.

Quick Start & Requirements

  • Python Bindings: pip install ezkl or pip install ezkl-gpu for GPU acceleration.
  • CLI: Download via curl https://raw.githubusercontent.com/zkonduit/ezkl/main/install_ezkl_cli.sh | bash.
  • Dependencies: Python 3.x, Rust/Cargo (for building from source), PyTorch, ONNX, TensorFlow (for tutorials). GPU acceleration requires NVIDIA hardware and building with the icicle feature.
  • Resources: Notebook examples are available in examples/notebooks.
  • Docs: https://github.com/zkonduit/ezkl

Highlighted Details

  • Leverages the Halo2 proof system for ZK-SNARK generation.
  • Supports ONNX model export and quantization for circuit conversion.
  • Offers Python bindings, a CLI tool, and an in-browser EVM verifier.
  • GPU acceleration is available via the Icicle backend.

Maintenance & Community

Licensing & Compatibility

  • Licensed under the Apache 2.0 license.
  • Contributions are subject to a CLA with Zkonduit Inc.

Limitations & Caveats

  • Outputs in EZKL may differ slightly from Python due to quantization.
  • The project is provided "AS IS" without warranty.
  • Security considerations for ZKML, quantization, and ML models are detailed in docs/advanced_security.
Health Check
Last Commit

2 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Vincent Weisser Vincent Weisser(Cofounder of Prime Intellect), and
3 more.

DeepSeek-Math-V2 by deepseek-ai

0.8%
2k
LLM for self-verifiable mathematical reasoning
Created 1 month ago
Updated 1 month ago
Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Andrew Trask Andrew Trask(Research Scientist at Google DeepMind), and
1 more.

tf-encrypted by tf-encrypted

0.1%
1k
Framework for encrypted machine learning in TensorFlow
Created 7 years ago
Updated 1 year ago
Feedback? Help us improve.