mirror of
https://github.com/luxfhe/ml-sdk.git
synced 2026-10-30 18:13:04 +00:00
# Conflicts: # .github/workflows/benchmarks.yaml # .github/workflows/cifar_benchmark.yaml # .github/workflows/continuous-integration.yaml # .github/workflows/llama_finetuning_benchmark.yaml # .github/workflows/publish_aws_ami.yaml # .github/workflows/release.yaml # .github/workflows/resnet_hybrid_model.yaml # .github/workflows/sync_on_push.yaml # .github/workflows/weekly_tests.yaml # LICENSE # Makefile # README.md # UPGRADING.md # benchmarks/common.py # ci/aws_ami_build_component.yaml # conftest.py # docs/README.md # docs/SUMMARY.md # docs/advanced_examples/ClassifierComparison.ipynb # docs/advanced_examples/FullyConnectedNeuralNetwork.ipynb # docs/advanced_examples/FullyConnectedNeuralNetworkOnMNIST.ipynb # docs/advanced_examples/GLMComparison.ipynb # docs/advanced_examples/QuantizationAwareTraining.ipynb # docs/advanced_examples/RegressorComparison.ipynb # docs/advanced_examples/SVMClassifier.ipynb # docs/advanced_examples/utils/classifier_comparison_utils.py # docs/conventions.md # docs/deep-learning/fhe_assistant.md # docs/deep-learning/fhe_friendly_models.md # docs/developer/contributing.md # docs/developer/debug_support_submit_issues.md # docs/developer/project_setup.md # docs/explanations/compilation.md # docs/explanations/pruning.md # docs/getting-started/README.md # docs/getting-started/concepts.md # docs/getting-started/pip_installing.md # docs/guides/client_server.md # docs/references/api/concrete.ml.search_parameters.p_error_search.md # docs/references/api/concrete.ml.sklearn.base.md # docs/references/api/concrete.ml.sklearn.glm.md # docs/references/api/concrete.ml.sklearn.linear_model.md # docs/references/api/concrete.ml.sklearn.neighbors.md # docs/references/api/concrete.ml.sklearn.rf.md # docs/references/api/concrete.ml.sklearn.svm.md # docs/references/api/concrete.ml.sklearn.tree.md # docs/references/api/concrete.ml.sklearn.tree_to_numpy.md # docs/references/api/concrete.ml.sklearn.xgb.md # docs/tutorials/showcase.md # pyproject.toml # script/actions_utils/monitor.py # script/doc_utils/check_forbidden_words.py # script/make_utils/check_installation_with_all_python.sh # script/make_utils/check_issues.py # script/make_utils/fix_omp_issues_for_intel_mac.sh # script/make_utils/jupyter.sh # script/make_utils/local_link_check.py # src/concrete/ml/common/serialization/__init__.py # src/concrete/ml/common/serialization/encoder.py # src/concrete/ml/common/utils.py # src/concrete/ml/deployment/fhe_client_server.py # src/concrete/ml/onnx/convert.py # src/concrete/ml/onnx/onnx_model_manipulations.py # src/concrete/ml/onnx/onnx_utils.py # src/concrete/ml/onnx/ops_impl.py # src/concrete/ml/pandas/_development.py # src/concrete/ml/pandas/_operators.py # src/concrete/ml/pandas/_processing.py # src/concrete/ml/pandas/client_engine.py # src/concrete/ml/pandas/dataframe.py # src/concrete/ml/pytest/utils.py # src/concrete/ml/quantization/base_quantized_op.py # src/concrete/ml/quantization/linear_op_glwe_backend.py # src/concrete/ml/quantization/post_training.py # src/concrete/ml/quantization/quantized_module.py # src/concrete/ml/quantization/quantized_ops.py # src/concrete/ml/quantization/quantizers.py # src/concrete/ml/search_parameters/p_error_search.py # src/concrete/ml/sklearn/_fhe_training_utils.py # src/concrete/ml/sklearn/base.py # src/concrete/ml/sklearn/glm.py # src/concrete/ml/sklearn/linear_model.py # src/concrete/ml/sklearn/neighbors.py # src/concrete/ml/sklearn/qnn.py # src/concrete/ml/sklearn/tree_to_numpy.py # src/concrete/ml/sklearn/xgb.py # src/concrete/ml/torch/compile.py # src/concrete/ml/torch/hybrid_model.py # src/concrete/ml/torch/lora.py # tests/common/test_pbs_error_probability_settings.py # tests/common/test_serialization.py # tests/deployment/test_client_server.py # tests/onnx/test_onnx_utils.py # tests/pandas/test_pandas.py # tests/parameter_search/test_p_error_binary_search.py # tests/quantization/test_compilation.py # tests/quantization/test_quantized_module.py # tests/quantization/test_quantized_ops.py # tests/sklearn/test_dump_onnx.py # tests/sklearn/test_sklearn_models.py # tests/torch/test_brevitas_qat.py # tests/torch/test_compile_keras.py # tests/torch/test_compile_torch.py # tests/torch/test_torch_to_numpy.py # tests/torch/test_training.py # use_case_examples/cifar/README.md # use_case_examples/cifar/cifar_brevitas_finetuning/PerrorImpactOnFMNIST.ipynb # use_case_examples/cifar/cifar_brevitas_finetuning/README.md # use_case_examples/cifar/cifar_brevitas_finetuning/cifar_utils.py # use_case_examples/cifar/cifar_brevitas_training/evaluate_one_example_fhe.py # use_case_examples/cifar/cifar_brevitas_training/evaluate_torch_cml.py # use_case_examples/cifar/cifar_brevitas_training/trainer.py # use_case_examples/credit_card_approval_prediction/README.md # use_case_examples/deployment/sentiment_analysis/train.py # use_case_examples/deployment/server/deploy_to_docker.py # use_case_examples/disease_prediction/HealthCarePrediction.ipynb # use_case_examples/image_filtering/README.md # use_case_examples/llm/README.md # use_case_examples/llm/quant_framework.py # use_case_examples/lora_finetuning/README.md # use_case_examples/lora_finetuning/data_finetune/what_is_fhe.txt # use_case_examples/sentiment_analysis_with_transformer/SentimentClassification.ipynb # use_case_examples/titanic/KaggleTitanic.ipynb # use_case_examples/titanic/README.md # use_case_examples/white_paper_experiment/WhitePaperExperiments.ipynb
Deployment Examples
This folder contains examples of how to deploy TorusML models using Fully Homomorphic Encryption (FHE). These examples demonstrate the process of training, compiling, and deploying models for various use cases.
Overview
The deployment process generally follows these steps:
- Train the model (optional, depending on the use case)
- Compile the model to an FHE circuit
- Deploy the model using Docker
- Run inference using a client (locally or in Docker)
Available Examples
We provide three different use cases to demonstrate the deployment process:
Getting Started
Each example folder contains its own README with specific instructions. However, the general process is similar:
- Train or compile the model using the provided scripts
- Deploy the model using
deploy_to_docker.pyfrom theserverfolder - Build the client Docker image
- Run the client to interact with the deployed model
For detailed instructions, please refer to the README in each example folder.
Requirements
- Docker
- Python 3.8 or later
- TorusML library installed