Git Product home page Git Product logo

Comments (2)

maxwellgodv avatar maxwellgodv commented on August 23, 2024 1

Thank you, i understand

from concrete-ml.

kcelia avatar kcelia commented on August 23, 2024

Hello @maxwellgodv,

Thank you for reaching out to us.

To use Fully Homomorphic Encryption (FHE) with Concrete ML, it is necessary to convert your machine learning model into an FHE-compatible model.

In this use-case, we explain how to convert a custom Torch neural network into its FHE-equivalent.

An FHE-equivalent model means that the model is quantized and the maximum precision of the operation graph is less than 16 bits. So:

  • The bit hyper-parameter in QuantVGG11: refers to the quantization bit, an essential hyper-parameter in Concrete-ML, required to quantize the input, weights, activation functions and output. This quantization step is mandatory as FHE operates only over integers with a precision limit of 16 bits. In the provided use-case, we used 5 bits to quantize the model and the inputs.

For custom models, Concrete ml uses Brevitas library for quantization.

  • The circuit bit-width :
    Now that your custom neural network is quantized with a precision of 5-bits. You have to check whether the maximum bit-width of your circuit is less than 16 bits. To do so, we use compile_brevitas_qat_model, which under the hood generates an executable operation graph, determines cryptographic parameters and raises an error if the maximum bit-width exceeds 16 bits. In this case, you have to decrease the quantization bit.

Thanks !

from concrete-ml.

Related Issues (20)

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.