From 64615108715c8e3cf4aff86ac94acf946c1ebefb Mon Sep 17 00:00:00 2001 From: jfrery Date: Tue, 12 Sep 2023 13:39:20 +0200 Subject: [PATCH 1/6] chore: reorg cifar usecases --- use_case_examples/cifar/README.md | 55 +++++++++++++++++++ .../cifar_brevitas_finetuning/.gitattributes | 0 .../cifar_brevitas_finetuning/.gitignore | 0 .../CifarInFhe.ipynb | 0 .../CifarInFheWithSmallerAccumulators.ipynb | 0 .../CifarQuantizationAwareTraining.ipynb | 0 .../FromImageNetToCifar.ipynb | 0 .../cifar_brevitas_finetuning/Makefile | 0 .../PerrorImpactOnFMNIST.ipynb | 0 .../cifar_brevitas_finetuning/README.md | 0 .../CIFAR_10/fp32/CIFAR_10_fp32_state_dict.pt | 0 .../CIFAR_10/fp32/CIFAR_10_history.pkl | 0 .../CIFAR_10/quant/CIFAR_10_history.pkl | 0 .../quant/CIFAR_10_quant_state_dict.pt | 0 .../fp32/CIFAR_100_fp32_state_dict.pt | 0 .../CIFAR_100/fp32/CIFAR_100_history.pkl | 0 .../CIFAR_100/quant/CIFAR_100_history.pkl | 0 .../quant/CIFAR_100_quant_state_dict.pt | 0 .../fp32/FashionMNIST_fp32_state_dict.pt | 0 .../quant/FashionMNIST_quant_state_dict.pt | 0 .../cifar_brevitas_finetuning/cifar_utils.py | 0 .../cifar_brevitas_finetuning/models.py | 0 .../requirements.txt | 0 .../cifar_brevitas_training/.gitignore | 0 .../cifar_brevitas_training/Makefile | 0 .../cifar_brevitas_training/README.md | 0 .../cifar_brevitas_training/bnn_pynq_train.py | 0 .../evaluate_one_example_fhe.py | 0 .../evaluate_torch_cml.py | 0 .../checkpoints/best.tar | 0 .../checkpoints/checkpoint.tar | 0 .../CNV_2W2A_2W2A_20221114_131345/log.txt | 0 .../cifar_brevitas_training/logger.py | 0 .../models/__init__.py | 0 .../models/cnv_2w2a.ini | 0 .../cifar_brevitas_training/models/common.py | 0 .../cifar_brevitas_training/models/model.py | 0 .../models/tensor_norm.py | 0 .../cifar_brevitas_training/requirements.txt | 0 .../cifar_brevitas_training/trainer.py | 0 .../8_bit_model.pt | 0 .../Cifar10.ipynb | 0 .../Makefile | 0 .../README.md | 0 .../brevitas_utils.py | 0 .../clear_module.pt | 0 .../clear_module.py | 0 .../constants.py | 0 .../encrypted_module.pt | 0 .../encrypted_module.py | 0 .../infer_fhe.py | 0 .../infer_fhe_simulation.py | 0 .../infer_torch.py | 0 .../model.py | 0 .../p_error_search.py | 0 .../requirements.txt | 0 .../split_model.py | 0 57 files changed, 55 insertions(+) create mode 100644 use_case_examples/cifar/README.md rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/.gitattributes (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/.gitignore (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/CifarInFhe.ipynb (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/Makefile (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/README.md (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_fp32_state_dict.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_history.pkl (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_history.pkl (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_quant_state_dict.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_fp32_state_dict.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_history.pkl (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_history.pkl (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_quant_state_dict.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/FashionMNIST/fp32/FashionMNIST_fp32_state_dict.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/checkpoints/FashionMNIST/quant/FashionMNIST_quant_state_dict.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/cifar_utils.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/models.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_finetuning/requirements.txt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/.gitignore (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/Makefile (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/README.md (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/bnn_pynq_train.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/evaluate_one_example_fhe.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/evaluate_torch_cml.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/best.tar (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/checkpoint.tar (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/log.txt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/logger.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/models/__init__.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/models/cnv_2w2a.ini (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/models/common.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/models/model.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/models/tensor_norm.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/requirements.txt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_training/trainer.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/8_bit_model.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/Cifar10.ipynb (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/Makefile (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/README.md (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/brevitas_utils.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/clear_module.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/clear_module.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/constants.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/encrypted_module.pt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/encrypted_module.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/infer_fhe.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/infer_fhe_simulation.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/infer_torch.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/model.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/p_error_search.py (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/requirements.txt (100%) rename use_case_examples/{ => cifar}/cifar_brevitas_with_model_splitting/split_model.py (100%) diff --git a/use_case_examples/cifar/README.md b/use_case_examples/cifar/README.md new file mode 100644 index 000000000..1eed4a136 --- /dev/null +++ b/use_case_examples/cifar/README.md @@ -0,0 +1,55 @@ +# CIFAR-10 and CIFAR-100 Classification with FHE + +This repository provides resources and documentation on different use-cases for classifying CIFAR-10 and CIFAR-100 images using Fully Homomorphic Encryption (FHE). Each use-case demonstrates different techniques and adaptations to work within the constraints of FHE. + +## Table of Contents +1. [Use-Cases](#use-cases) + - [Fine-Tuning CIFAR-10/100](#fine-tuning-cifar-10100) + - [Training Ternary VGG on CIFAR10](#training-ternary-vgg-on-cifar10) + - [CIFAR-10 with a Split Clear/FHE Model](#cifar-10-with-a-split-clearfhe-model) +2. [Installation](#installation) +3. [Further Reading & Resources](#further-reading--resources) + +## Use cases + +### Fine-Tuning CIFAR-10/100 + +- **Description**: This use-case explores how to convert a pre-trained CNN (on imagenet) to its FHE equivalent using QAT and Concrete ML. The conversion process involves adapting a VGG11 network and quantizing the network for FHE. + +- Notebooks: +1. [Adapting VGG11 for CIFAR datasets](cifar_brevitas_finetuning/FromImageNetToCifar.ipynb). +2. [Quantizing the pre-trained network](cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb). +3. [Computing the accuracy of the quantized models with FHE simulation](cifar_brevitas_finetuning/CifarInFhe.ipynb). +4. [Enhancing inference time in FHE using smaller accumulators](cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb). + +[Results & Metrics](cifar_brevitas_finetuning/README.md#results) + +### Training Ternary VGG on CIFAR10 + +- **Description**: Train a VGG-like neural network from scratch using Brevitas on CIFAR-10 and run it in FHE. This use-case modifies the original VGG model for compatibility with Concrete ML, and explores the performance gains of rounding operations in FHE. +- **Training & Inference**: Scripts provided to train the network and evaluate its performance. Also includes simulations in Concrete ML and insights into the performance enhancement using rounding. + +[Results & Metrics](cifar_brevitas_training/README.md#Accuracy_/and_/performance) + +### CIFAR-10 with a Split Clear/FHE Model + +- **Description**: An approach that splits the model into two parts: one running in clear and the other in FHE. By doing this, higher precision can be achieved in the input layer while still benefiting from FHE in subsequent layers. +- **Model Design**: Targets 8-bit accumulators for faster FHE inference. Pruning and 2-bit weights are used. +- **Implementation**: Detailed steps on how to run the model in FHE and the trade-offs involved in choosing the appropriate p_error value. + +[Results & Metrics](cifar_brevitas_with_model_splitting/README.md#results) + +## Installation + +All use-cases can be quickly set up with: + +```bash +pip install -r requirements.txt +``` + +## Further Reading & Resources + +- [Concrete ML Documentation](https://docs.zama.ai/concrete-ml/) +- [Brevitas Github Repository](https://github.com/Xilinx/brevitas) +- [Fully Homomorphic Encryption Basics](https://www.zama.ai/post/tfhe-deep-dive-part-1) +- [CIFAR Datasets Overview](https://www.cs.toronto.edu/~kriz/cifar.html) diff --git a/use_case_examples/cifar_brevitas_finetuning/.gitattributes b/use_case_examples/cifar/cifar_brevitas_finetuning/.gitattributes similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/.gitattributes rename to use_case_examples/cifar/cifar_brevitas_finetuning/.gitattributes diff --git a/use_case_examples/cifar_brevitas_finetuning/.gitignore b/use_case_examples/cifar/cifar_brevitas_finetuning/.gitignore similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/.gitignore rename to use_case_examples/cifar/cifar_brevitas_finetuning/.gitignore diff --git a/use_case_examples/cifar_brevitas_finetuning/CifarInFhe.ipynb b/use_case_examples/cifar/cifar_brevitas_finetuning/CifarInFhe.ipynb similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/CifarInFhe.ipynb rename to use_case_examples/cifar/cifar_brevitas_finetuning/CifarInFhe.ipynb diff --git a/use_case_examples/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb b/use_case_examples/cifar/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb rename to use_case_examples/cifar/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb diff --git a/use_case_examples/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb b/use_case_examples/cifar/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb rename to use_case_examples/cifar/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb diff --git a/use_case_examples/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb b/use_case_examples/cifar/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb rename to use_case_examples/cifar/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb diff --git a/use_case_examples/cifar_brevitas_finetuning/Makefile b/use_case_examples/cifar/cifar_brevitas_finetuning/Makefile similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/Makefile rename to use_case_examples/cifar/cifar_brevitas_finetuning/Makefile diff --git a/use_case_examples/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb b/use_case_examples/cifar/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb rename to use_case_examples/cifar/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb diff --git a/use_case_examples/cifar_brevitas_finetuning/README.md b/use_case_examples/cifar/cifar_brevitas_finetuning/README.md similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/README.md rename to use_case_examples/cifar/cifar_brevitas_finetuning/README.md diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_fp32_state_dict.pt b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_fp32_state_dict.pt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_fp32_state_dict.pt rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_fp32_state_dict.pt diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_history.pkl b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_history.pkl similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_history.pkl rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/fp32/CIFAR_10_history.pkl diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_history.pkl b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_history.pkl similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_history.pkl rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_history.pkl diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_quant_state_dict.pt b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_quant_state_dict.pt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_quant_state_dict.pt rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_10/quant/CIFAR_10_quant_state_dict.pt diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_fp32_state_dict.pt b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_fp32_state_dict.pt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_fp32_state_dict.pt rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_fp32_state_dict.pt diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_history.pkl b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_history.pkl similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_history.pkl rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/fp32/CIFAR_100_history.pkl diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_history.pkl b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_history.pkl similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_history.pkl rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_history.pkl diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_quant_state_dict.pt b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_quant_state_dict.pt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_quant_state_dict.pt rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/CIFAR_100/quant/CIFAR_100_quant_state_dict.pt diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/FashionMNIST/fp32/FashionMNIST_fp32_state_dict.pt b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/FashionMNIST/fp32/FashionMNIST_fp32_state_dict.pt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/FashionMNIST/fp32/FashionMNIST_fp32_state_dict.pt rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/FashionMNIST/fp32/FashionMNIST_fp32_state_dict.pt diff --git a/use_case_examples/cifar_brevitas_finetuning/checkpoints/FashionMNIST/quant/FashionMNIST_quant_state_dict.pt b/use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/FashionMNIST/quant/FashionMNIST_quant_state_dict.pt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/checkpoints/FashionMNIST/quant/FashionMNIST_quant_state_dict.pt rename to use_case_examples/cifar/cifar_brevitas_finetuning/checkpoints/FashionMNIST/quant/FashionMNIST_quant_state_dict.pt diff --git a/use_case_examples/cifar_brevitas_finetuning/cifar_utils.py b/use_case_examples/cifar/cifar_brevitas_finetuning/cifar_utils.py similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/cifar_utils.py rename to use_case_examples/cifar/cifar_brevitas_finetuning/cifar_utils.py diff --git a/use_case_examples/cifar_brevitas_finetuning/models.py b/use_case_examples/cifar/cifar_brevitas_finetuning/models.py similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/models.py rename to use_case_examples/cifar/cifar_brevitas_finetuning/models.py diff --git a/use_case_examples/cifar_brevitas_finetuning/requirements.txt b/use_case_examples/cifar/cifar_brevitas_finetuning/requirements.txt similarity index 100% rename from use_case_examples/cifar_brevitas_finetuning/requirements.txt rename to use_case_examples/cifar/cifar_brevitas_finetuning/requirements.txt diff --git a/use_case_examples/cifar_brevitas_training/.gitignore b/use_case_examples/cifar/cifar_brevitas_training/.gitignore similarity index 100% rename from use_case_examples/cifar_brevitas_training/.gitignore rename to use_case_examples/cifar/cifar_brevitas_training/.gitignore diff --git a/use_case_examples/cifar_brevitas_training/Makefile b/use_case_examples/cifar/cifar_brevitas_training/Makefile similarity index 100% rename from use_case_examples/cifar_brevitas_training/Makefile rename to use_case_examples/cifar/cifar_brevitas_training/Makefile diff --git a/use_case_examples/cifar_brevitas_training/README.md b/use_case_examples/cifar/cifar_brevitas_training/README.md similarity index 100% rename from use_case_examples/cifar_brevitas_training/README.md rename to use_case_examples/cifar/cifar_brevitas_training/README.md diff --git a/use_case_examples/cifar_brevitas_training/bnn_pynq_train.py b/use_case_examples/cifar/cifar_brevitas_training/bnn_pynq_train.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/bnn_pynq_train.py rename to use_case_examples/cifar/cifar_brevitas_training/bnn_pynq_train.py diff --git a/use_case_examples/cifar_brevitas_training/evaluate_one_example_fhe.py b/use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/evaluate_one_example_fhe.py rename to use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py diff --git a/use_case_examples/cifar_brevitas_training/evaluate_torch_cml.py b/use_case_examples/cifar/cifar_brevitas_training/evaluate_torch_cml.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/evaluate_torch_cml.py rename to use_case_examples/cifar/cifar_brevitas_training/evaluate_torch_cml.py diff --git a/use_case_examples/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/best.tar b/use_case_examples/cifar/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/best.tar similarity index 100% rename from use_case_examples/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/best.tar rename to use_case_examples/cifar/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/best.tar diff --git a/use_case_examples/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/checkpoint.tar b/use_case_examples/cifar/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/checkpoint.tar similarity index 100% rename from use_case_examples/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/checkpoint.tar rename to use_case_examples/cifar/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/checkpoints/checkpoint.tar diff --git a/use_case_examples/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/log.txt b/use_case_examples/cifar/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/log.txt similarity index 100% rename from use_case_examples/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/log.txt rename to use_case_examples/cifar/cifar_brevitas_training/experiments/CNV_2W2A_2W2A_20221114_131345/log.txt diff --git a/use_case_examples/cifar_brevitas_training/logger.py b/use_case_examples/cifar/cifar_brevitas_training/logger.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/logger.py rename to use_case_examples/cifar/cifar_brevitas_training/logger.py diff --git a/use_case_examples/cifar_brevitas_training/models/__init__.py b/use_case_examples/cifar/cifar_brevitas_training/models/__init__.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/models/__init__.py rename to use_case_examples/cifar/cifar_brevitas_training/models/__init__.py diff --git a/use_case_examples/cifar_brevitas_training/models/cnv_2w2a.ini b/use_case_examples/cifar/cifar_brevitas_training/models/cnv_2w2a.ini similarity index 100% rename from use_case_examples/cifar_brevitas_training/models/cnv_2w2a.ini rename to use_case_examples/cifar/cifar_brevitas_training/models/cnv_2w2a.ini diff --git a/use_case_examples/cifar_brevitas_training/models/common.py b/use_case_examples/cifar/cifar_brevitas_training/models/common.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/models/common.py rename to use_case_examples/cifar/cifar_brevitas_training/models/common.py diff --git a/use_case_examples/cifar_brevitas_training/models/model.py b/use_case_examples/cifar/cifar_brevitas_training/models/model.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/models/model.py rename to use_case_examples/cifar/cifar_brevitas_training/models/model.py diff --git a/use_case_examples/cifar_brevitas_training/models/tensor_norm.py b/use_case_examples/cifar/cifar_brevitas_training/models/tensor_norm.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/models/tensor_norm.py rename to use_case_examples/cifar/cifar_brevitas_training/models/tensor_norm.py diff --git a/use_case_examples/cifar_brevitas_training/requirements.txt b/use_case_examples/cifar/cifar_brevitas_training/requirements.txt similarity index 100% rename from use_case_examples/cifar_brevitas_training/requirements.txt rename to use_case_examples/cifar/cifar_brevitas_training/requirements.txt diff --git a/use_case_examples/cifar_brevitas_training/trainer.py b/use_case_examples/cifar/cifar_brevitas_training/trainer.py similarity index 100% rename from use_case_examples/cifar_brevitas_training/trainer.py rename to use_case_examples/cifar/cifar_brevitas_training/trainer.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/8_bit_model.pt b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/8_bit_model.pt similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/8_bit_model.pt rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/8_bit_model.pt diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/Cifar10.ipynb b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/Cifar10.ipynb similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/Cifar10.ipynb rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/Cifar10.ipynb diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/Makefile b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/Makefile similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/Makefile rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/Makefile diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/README.md b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/README.md similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/README.md rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/README.md diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/brevitas_utils.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/brevitas_utils.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/brevitas_utils.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/brevitas_utils.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/clear_module.pt b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/clear_module.pt similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/clear_module.pt rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/clear_module.pt diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/clear_module.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/clear_module.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/clear_module.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/clear_module.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/constants.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/constants.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/constants.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/constants.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/encrypted_module.pt b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/encrypted_module.pt similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/encrypted_module.pt rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/encrypted_module.pt diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/encrypted_module.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/encrypted_module.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/encrypted_module.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/encrypted_module.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/infer_fhe.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/infer_fhe.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/infer_fhe.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/infer_fhe.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/infer_fhe_simulation.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/infer_fhe_simulation.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/infer_fhe_simulation.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/infer_fhe_simulation.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/infer_torch.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/infer_torch.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/infer_torch.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/infer_torch.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/model.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/model.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/model.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/model.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/p_error_search.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/p_error_search.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/p_error_search.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/p_error_search.py diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/requirements.txt b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/requirements.txt similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/requirements.txt rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/requirements.txt diff --git a/use_case_examples/cifar_brevitas_with_model_splitting/split_model.py b/use_case_examples/cifar/cifar_brevitas_with_model_splitting/split_model.py similarity index 100% rename from use_case_examples/cifar_brevitas_with_model_splitting/split_model.py rename to use_case_examples/cifar/cifar_brevitas_with_model_splitting/split_model.py From 9540e96b9832e71c8af1072097f4489321ee6d3c Mon Sep 17 00:00:00 2001 From: jfrery Date: Thu, 14 Sep 2023 09:45:18 +0200 Subject: [PATCH 2/6] chore: review --- use_case_examples/cifar/README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/use_case_examples/cifar/README.md b/use_case_examples/cifar/README.md index 1eed4a136..948d0e708 100644 --- a/use_case_examples/cifar/README.md +++ b/use_case_examples/cifar/README.md @@ -3,10 +3,11 @@ This repository provides resources and documentation on different use-cases for classifying CIFAR-10 and CIFAR-100 images using Fully Homomorphic Encryption (FHE). Each use-case demonstrates different techniques and adaptations to work within the constraints of FHE. ## Table of Contents + 1. [Use-Cases](#use-cases) - - [Fine-Tuning CIFAR-10/100](#fine-tuning-cifar-10100) - - [Training Ternary VGG on CIFAR10](#training-ternary-vgg-on-cifar10) - - [CIFAR-10 with a Split Clear/FHE Model](#cifar-10-with-a-split-clearfhe-model) + - [Fine-Tuning VGG11 CIFAR-10/100](#fine-tuning-cifar-10100) + - [Training Ternary VGG9 on CIFAR10](#training-ternary-vgg-on-cifar10) + - [CIFAR-10 VGG9 with one client-side layer](#cifar-10-with-a-split-clearfhe-model) 2. [Installation](#installation) 3. [Further Reading & Resources](#further-reading--resources) @@ -14,9 +15,10 @@ This repository provides resources and documentation on different use-cases for ### Fine-Tuning CIFAR-10/100 -- **Description**: This use-case explores how to convert a pre-trained CNN (on imagenet) to its FHE equivalent using QAT and Concrete ML. The conversion process involves adapting a VGG11 network and quantizing the network for FHE. +- **Description**: This use-case explores how to convert a pre-trained CNN (on imagenet) to its FHE equivalent using Quantization Aware Training (QAT) and Concrete ML. The conversion process involves adapting a VGG11 network and quantizing the network for FHE. + +Notebooks: -- Notebooks: 1. [Adapting VGG11 for CIFAR datasets](cifar_brevitas_finetuning/FromImageNetToCifar.ipynb). 2. [Quantizing the pre-trained network](cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb). 3. [Computing the accuracy of the quantized models with FHE simulation](cifar_brevitas_finetuning/CifarInFhe.ipynb). @@ -27,15 +29,15 @@ This repository provides resources and documentation on different use-cases for ### Training Ternary VGG on CIFAR10 - **Description**: Train a VGG-like neural network from scratch using Brevitas on CIFAR-10 and run it in FHE. This use-case modifies the original VGG model for compatibility with Concrete ML, and explores the performance gains of rounding operations in FHE. -- **Training & Inference**: Scripts provided to train the network and evaluate its performance. Also includes simulations in Concrete ML and insights into the performance enhancement using rounding. +- **Training & Inference**: Scripts provided to train the network and evaluate its performance. It also includes simulations in Concrete ML and insights into the performance enhancement using rounding. [Results & Metrics](cifar_brevitas_training/README.md#Accuracy_/and_/performance) ### CIFAR-10 with a Split Clear/FHE Model -- **Description**: An approach that splits the model into two parts: one running in clear and the other in FHE. By doing this, higher precision can be achieved in the input layer while still benefiting from FHE in subsequent layers. -- **Model Design**: Targets 8-bit accumulators for faster FHE inference. Pruning and 2-bit weights are used. -- **Implementation**: Detailed steps on how to run the model in FHE and the trade-offs involved in choosing the appropriate p_error value. +- **Description**: This method divides the model into two segments: one that operates in plaintext (clear) and the other in Fully Homomorphic Encryption (FHE). This division allows for greater precision in the input layer while taking advantage of FHE's privacy-preserving capabilities in the subsequent layers. +- **Model Design**: Aims at using 8-bit accumulators to speed up FHE inference. The design incorporates pruning techniques and employs 2-bit weights to meet this aim. +- **Implementation**: Provides step-by-step guidance on how to execute the hybrid clear/FHE model, focusing on the details and decisions behind selecting the optimal `p_error` value. Special attention is given to the binary search method to balance accuracy and FHE performance. [Results & Metrics](cifar_brevitas_with_model_splitting/README.md#results) From 13c85bcccf8fc68e8e5457ea98a603e2110ecc10 Mon Sep 17 00:00:00 2001 From: jfrery Date: Mon, 18 Sep 2023 09:49:52 +0200 Subject: [PATCH 3/6] chore: refresh notebook list --- .github/workflows/refresh-one-notebook.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/refresh-one-notebook.yaml b/.github/workflows/refresh-one-notebook.yaml index 754911ac5..774d5009b 100644 --- a/.github/workflows/refresh-one-notebook.yaml +++ b/.github/workflows/refresh-one-notebook.yaml @@ -50,10 +50,10 @@ env: ACTION_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} # --- refresh_notebooks_list.py: refresh list of notebook paths currently available [START] --- # --- do not edit, auto generated part by `make refresh_notebooks_list` --- - Cifar10: "use_case_examples/cifar_brevitas_with_model_splitting/Cifar10.ipynb" - CifarInFhe: "use_case_examples/cifar_brevitas_finetuning/CifarInFhe.ipynb" - CifarInFheWithSmallerAccumulators: "use_case_examples/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb" - CifarQuantizationAwareTraining: "use_case_examples/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb" + Cifar10: "use_case_examples/cifar/cifar_brevitas_with_model_splitting/Cifar10.ipynb" + CifarInFhe: "use_case_examples/cifar/cifar_brevitas_finetuning/CifarInFhe.ipynb" + CifarInFheWithSmallerAccumulators: "use_case_examples/cifar/cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb" + CifarQuantizationAwareTraining: "use_case_examples/cifar/cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb" ClassifierComparison: "docs/advanced_examples/ClassifierComparison.ipynb" ClientServer: "docs/advanced_examples/ClientServer.ipynb" ConvolutionalNeuralNetwork: "docs/advanced_examples/ConvolutionalNeuralNetwork.ipynb" @@ -62,7 +62,7 @@ env: DecisionTreeRegressor: "docs/advanced_examples/DecisionTreeRegressor.ipynb" Deployment: "docs/advanced_examples/Deployment.ipynb" ExperimentPrivacyTreePaper: "docs/advanced_examples/ExperimentPrivacyTreePaper.ipynb" - FromImageNetToCifar: "use_case_examples/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb" + FromImageNetToCifar: "use_case_examples/cifar/cifar_brevitas_finetuning/FromImageNetToCifar.ipynb" FullyConnectedNeuralNetwork: "docs/advanced_examples/FullyConnectedNeuralNetwork.ipynb" FullyConnectedNeuralNetworkOnMNIST: "docs/advanced_examples/FullyConnectedNeuralNetworkOnMNIST.ipynb" GLMComparison: "docs/advanced_examples/GLMComparison.ipynb" @@ -72,7 +72,7 @@ env: LinearSVR: "docs/advanced_examples/LinearSVR.ipynb" LogisticRegression: "docs/advanced_examples/LogisticRegression.ipynb" MnistInFHE: "use_case_examples/mnist/MnistInFHE.ipynb" - PerrorImpactOnFMNIST: "use_case_examples/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb" + PerrorImpactOnFMNIST: "use_case_examples/cifar/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb" PoissonRegression: "docs/advanced_examples/PoissonRegression.ipynb" QGPT2Evaluate: "use_case_examples/llm/QGPT2Evaluate.ipynb" QuantFrameworkExample: "use_case_examples/llm/QuantFrameworkExample.ipynb" From cc8393126823014d6aef0dab5b6bfeecf489850e Mon Sep 17 00:00:00 2001 From: jfrery Date: Mon, 18 Sep 2023 12:45:36 +0200 Subject: [PATCH 4/6] chore: update description --- use_case_examples/cifar/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/use_case_examples/cifar/README.md b/use_case_examples/cifar/README.md index 948d0e708..12593da7e 100644 --- a/use_case_examples/cifar/README.md +++ b/use_case_examples/cifar/README.md @@ -1,6 +1,6 @@ # CIFAR-10 and CIFAR-100 Classification with FHE -This repository provides resources and documentation on different use-cases for classifying CIFAR-10 and CIFAR-100 images using Fully Homomorphic Encryption (FHE). Each use-case demonstrates different techniques and adaptations to work within the constraints of FHE. +This repository provides resources and documentation on different use-cases for classifying CIFAR-10 and CIFAR-100 images using Fully Homomorphic Encryption (FHE). Each use-case demonstrates different techniques and adaptations to work within the constraints of FHE.Notably, a fine-tuning from a public pre-trained model, a training from scratch using quantization aware traiing (QAT) and finally a hybrid approach where only a subset of the model is done in FHE. ## Table of Contents From 871ad2267985af14936287258f20ba9afb442cf4 Mon Sep 17 00:00:00 2001 From: jfrery Date: Tue, 19 Sep 2023 09:43:11 +0200 Subject: [PATCH 5/6] chore: typo --- use_case_examples/cifar/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/use_case_examples/cifar/README.md b/use_case_examples/cifar/README.md index 12593da7e..67f4eebd6 100644 --- a/use_case_examples/cifar/README.md +++ b/use_case_examples/cifar/README.md @@ -1,6 +1,6 @@ # CIFAR-10 and CIFAR-100 Classification with FHE -This repository provides resources and documentation on different use-cases for classifying CIFAR-10 and CIFAR-100 images using Fully Homomorphic Encryption (FHE). Each use-case demonstrates different techniques and adaptations to work within the constraints of FHE.Notably, a fine-tuning from a public pre-trained model, a training from scratch using quantization aware traiing (QAT) and finally a hybrid approach where only a subset of the model is done in FHE. +This repository provides resources and documentation on different use-cases for classifying CIFAR-10 and CIFAR-100 images using Fully Homomorphic Encryption (FHE). Each use-case demonstrates different techniques and adaptations to work within the constraints of FHE.Notably, a fine-tuning from a public pre-trained model, a training from scratch using quantization aware training (QAT) and finally a hybrid approach where only a subset of the model is done in FHE. ## Table of Contents @@ -8,8 +8,8 @@ This repository provides resources and documentation on different use-cases for - [Fine-Tuning VGG11 CIFAR-10/100](#fine-tuning-cifar-10100) - [Training Ternary VGG9 on CIFAR10](#training-ternary-vgg-on-cifar10) - [CIFAR-10 VGG9 with one client-side layer](#cifar-10-with-a-split-clearfhe-model) -2. [Installation](#installation) -3. [Further Reading & Resources](#further-reading--resources) +1. [Installation](#installation) +1. [Further Reading & Resources](#further-reading--resources) ## Use cases @@ -20,9 +20,9 @@ This repository provides resources and documentation on different use-cases for Notebooks: 1. [Adapting VGG11 for CIFAR datasets](cifar_brevitas_finetuning/FromImageNetToCifar.ipynb). -2. [Quantizing the pre-trained network](cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb). -3. [Computing the accuracy of the quantized models with FHE simulation](cifar_brevitas_finetuning/CifarInFhe.ipynb). -4. [Enhancing inference time in FHE using smaller accumulators](cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb). +1. [Quantizing the pre-trained network](cifar_brevitas_finetuning/CifarQuantizationAwareTraining.ipynb). +1. [Computing the accuracy of the quantized models with FHE simulation](cifar_brevitas_finetuning/CifarInFhe.ipynb). +1. [Enhancing inference time in FHE using smaller accumulators](cifar_brevitas_finetuning/CifarInFheWithSmallerAccumulators.ipynb). [Results & Metrics](cifar_brevitas_finetuning/README.md#results) From a3808f03cefc0a1a6643b9d4b32f4dab47a6e4e9 Mon Sep 17 00:00:00 2001 From: jfrery Date: Wed, 20 Sep 2023 14:32:42 +0200 Subject: [PATCH 6/6] chore: fix pytest --- use_case_examples/cifar/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/use_case_examples/cifar/README.md b/use_case_examples/cifar/README.md index 67f4eebd6..6ef892b97 100644 --- a/use_case_examples/cifar/README.md +++ b/use_case_examples/cifar/README.md @@ -45,6 +45,8 @@ Notebooks: All use-cases can be quickly set up with: + + ```bash pip install -r requirements.txt ```