Giter VIP home page Giter VIP logo

doren-bnn's Introduction

doren-bnn

PyTorch framework for building, testing and benchmarking Binarised Neural Networks (BNNs), which can be converted into Fully Homomorphic Encryption (FHE) versions to be executed on CONCRETE.

Warning: Much of the code pertaining to FHE is not functional, due to issues with bootstrapping in CONCRETE. Future versions of CONCRETE may address this problem, but would require significant modifications to the code.

Development Setup

Package Building

First install Poetry. Dependencies for the doren_bnn package can now be installed in a virtual environment with the following command:

poetry install

nbdime Setup

To view Jupyter notebooks with nbdime, configure the diff/merge drivers for this repository with the following command:

nbdime config-git --enable

pre-commit Setup

To enable the use of Git pre-commit hooks, install the pre-commit package with the following command:

pre-commit install

CONCRETE Setup

To set up the Concrete library, please follow the instructions at [https://docs.zama.ai/concrete/lib/user/installation.html]. Take note that the library is only supported on macOS and Linux.

Note: Currently, it seems that compilation only works on Nightly Rust and not stable.

Compiling Packages

doren_bnn_concrete

To run the executable in the library, run the following commands from the root directory:

cd doren_bnn_concrete
RUSTCFLAGS="target-cpu=native" cargo run --release

To build and install the Python bindings, run the following commands from the root directory:

cd doren_bnn_concrete
RUSTCFLAGS="target-cpu=native" maturin develop --release

You can now import the package doren_bnn_concrete from the root directory.

doren-bnn's People

Contributors

wei2912 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.