No project description provided
Project description
auto-zkml
This package is designed to provide functionality that facilitates the transition from ML algorithms to ZKML. Its two main functionalities are:
-
Serialization: saving a trained ML model in a specific format to be interpretable by other programs.
-
model-complexity-reducer (mcr): Given a model and a training dataset, transform the model and the data to obtain a lighter representation that maximizes the tradeoff between performance and complexity.
It's important to note that although the main goal is the transition from ML to ZKML, auto-zkml can be useful in other contexts, such as:
- The model's weight needs to be minimal, for example for mobile applications.
- Minimal inference times are required for low latency applications.
- We want to check if we have created an overly complex model and a simpler one would give us the same performance (or even better).
- The number of steps required to perform the inference must be less than X (as is currently constrained by the ZKML paradigm).
Installation
Install from PyPi
For the latest release:
pip install auto-zkml
Installing from source
Clone the repository and install it with pip
:
git clone git@github.com:gizatechxyz/auto-zkml.git
cd auto-zkml
pip install .
Serialization
To see in more detail how this tool works, check out this tutorial.
To run it:
from auto_zkml import serialize_model
serialize_model(YOUR_TRAINED_MODEL, "OUTPUT_PATH/MODEL_NAME.json")
mcr
To see in more detail how this tool works, check out this tutorial.
To run it:
model, transformer = mcr(model = MY_MODEL,
X_train = X_train,
y_train = y_train,
X_eval = X_test,
y_eval = y_test,
eval_metric = 'rmse',
transform_features = True)
Supported Models
Model | status |
---|---|
XGBRegressor | ✅ |
XGBClassifier | ✅ |
LGBMRegressor | ✅ |
LGBMClassifier | ✅ |
Logistic Regression | ⏳ |
GARCH | ⏳ |
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file auto_zkml-0.1.0.tar.gz
.
File metadata
- Download URL: auto_zkml-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8825e2cdd6b68d2766ee0c2b3e3a9e62c6276d953a07db07bb09e17d7ce19821 |
|
MD5 | 2aa5d3142f66d782bfe7b1c73f15b1e9 |
|
BLAKE2b-256 | 3179d53485640886244638bac53365a389d6adad56cbaea86079762f6d3e4f3c |
File details
Details for the file auto_zkml-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: auto_zkml-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b85a0496b42adb2012301cd92a44a32d587d38defabbfce082c2962c722f1e5c |
|
MD5 | b25b28f713349572151a77afeb9038fb |
|
BLAKE2b-256 | 8854ff523dbf20fc45511fde7e45961490113e10c7dfcd192ac859511ef67f74 |