Comments (2)
Thank you, i understand
from concrete-ml.
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 inQuantVGG11
: 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 usecompile_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)
- installation error HOT 7
- [Question] Discord link in explanation HOT 2
- High accuracy variance during the training with SGDClassifier HOT 1
- Feature Request : Implement LogSoftmax, Softmax, ReduceMax HOT 3
- Performance Issues HOT 1
- Two consecutive Unsqueeze operations in QAT model throws error at compilation time HOT 2
- LLVM symbolizer error with LogisticRegression example HOT 15
- [Question] What HE algorithm is used? HOT 6
- [Question] AssertionError: Values must be float if value_is_float is set to True, got int64: [1] HOT 3
- AssertionError: Values must be float if value_is_float is set to True, got int64: [[[[102 14 188 ... 85 205 46] HOT 3
- RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cpu! HOT 7
- Python 3.12 HOT 1
- Adding encrypted training for other ML models and DL models HOT 5
- quantized_module.forward() occured an error in "execute" mode HOT 8
- Feature request: Support Unfold torch operator HOT 10
- LLVM symbolizer error when running FHE in 'execute' mode HOT 7
- [Question] How does ReLU work in the new NN example HOT 5
- Feature request: support more padding method HOT 1
- Accuracy of XGBClassifier of disable mode HOT 2
- GPU acceleration in concrete-ml ? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from concrete-ml.